fix(browser): include Chrome stderr and sandbox hint in CDP startup error#29355
Merged
vincentkoc merged 5 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
Conversation
…rror (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe6e1cee40
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Contributor
Greptile SummaryThis PR improves error diagnostics when Chrome fails to start through CDP by collecting stderr output and providing actionable hints. Key changes:
Analysis:
Confidence Score: 5/5
Last reviewed commit: fe6e1ce |
…emory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355.
16 tasks
1 task
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…rror (openclaw#29355) * fix(browser): include Chrome stderr and sandbox hint in CDP startup error (openclaw#29312) When Chrome fails to start and CDP times out, the error message previously contained no diagnostic information, making it impossible to determine why Chrome couldn't start (e.g. missing --no-sandbox in containers, GPU issues, shared memory errors). This change: - Collects Chrome's stderr output and includes up to 2000 chars in the error - On Linux, if noSandbox is not set, appends a hint to try browser.noSandbox: true Closes openclaw#29312 * chore(browser): format chrome startup diagnostics * fix(browser): detach stderr listener after Chrome starts to prevent memory leak Named the anonymous listener so it can be removed via proc.stderr.off() once CDP is confirmed reachable. Also clears the stderrChunks array on success so the buffered data is eligible for GC. Fixes the unbounded memory growth reported in code review: a long-lived Chrome process emitting periodic warnings would keep appending to stderrChunks indefinitely since the listener was never removed. Addresses review comment from chatgpt-codex-connector on PR openclaw#29355. * changelog: note cdp startup diagnostics improvement --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org> Co-authored-by: 派尼尔 <painier@openclaw.ai>
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.
Problem
When Chrome fails to start and CDP times out on port 18800 (or any configured port), the error message is:
This gives users zero diagnostic information. They cannot tell if the issue is:
--no-sandboxin a container/root environment/dev/shm) too smallThis was reported in #29312 where Chrome worked fine when launched manually but failed through OpenClaw.
Fix
browser.noSandboxis not enabled, append a hint suggesting the user trybrowser.noSandbox: true(common fix for containers and root environments)Example output after fix
Testing
Closes #29312