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

Error: Failed to launch the browser process #842

Closed
GWLGT opened this issue Jan 20, 2025 · 3 comments
Closed

Error: Failed to launch the browser process #842

GWLGT opened this issue Jan 20, 2025 · 3 comments

Comments

@GWLGT
Copy link

GWLGT commented Jan 20, 2025

Describe the bug
So i install Mermaid-CLI globally on my system (Arch Linux) using npm, when i type mmdc -h, it shows the help page, but when try to "Compile" my .mmd file, which just this:

graph TD
  A --> B

using mmdc -i test.mmd -o test.png
it show me this error:

Error: Failed to launch the browser process! spawn /home/gwlt/.cache/puppeteer/chrome-headless-shell/linux-131.0.6778.204/chrome-headless-shell-linux64/chrome-headless-shell ENOENT


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at ChildProcess.onClose (file:///home/gwlt/node_modules/@puppeteer/browsers/lib/esm/launch.js:303:24)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

To Reproduce
Steps to reproduce the behavior:

  1. Install Chromium

Expected behavior
It should works when i install Chromium, but, the same

Screenshots

Desktop (please complete the following information):

  • OS: Arch Linux (PRoot)
  • Browser chromium
  • Version 101.0.4951.41-1

Smartphone (please complete the following information):

  • Device: Infinix Smart 5
  • OS: Android 11
  • Browser Chrome
  • Version 132.0.6834.79

Additional context
I currently does not have GUI environment

@aloisklink
Copy link
Member

Can you try running npm rebuild puppeteer --verbose?

It looks like /home/gwlt/.cache/puppeteer/chrome-headless-shell/linux-131.0.6778.204/chrome-headless-shell-linux64/chrome-headless-shell doesn't exist, which means that the Puppeteer install script failed. This could be due to a temporary issue with your internet connection, but since you're on Android, I suspect it might also be that Puppeteer doesn't officially support your CPU architecture or operating system.

If the above script doesn't work, you'll probably need to install your own version of Chromium/Firefox, then write a custom puppeteerConfig.json file that points to it!


#777 (comment) might also help, it's instructions on how to get Puppeteer working on Termux on Android.

@GWLGT GWLGT closed this as completed Jan 20, 2025
@GWLGT
Copy link
Author

GWLGT commented Jan 20, 2025

I don't know man, doesn't work either, i may use Graphviz for my documentation OR, use markor markdown editor, which surprisingly supports for mermaid syntax, not the latest mermaid version, but, still work

@aloisklink
Copy link
Member

If you have access to a web browser, both https://mermaid.live/ and https://www.mermaidchart.com/play could work too, and they should have the newest versions of Mermaid.

I don't think you need internet connection for them after everything is loaded (you can even run mermaid.live locally, since it's open-source), but I think you might need internet connection to download a .png file.

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

2 participants