wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
797 stars 351 forks source link

armv7l: Failed to launch the browser process! #171

Open atubo2012 opened 3 years ago

atubo2012 commented 3 years ago
npm start

node : v14.16.0 Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

The following error occur

07:25:57 VERB PuppetPuppeteer initWatchdogForScan()
07:25:57 VERB Puppet setMemory()
07:25:57 VERB Wechaty initPuppetEventBridge(Puppet#0<PuppetPuppeteer>(ding-dong-bot))
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(login) (listenerCount:1) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(logout) (listenerCount:1) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(message) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(scan) (listenerCount:1) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(dirty) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(dong) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(error) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(heartbeat) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(ready) (listenerCount:0) registering...
07:25:57 VERB Wechaty initPuppetEventBridge() puppet.on(reset) (listenerCount:0) registering...
07:25:57 VERB Wechaty wechatifyUserModules(Puppet#0<PuppetPuppeteer>(ding-dong-bot))
07:25:57 VERB PuppetPuppeteer start() with ding-dong-bot
07:25:57 VERB StateSwitch <PuppetPuppeteer> on(pending) <- (false)
07:25:57 VERB PuppetPuppeteer initBridge()
07:25:57 VERB PuppetPuppeteerBridge start()
07:25:57 VERB StateSwitch <PuppetPuppeteerBridge> on(pending) <- (false)
07:25:57 VERB PuppetPuppeteerBridge initBrowser()
07:25:57 VERB PuppetPuppeteerBridge initBrowser() with options={"args":["--audio-output-channels=0","--disable-default-apps","--disable-extensions","--disable-translate","--disable-gpu","--disable-setuid-sandbox","--disable-sync","--hide-scrollbars","--mute-audio","--no-sandbox"],"headless":true}
07:25:57 ERR PuppetPuppeteerBridge start() exception: Error: Failed to launch the browser process!
/root/workspace/wctest/wechaty-getting-started/node_modules/puppeteer/.local-chromium/linux-848005/chrome-linux/chrome: 1: /root/workspace/wctest/wechaty-getting-started/node_modules/puppeteer/.local-chromium/linux-848005/chrome-linux/chrome: Syntax error: ")" unexpected

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

07:25:57 VERB StateSwitch <PuppetPuppeteerBridge> off(true) <- (false)
07:25:57 ERR PuppetPuppeteer initBridge() exception: Failed to launch the browser process!
/root/workspace/wctest/wechaty-getting-started/node_modules/puppeteer/.local-chromium/linux-848005/chrome-linux/chrome: 1: /root/workspace/wctest/wechaty-getting-started/node_modules/puppeteer/.local-chromium/linux-848005/chrome-linux/chrome: Syntax error: ")" unexpected

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

07:25:57 VERB PuppetPuppeteerBridge stop()
07:25:57 ERR PuppetPuppeteer initBridge() this.bridge.stop() rejection: Error: no page
07:25:57 ERR PuppetPuppeteer start() exception: Error
Error: 
    at PuppetPuppeteer.<anonymous> (/root/workspace/wctest/wechaty-getting-started/node_modules/wechaty/src/wechaty.ts:440:32)
    at PuppetPuppeteer.emit (events.js:315:20)
    at PuppetPuppeteer.EventEmitter.emit (domain.js:467:12)
    at PuppetPuppeteer.start (/root/workspace/wctest/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/src/puppet-puppeteer.ts:201:12)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Wechaty.start (/root/workspace/wctest/wechaty-getting-started/node_modules/wechaty/src/wechaty.ts:691:7)
07:25:57 ERR Wechaty start() exception: 
07:25:57 ERR StarterBot Error
huan commented 3 years ago

Try:

atubo2012 commented 3 years ago

Maybe the arm64 is not supported by chromium

huan commented 3 years ago

Yes, you need to not dependency wechaty-puppet-wechat on raspberry pi, because it has issues.

I'll remove the dependencies of wechaty-puppet-wechat in the wechaty because puppeteer is not pure-js.

shirubei commented 3 years ago

according to this page, puppeteer's browser might not work under Raspberry's ARM arch. https://github.com/puppeteer/puppeteer/issues/4249 Since I'm completely new to node.js and don't know which file to modify , and the necessory processs such recompile etc., would you please make it done.