make chrome perm flow work w multiple profiles#47
Open
laithrw wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/browser-use-agent/src/prompts/mod.rs">
<violation number="1" location="crates/browser-use-agent/src/prompts/mod.rs:188">
P2: Case B instruction order is contradictory: one section says run `browser local setup` first, another says run `browser local profiles` before the chrome://inspect flow.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| " 2. After they confirm, retry `browser connect local`. If it still 403s, suggest they bring each Chrome window to the front in turn until they spot the popup, or close all but one Chrome window and try again.\n\n", | ||
| "Profile selection — when to run `browser local profiles`:\n", | ||
| " • Case A handles it immediately after launching Chrome (step A.2).\n", | ||
| " • Cases B and C: Chrome was already running on entry, so run `browser local profiles` as soon as you hit the case (before the chrome://inspect dance or the popup hand-holding). Same rule: if multiple profiles, ASK the user which to use and wait. If only one, proceed silently.\n", |
There was a problem hiding this comment.
P2: Case B instruction order is contradictory: one section says run browser local setup first, another says run browser local profiles before the chrome://inspect flow.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/browser-use-agent/src/prompts/mod.rs, line 188:
<comment>Case B instruction order is contradictory: one section says run `browser local setup` first, another says run `browser local profiles` before the chrome://inspect flow.</comment>
<file context>
@@ -167,15 +167,30 @@ pub fn browser_mode_instruction(mode: &str) -> String {
+ " 2. After they confirm, retry `browser connect local`. If it still 403s, suggest they bring each Chrome window to the front in turn until they spot the popup, or close all but one Chrome window and try again.\n\n",
+ "Profile selection — when to run `browser local profiles`:\n",
+ " • Case A handles it immediately after launching Chrome (step A.2).\n",
+ " • Cases B and C: Chrome was already running on entry, so run `browser local profiles` as soon as you hit the case (before the chrome://inspect dance or the popup hand-holding). Same rule: if multiple profiles, ASK the user which to use and wait. If only one, proceed silently.\n",
+ " • Connecting succeeded on the first `browser connect local` (no case A/B/C entered): still run `browser local profiles` before any `browser_script` page work and ask if there's more than one.\n\n",
+ "What to DO with the chosen profile (this is the part you must not skip):\n",
</file context>
Suggested change
| " • Cases B and C: Chrome was already running on entry, so run `browser local profiles` as soon as you hit the case (before the chrome://inspect dance or the popup hand-holding). Same rule: if multiple profiles, ASK the user which to use and wait. If only one, proceed silently.\n", | |
| " • Cases B and C: Chrome was already running on entry, so run `browser local profiles` as soon as you hit the case (before retrying `browser connect local`; for case C also before popup hand-holding). Same rule: if multiple profiles, ASK the user which to use and wait. If only one, proceed silently.\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Improve Local Chrome connection flow to work reliably with multiple profiles. Adds clear routing for permission and connection states so the right window gets the "Allow remote debugging?" prompt.
permission-blocked/403).browser local profilesand wait for selection (on launch, in cases B/C, and before page work if already connected).shellusing--profile-directory, with OS-specific commands.chrome://inspect/#remote-debuggingwhenbrowser_running: trueandremote_debugging_enabled: false.Written for commit e1c72c5. Summary will update on new commits.