Skip to content

Add WASM_NO_SANDBOX env to disable Chrome sandbox#73

Closed
igolaizola wants to merge 1 commit intoagnivade:masterfrom
igolaizola:no-sandbox-env
Closed

Add WASM_NO_SANDBOX env to disable Chrome sandbox#73
igolaizola wants to merge 1 commit intoagnivade:masterfrom
igolaizola:no-sandbox-env

Conversation

@igolaizola
Copy link

On GitHub Actions (and similar CI environments), Chrome often fails to launch due to its sandbox being unavailable, resulting in the error: "No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces..."

This commit adds support for a new environment variable, WASM_NO_SANDBOX, which, when set to "on", appends chromedp.NoSandbox to the Chrome options. This allows Chrome to run without a sandbox and avoids the crash in CI pipelines that lack the necessary permissions or configurations for the standard Chrome sandbox.

On GitHub Actions (and similar CI environments), Chrome often fails to
launch due to its sandbox being unavailable, resulting in the error:
"No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux
distro that has disabled unprivileged user namespaces..."

This commit adds support for a new environment variable,
`WASM_NO_SANDBOX`, which, when set to "on", appends `chromedp.NoSandbox`
to the Chrome options. This allows Chrome to run without a sandbox and
avoids the crash in CI pipelines that lack the necessary permissions or
configurations for the standard Chrome sandbox.
@igolaizola
Copy link
Author

We finally fixed our issues by disabling AppArmor in the CI, same as proposed in this PR: #72

@agnivade
Copy link
Owner

In that case, I guess this PR is no longer needed?

@igolaizola
Copy link
Author

In that case, I guess this PR is no longer needed?

Perhaps there are other use cases where --no-sandbox is needed, but that is no longer the case for us, so I am closing this.

@igolaizola igolaizola closed this Jan 30, 2025
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.

2 participants