fix(browser): inject --no-sandbox via cmd_parts instead of AGENT_BROWSER_CHROME_FLAGS - #24930
Closed
wyv202011y wants to merge 1 commit into
Closed
Conversation
…SER_CHROME_FLAGS agent-browser 0.26+ no longer honours the AGENT_BROWSER_CHROME_FLAGS environment variable. The old approach of setting: browser_env["AGENT_BROWSER_CHROME_FLAGS"] = "--no-sandbox --disable-dev-shm-usage" was silently ignored, causing the sandbox bypass to fail on systems that need --no-sandbox (root, AppArmor userns-restricted systems). Fix: inject --args directly into cmd_parts before the --json flag, bypassing the env-var mechanism entirely. Each flag gets its own element in the list, matching agent-browser's CLI argument parser.
Collaborator
|
Related: This enters a crowded field of competing PRs for the same |
Contributor
|
Closing in favor of PR #25988, which uses the env-var approach from @Jaggia's #24821. Your diagnosis was correct — |
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.
agent-browser 0.26+ no longer honours the
AGENT_BROWSER_CHROME_FLAGSenvironment variable. The old approach of settingbrowser_env["AGENT_BROWSER_CHROME_FLAGS"] = "--no-sandbox --disable-dev-shm-usage"was silently ignored, causing the sandbox bypass to fail on systems that need--no-sandbox(root, AppArmor userns-restricted systems).Fix: inject
--argsdirectly intocmd_partsbefore the--jsonflag, bypassing the env-var mechanism entirely. Each flag gets its own element in the list, matching agent-browser's CLI argument parser.Also removes
--disable-dev-shm-usagewhich is no longer needed and was causing issues with agent-browser's argument parsing.