Give us a script that we could use in the target environment that would tell us if Playwright will work there of point to the missing dependencies, libraries or arguments we need to pass into it.
Categorization of linked bugs:
The scope of this bug:
In addition to finding missing dependencies, this tool can also check for OS compatibility: eg. Firefox needs Ubuntu 18+. For example: #2738.
Maybe WebKit on Heroku which crashes is also caused by not having all the dependencies installed:
https://github.com/mxschmitt/heroku-playwright-buildpack/issues/2
We can try it out once its ready.
Sandbox issues happen occasionally in different linux environments when launching Chromium. Notably:
root users in Linux (happens a lot in Docker as well).travis.yml).While tackling sandboxing, our users face with the following issues:
Protocol error (Target.setAutoAttach): Target closed. that doesn't surface sandboxing issue. #1887args launch arguments for Chromium that doesn't port to other browsers. As a result, using the same launch options for webkit crashes webkit.We considered running Chromium with --no-sandbox by default, or auto-detecting docker and adding --no-sandbox in docker only. Both are very strong measures: there are services that start containers with a nice seccomp profile (e.g. Circle CI) that we don't want to regress.
Instead, we suggest the following:
root, auto-add --no-sandbox there and print a warning into the terminal.chromiumSandbox launch option instead of asking users to run with args: ['--no-sandbox']@aslushnikov for Heroku we need also the --no-sandbox flag but on their environments it's not running as root.
Any way of detecting a not functional sandbox in such a case? (Since in your PR we add the parameter only if user ID is 0)
Any way of detecting a not functional sandbox in such a case?
@mxschmitt The only reliable way for me so far was running Chromium and seeing if it crashes =/ I'd like to look into Heroku to see what happens there - would I be able to do it on a free account? Can i SSH into their environment?
Any way of detecting a not functional sandbox in such a case?
@mxschmitt The only reliable way for me so far was running Chromium and seeing if it crashes =/ I'd like to look into Heroku to see what happens there - would I be able to do it on a free account? Can i SSH into their environment?
@aslushnikov sure, can you ping me via Slack? "Max Schmitt" thanks!
Most helpful comment
Sandboxing Chromium on Linux
Sandbox issues happen occasionally in different linux environments when launching Chromium. Notably:
rootusers in Linux (happens a lot in Docker as well).travis.yml).While tackling sandboxing, our users face with the following issues:
Protocol error (Target.setAutoAttach): Target closed.that doesn't surface sandboxing issue. #1887argslaunch arguments for Chromium that doesn't port to other browsers. As a result, using the same launch options for webkit crashes webkit.We considered running Chromium with
--no-sandboxby default, or auto-detecting docker and adding--no-sandboxin docker only. Both are very strong measures: there are services that start containers with a nice seccomp profile (e.g. Circle CI) that we don't want to regress.Instead, we suggest the following:
root, auto-add--no-sandboxthere and print a warning into the terminal.chromiumSandboxlaunch option instead of asking users to run withargs: ['--no-sandbox']