fix: detect Chrome's "already in use" profile-lock wording#44
Merged
Conversation
When the user's Chrome is open, launchPersistentContext fails with "Opening in existing browser session ... profile is already in use", which the lock heuristic didn't match. The companion then fell through to the bundled-Chromium fallback (same locked dir, second confusing error) instead of telling the user to quit Chrome. Match that wording so a locked profile yields the single actionable "quit Chrome / use --fresh / --cdp" message and skips the dead-end fallback.
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.
Why
Real run with Chrome open:
launchPersistentContextfails withOpening in existing browser session … profile is already in use by another instance of Chromium. The lock heuristic didn't match that phrasing, so the companion fell through to the bundled-Chromium fallback (same locked dir → a second, more confusing error) instead of telling the user to quit Chrome.What
Match Chrome's actual wording (
opening in existing browser session,already in use,in use by another) so a locked profile yields the single actionable "quit Chrome / use--fresh/--cdp" message and skips the dead-end fallback.Follow-up to #43.
🤖 Generated with Claude Code