Skip to content
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

--database flag is now required for crashpad handler in Chrome 128.0.6613 #649

Open
davide-alghi opened this issue Sep 2, 2024 · 15 comments

Comments

@davide-alghi
Copy link

chrome-php fails with the latest version of Google Chrome (128.0.6613.113)

2024-09-02 07:11:19.3271 [error][] - Chrome process stopped before startup completed. Additional info: mkdir: cannot create directory '/var/www/.local': Permission denied touch: cannot touch '/var/www/.local/share/applications/mimeapps.list': No such file or directory chrome_crashpad_handler: --database is required Try 'chrome_crashpad_handler --help' for more information. [11780:11780:0902/071119.313895:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104) RuntimeException: Chrome process stopped before startup completed. Additional info: mkdir: cannot create directory '/var/www/.local': Permission denied touch: cannot touch '/var/www/.local/share/applications/mimeapps.list': No such file or directory chrome_crashpad_handler: --database is required Try 'chrome_crashpad_handler --help' for more information.

@siwa-ddiesenreither
Copy link

siwa-ddiesenreither commented Sep 2, 2024

Same issue for me:

Chrome process stopped before startup completed. Additional info: chrome_crashpad_handler: --database is required Try 'chrome_crashpad_handler --help' for more information. [3348:3348:0902/132920.572347:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)

Using chromium (128.0.6613.113-1~deb12u1)

@enricodias
Copy link
Member

enricodias commented Sep 3, 2024

@davide-alghi check issue #401.

@siwa-ddiesenreither check issue #394.

@maxiwheat
Copy link

maxiwheat commented Sep 3, 2024

@enricodias I don’t get why the update to Chromium 128 is causing this issue ? We run this in an Alpine docker container since a while without issues, and now with this new version of Chrimium we get the same error message as @siwa-ddiesenreither (which does not help very much)

I tried to do what's suggested in issue #394 and it does not work, those folders/files do not even exists in the container.

@enricodias
Copy link
Member

@maxiwheat I don't know what changed on chrome to make this an issue again, but there are a few other solutions in this issue that you can try.

@davide-alghi
Copy link
Author

@enricodias
Copy link
Member

Ok, this seems to be a new issue. I'm not sure if we should just mention it in the readme or tweak the code to use a default crashpad path when running on linux, probably inside the /tmp folder 🤔

@enricodias enricodias reopened this Sep 4, 2024
@enricodias enricodias changed the title Problems with Google Chrome 128.0.6613.113 --database flag is now required for crashpad handler in Chrome 128.0.6613 Sep 4, 2024
@maxiwheat
Copy link

@enricodias ok tnx maybe here's the prob and the fix

https://indocoding.vesocial.com/dev/new-version-of-chrome-broke-chrom-php-headless-chromium

@siwa-ddiesenreither @maxiwheat

The provided solution in this link does not work for me. The actual fix that finally worked is the one posted previously by @enricodias referirng the comment here: puppeteer/puppeteer#11023 (comment)

@adis0308
Copy link

adis0308 commented Sep 8, 2024

A simple solution that you can do is to create a crashpad folder and disable it with customFlags.

  1. Create a crashpad folder:
sudo mkdir -p /home/www/.config/google-chrome/Crashpad
sudo chown -R www-data:www-data /home/www/.config
  1. Disable crash reporter with customFlags:
    --no-sandbox --disable-dev-shm-usage --disable-gpu --headless --disable-crash-reporter --no-crashpad

@DenysSokolovBack
Copy link

DenysSokolovBack commented Sep 9, 2024

A simple solution that you can do is to create a crashpad folder and disable it with customFlags.

  1. Create a crashpad folder:
sudo mkdir -p /home/www/.config/google-chrome/Crashpad
sudo chown -R www-data:www-data /home/www/.config
  1. Disable crash reporter with customFlags:
    --no-sandbox --disable-dev-shm-usage --disable-gpu --headless --disable-crash-reporter --no-crashpad

Working for me #394 (comment)

sudo mkdir -p /var/www/.config/google-chrome/Crashpad
sudo chown -R www-data:www-data /var/www/.config

@CrazyVito11
Copy link

For some reason it has to specifically be in the /var/www/.config directory, as the directory I set with --crash-dumps-dir=/tmp/chrome-crashpad seems to be ignored.

This used to work fine until the recent Chromium update, so I guess it might be a bug in Chromium itself?

@namosdjoro7
Copy link

namosdjoro7 commented Oct 2, 2024

any news?
How could we configure crashpad database?

$browser = $browserFactory->createBrowser([
                'headless' => true,
                'customFlags' => [
                    '--disable-crashpad',
                    '--disable-dev-shm-usage',
                    '--disable-gpu',
                    '--headless',
                    '--disable-software-rasterizer',
                    '--no-sandbox',
                    '--crash-dumps-dir=/var/www/.config'
                ],
            ]); 

This config does not work

@jeandanyel
Copy link

Same issue for me:

image

/srv/app # chromium-browser --version
Chromium 128.0.6613.119 Alpine Linux

@NJPod
Copy link

NJPod commented Oct 10, 2024

Discovered this issue this week. What is weird is that running our container image locally doesn't have this issue but in AWS Fargate it craps out. I tried setting the XDG_CONFIG_HOME and XDG_CACHE_HOME env variables to use a tmp folder but it didn't seem to work. In the end I just created the .config folder when building the docker image.

@jeandanyel
Copy link

Hello @NJPod,

I’m experiencing the same issue. It works perfectly fine locally but fails in production on DigitalOcean's App Platform.

Could you share the command you added to create the .config folder when building the Docker image?

Thanks!

@NJPod
Copy link

NJPod commented Oct 11, 2024

Hello @NJPod,

I’m experiencing the same issue. It works perfectly fine locally but fails in production on DigitalOcean's App Platform.

Could you share the command you added to create the .config folder when building the Docker image?

Thanks!

RUN CHROME_DIRS="/var/www/.local /var/www/.config /var/www/.cache /var/www/.pki" && \
    mkdir -p ${CHROME_DIRS} && \
    chown www-data ${CHROME_DIRS}

This also covers some warnings I was seeing whilst debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

10 participants