Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MagMueller
Copy link
Collaborator

@MagMueller MagMueller commented Aug 27, 2025

Auto-generated PR for branch: fix-browser-start


Summary by cubic

Fail fast on browser startup and simplify configuration. BrowserStartEvent now raises on startup errors, is_local defaults to False with auto-detection when executable_path is set, and the deprecated stealth option is removed.

  • Bug Fixes

    • Agent awaits BrowserStartEvent result and raises if the browser fails to start.
  • Migration

    • Remove stealth from configs and tests (no longer supported).
    • Remote browsers: you can omit is_local (now defaults to False).
    • Local browsers: set is_local=True, or provide executable_path (auto-sets is_local to True).

@MagMueller MagMueller merged commit 21e1206 into main Aug 27, 2025
29 of 55 checks passed
@MagMueller MagMueller deleted the fix-browser-start branch August 27, 2025 17:10
Copy link

Agent Task Evaluation Results: 0/3 (0%)

View detailed results
Task Result Reason
captcha_cloudflare ❌ Fail Task failed with error: Event handler 140403860081264.140403816920256(?▶ BrowserStartEvent#31a9 ✅) returned an error -> Got BrowserSession(is_local=False) but no cdp_url was provided to connect to!
browser_use_pip ❌ Fail Task failed with error: Event handler 140325833853504.140325790364544(?▶ BrowserStartEvent#5991 ✅) returned an error -> Got BrowserSession(is_local=False) but no cdp_url was provided to connect to!
amazon_laptop ❌ Fail Task failed with error: Event handler 140198458934000.140198437499776(?▶ BrowserStartEvent#17f3 ✅) returned an error -> Got BrowserSession(is_local=False) but no cdp_url was provided to connect to!

Check the evaluate-tasks job for detailed task execution logs.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 7 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

)
cdp_url="http://remote-server:9222",
is_local=False # set to True if you want to use a local browser
cdp_url="http://remote-server:9222"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cdp_url is not separated by a comma from the previous argument, causing a syntax error in this example.

Prompt for AI agents
Address the following comment on docs/customize/browser/remote.mdx at line 46:

<comment>cdp_url is not separated by a comma from the previous argument, causing a syntax error in this example.</comment>

<file context>
@@ -44,8 +43,7 @@ browser = Browser(
         )
-        cdp_url=&quot;http://remote-server:9222&quot;,
-        is_local=False  # set to True if you want to use a local browser
+        cdp_url=&quot;http://remote-server:9222&quot;
 )
 
</file context>
Suggested change
cdp_url="http://remote-server:9222"
, cdp_url="http://remote-server:9222"

- Use list like `['*.google.com', 'https://example.com', 'chrome-extension://*']`
- `enable_default_extensions` (default: `True`): Load automation extensions (uBlock Origin, cookie handlers, ClearURLs)
- `cross_origin_iframes` (default: `False`): Enable cross-origin iframe support (may cause complexity)
- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If we have a `executable_path` set, it will be automatically set to `True`. This can effect your download behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs state is_local default True, but code default is False; this mismatch can cause startup errors without cdp_url.

Prompt for AI agents
Address the following comment on docs/customize/browser/all-parameters.mdx at line 32:

<comment>Docs state is_local default True, but code default is False; this mismatch can cause startup errors without cdp_url.</comment>

<file context>
@@ -31,6 +29,7 @@ mode: &quot;wide&quot;
   - Use list like `[&#39;*.google.com&#39;, &#39;https://example.com&#39;, &#39;chrome-extension://*&#39;]`
 - `enable_default_extensions` (default: `True`): Load automation extensions (uBlock Origin, cookie handlers, ClearURLs)
 - `cross_origin_iframes` (default: `False`): Enable cross-origin iframe support (may cause complexity)
+- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If we have a `executable_path` set, it will be automatically set to `True`. This can effect your download behavior.
 
 ## User Data &amp; Profiles
</file context>

# Session/connection configuration
cdp_url: str | None = Field(default=None, description='CDP URL for connecting to existing browser instance')
is_local: bool = Field(default=True, description='Whether this is a local browser instance')
is_local: bool = Field(default=False, description='Whether this is a local browser instance')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing is_local default to False makes default sessions without cdp_url raise at startup instead of launching a local browser, breaking expected default behavior.

(This reflects your team's feedback about matching the project's tab indentation in suggestions.)

Prompt for AI agents
Address the following comment on browser_use/browser/profile.py at line 539:

<comment>Changing is_local default to False makes default sessions without cdp_url raise at startup instead of launching a local browser, breaking expected default behavior.

(This reflects your team&#39;s feedback about matching the project&#39;s tab indentation in suggestions.)</comment>

<file context>
@@ -536,11 +536,10 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Bro
 	# Session/connection configuration
 	cdp_url: str | None = Field(default=None, description=&#39;CDP URL for connecting to existing browser instance&#39;)
-	is_local: bool = Field(default=True, description=&#39;Whether this is a local browser instance&#39;)
+	is_local: bool = Field(default=False, description=&#39;Whether this is a local browser instance&#39;)
 	# label: str = &#39;default&#39;
 
</file context>
Suggested change
is_local: bool = Field(default=False, description='Whether this is a local browser instance')
is_local: bool = Field(default=True, description='Whether this is a local browser instance')

id: str | None = None,
cdp_url: str | None = None,
is_local: bool = True,
is_local: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default is_local=False breaks default local launch; start() now raises when cdp_url is missing.

Prompt for AI agents
Address the following comment on browser_use/browser/session.py at line 221:

<comment>Default is_local=False breaks default local launch; start() now raises when cdp_url is missing.</comment>

<file context>
@@ -219,7 +218,7 @@ def __init__(
 		id: str | None = None,
 		cdp_url: str | None = None,
-		is_local: bool = True,
+		is_local: bool = False,
 		browser_profile: BrowserProfile | None = None,
 		# BrowserProfile fields that can be passed directly
</file context>

- Use list like `['*.google.com', 'https://example.com', 'chrome-extension://*']`
- `enable_default_extensions` (default: `True`): Load automation extensions (uBlock Origin, cookie handlers, ClearURLs)
- `cross_origin_iframes` (default: `False`): Enable cross-origin iframe support (may cause complexity)
- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If we have a `executable_path` set, it will be automatically set to `True`. This can effect your download behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix grammar in the added docs line: use "an" before executable_path and "affect" (not "effect") for clarity.

(Based on your team's feedback about aligning suggestions with indentation style, the fix preserves the existing list formatting.)

Prompt for AI agents
Address the following comment on docs/customize/browser/all-parameters.mdx at line 32:

<comment>Fix grammar in the added docs line: use &quot;an&quot; before `executable_path` and &quot;affect&quot; (not &quot;effect&quot;) for clarity.

(Based on your team&#39;s feedback about aligning suggestions with indentation style, the fix preserves the existing list formatting.)</comment>

<file context>
@@ -31,6 +29,7 @@ mode: &quot;wide&quot;
   - Use list like `[&#39;*.google.com&#39;, &#39;https://example.com&#39;, &#39;chrome-extension://*&#39;]`
 - `enable_default_extensions` (default: `True`): Load automation extensions (uBlock Origin, cookie handlers, ClearURLs)
 - `cross_origin_iframes` (default: `False`): Enable cross-origin iframe support (may cause complexity)
+- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If we have a `executable_path` set, it will be automatically set to `True`. This can effect your download behavior.
 
 ## User Data &amp; Profiles
</file context>
Suggested change
- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If we have a `executable_path` set, it will be automatically set to `True`. This can effect your download behavior.
- `is_local` (default: `True`): Whether this is a local browser instance. Set to `False` for remote browsers. If an `executable_path` is set, it will be automatically set to `True`. This can affect your download behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant