-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Cannot execute chrome for testing in read only docker "--database is required" #11023
Comments
@furstenheim-goodnotes could you try a non-slim image? I assume the slim one is based on the Alpine image? |
@thiagowfx is it something for the CfT? |
@OrKoN sure, which one do you want me to try? |
@furstenheim-goodnotes the |
|
@furstenheim-goodnotes ah sorry, what does actually |
Is there a way to run this in a read only environment? Chromium was running in such a way before (installing it with apt-get update...). It's better from a security perspective. |
@furstenheim-goodnotes not sure, there should be no differences between Chrome and Chrome for Testing that would affect the behaviour here. Perhaps, the apt-get version creates a user data dir at the build time? Also, the --headless mode might run. |
Using
|
Does adding |
Thanks @OrKoN, making .config also readable works. |
Great, so I don't think we are able to change this behaviour here and I am not sure Chrome would support a readonly mode. Consider filing a crbug.com if you want this feature. |
https://chromium.googlesource.com/chromium/src/+/457b3daf6fdbb82bbb3e29f4da806b1d48c723b1 could be related:
|
We got this to work by setting in the environment:
|
I encountered a problem similar to this, and the culprit turned out to be this bug: Upgrading to a fixed version of Docker made it work again. |
If anyone is coming to this issue because they encounter a Puppeteer/Chrome issue with the --database flag when running CI/CD on a Jenkins Pipeline + Docker on a linux host, then the solution from @sfc-gh-selee works. In my case:
|
@sfc-gh-selee thank you so much! 👍 |
@agrinko
In this command, both This can be useful in a number of scenarios. For example, if you're running Chromium in a Docker container, you might want to store these files in a temporary directory that gets cleaned up when the container is stopped. Or, you might want to isolate the Chromium files from the rest of your system for testing or debugging purposes. |
Steps to reproduce
Dockerfile:
In the terminal:
Expected results
I should be able to run the browser. Before chrome testing, I was using chromium and it was possible.
Actual results
I get the following error
The text was updated successfully, but these errors were encountered: