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

Could not find Chromium (rev. 1108766) #671

Open
raffaem opened this issue Mar 24, 2024 · 8 comments
Open

Could not find Chromium (rev. 1108766) #671

raffaem opened this issue Mar 24, 2024 · 8 comments

Comments

@raffaem
Copy link

raffaem commented Mar 24, 2024

Describe the bug

Install with:

sudo npm install -g @mermaid-js/mermaid-cli

Get warning about puppeteer at install:

npm WARN deprecated puppeteer@19.11.1: < 21.8.0 is no longer supported

Create input.mmd as:

flowchart LR
  A-->B

Launch

mmdc -i input.mmd -o input.png

Get

➜  mmdc -i input.mmd -o input.png

Error: Could not find Chromium (rev. 1108766). This can occur if either
 1. you did not perform an installation before running the script (e.g. `npm install`) or
 2. your cache path is incorrectly configured (which is: /home/raffaele/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:263:27)
    at ChromeLauncher.executablePath (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:176:25)
    at ChromeLauncher.computeLaunchArguments (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:93:37)
    at async ChromeLauncher.launch (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:57:28)
    at async run (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:404:19)
    at async cli (file:///usr/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:184:3)

[ble: exit 1]

Same error as #650, but I don't have a "mermaid" software as described in the workaround that that OP used

To Reproduce

See above

Expected behavior

Should produce PNG file.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Arch Linux
  • Browser [e.g. chrome, safari] Firefox and Chromium
  • Version [e.g. 22]
@raffaem
Copy link
Author

raffaem commented Mar 24, 2024

Downgrading to 9.1.7 with:

sudo npm install -g @mermaid-js/mermaid-cli@9.1.7

makes mmdc work again.

@saiwing-yeung
Copy link

Same issue for me. Downgrading to 9.1.7 also worked.

@raffaem
Copy link
Author

raffaem commented Apr 28, 2024

Still same issue. @mermaid-js any ideas?

@aloisklink
Copy link
Member

Still same issue. https://github.com/mermaid-js any ideas?

If you run npm install @mermaid-js/mermaid-cli (without sudo) are there any errors shown?

Note

Running npm install @mermaid-js/mermaid-cli without the -g flag will install it only in the current folder.

Puppeteer v19.0.0 now downloads Chromium into the ~/.cache/puppeteer folder by default. It's possible that this folder cannot be written/loaded from (e.g. if you used sudo, and that folder is now locked to the admin user only).

Deleting the ~/.cache/puppeteer folder and rerunning npm install @mermaid-js/mermaid-cli might help!

You can also try reading https://pptr.dev/troubleshooting#could-not-find-expected-browser-locally to download puppeteer into a different folder using PUPPETEER_CACHE_DIR=~/my-folder-to-download-puppeteer-tocd

@hamad12a
Copy link

hamad12a commented May 18, 2024

I need to convert a markdown mermaid file contains latex expressions, so only the recent version supports latex.
I keep receiving Error: Could not find Chromium (rev. 1108766).

@terra-nova
Copy link

I need to convert a markdown mermaid file contains latex expressions, so only the recent version supports latex. I keep receiving Error: Could not find Chromium (rev. 1108766).

The cause of the error seems to be that that specific revision is no longer available at Google (HTTP status code 404):

npm error ERROR: Failed to set up Chromium r1108766! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm error Error: Download failed: server returned code 404. URL: https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip

@MindaugasLaganeckas
Copy link
Member

If you hit this link from your browser https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip then you see that the file is there. Just tried it seconds ago.

@terra-nova
Copy link

If you hit this link from your browser https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip then you see that the file is there. Just tried it seconds ago.

Yes, you are right. I fell victim to an issue in Pupeteer when running behind a HTTP proxy (puppeteer/puppeteer#10575).

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

No branches or pull requests

6 participants