dokkaner / teemii

A versatile, self-hosted manga reader and manager with extensible agent-based metadata retrieval
https://www.teemii.io
MIT License
308 stars 19 forks source link

Puppeteer unable to launch chromium process on arm64 #37

Open dokkaner opened 9 months ago

dokkaner commented 9 months ago

Description

If the host has an arm64 processor, Puppetteer cannot launch the browser.

Version

all

Steps to Reproduce

During cover or chapter retrieval

Screenshots

No response

Logs

"err":{
   "type":"Error",
   "message":"Failed to launch the browser process!  /root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: 36: Syntax error: \"(\" unexpected (expecting \")\")      TROUBLESHOOTING: https://pptr.dev/troubleshooting  ",
   "stack":"Error: Failed to launch the browser process!  /root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: 36: Syntax error: \"(\" unexpected (expecting \")\")      TROUBLESHOOTING: https://pptr.dev/troubleshooting        at Interface.onClose (/app/node_modules/@puppeteer/browsers/lib/cjs/launch.js:277:24)      at Interface.emit (node:events:526:35)      at Interface.close (node:internal/readline/interface:527:10)      at Socket.onend (node:internal/readline/interface:253:10)      at Socket.emit (node:events:526:35)      at endReadableNT (node:internal/streams/readable:1376:12)      at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"
},

Platform

desktop

Device

n/a

Operating System

Ubuntu

Browser

n/a

Additional Context

No response

Code of Conduct

sannidhyaroy commented 5 months ago

I'm facing the same issue on my Raspberry Pi 4 as well, while no such issue on my Vultr Instance (running on Xeon), so I can confirm this issue is specific to arm64.

sannidhyaroy commented 5 months ago

In the Puppeteer Troubleshooting page under the Chrome doesn't launch on Linux section, there is this caution that says:

Chrome currently does not provide arm64 binaries for Linux. There are only arm64 binaries for Mac ARM. That means that Linux binaries downloaded by default will not work on Linux arm64.

Since, Chrome isn't available for ARM chipsets, the alternative seems to be using Chromium that is available for ARM and then tell Puppeteer to skip installing Chrome and use Chromium instead that we downloaded. This is what I understood from reading the Troubleshooting page of Puppeteer.

I think you might take a look at both of these links as they might help somewhat with this issue: