open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.05k stars 588 forks source link

Failed to launch browser process arm64 #3018

Open fejorca opened 1 year ago

fejorca commented 1 year ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

EASY API/CLI

Current Behavior

Hi, I'm trying open-wa using an instance on oracle cloud, it's a ampered based instance and I've tested open-wa with good results but when I create a new docker instance and pull the latest version it shows an error wheres the browser process failed to launch.

Expected Behavior

Should launch browser

Steps To Reproduce

  1. On oracle ampere instance, start wa-automate with the default parameters
  2. After initial configuration on terminal shows the browser process failed to launch error

create() code OR full CLI command + CONFIG

docker run -p 2234:8002 --init openwa/wa-automate --socket --multi-device --keep-alive --verbose

DEBUG INFO

Starting the application
Using version: latest
./node_modules/@open-wa/wa-automate/bin/server.js --in-docker --qr-timeout 0 --popup --debug --force-port --socket --multi-device --keep-alive --verbose

up to date, audited 1094 packages in 3s

99 packages are looking for funding
  run `npm fund` for details

18 vulnerabilities (6 moderate, 9 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 9.2.0 -> 9.3.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.3.0>
npm notice Run `npm install -g npm@9.3.0` to update!
npm notice
info: Set up logging for console  {"timestamp":"2023-01-16T17:45:47.604Z"}
info: Config undefined is directory: true {"timestamp":"2023-01-16T17:45:47.609Z"}
info: Checking exists: /config/cli.config.json {"timestamp":"2023-01-16T17:45:47.609Z"}
info: Checking exists: /config/cli.config.js {"timestamp":"2023-01-16T17:45:47.611Z"}
info: Checking exists: cli.config.json {"timestamp":"2023-01-16T17:45:47.612Z"}
info: Checking exists: cli.config.js {"timestamp":"2023-01-16T17:45:47.612Z"}
Unable to read config file json: /config
info: Using config file: ??? {"timestamp":"2023-01-16T17:45:47.613Z"}
- session_STARTUP
info:   {"data":"","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.616Z"}
- DEBUG - PORT: 8002
info: DEBUG - PORT: 8002  {"data":"DEBUG - PORT: 8002","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.617Z"}
- DEBUG - flags: {"sessionId":"session","executablePath":"/usr/bin/google-chrome","popup":true,"disableSpins":true,"cliConfig":"/config","useChrome":true,"inDocker":true,"qrTimeout":0,"debug":true,"forcePort":true,"socket":true,"multiDevice":true,"keepAlive":true,"verbose":true,"noApi":false,"forceUpdateCwWebhook":false,"port":8002,"host":"localhost","ef":["qr","STARTUP","MD_DETECT"],"allowSessionDataWh":false,"generateApiDocs":true,"sessionDataOnly":false,"skipSavePostmanCollection":false,"headful":false,"preAuthDocs":false,"stats":false,"noKillOnLogout":false,"cors":false,"emitUnread":false,"allowIps":[],"logging":[{"type":"console","done":true}]}
info: DEBUG - flags: {"sessionId":"session","executablePath":"/usr/bin/google-chrome","popup":true,"disableSpins":true,"cliConfig":"/config","useChrome":true,"inDocker":true,"qrTimeout":0,"debug":true,"for...[TRUNCATED]... {"data":"DEBUG - flags: {\"sessionId\":\"session\",\"executablePath\":\"/usr/bin/google-chrome\",\"popup\":true,\"disableSpins\":true,\"cliConfig\":\"/config\",\"useChrome\":true,\"inDocker\":true,\"qrTimeout\":0,\"debug\":true,\"for...[TRUNCATED]...","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.618Z"}
- DEBUG - env vars: {"WA_EXECUTABLE_PATH":"/usr/bin/google-chrome","WA_POPUP":"true","WA_DISABLE_SPINS":"true","WA_CLI_CONFIG":"/config","WA_USE_CHROME":"true"}
info: DEBUG - env vars: {"WA_EXECUTABLE_PATH":"/usr/bin/google-chrome","WA_POPUP":"true","WA_DISABLE_SPINS":"true","WA_CLI_CONFIG":"/config","WA_USE_CHROME":"true"}  {"data":"DEBUG - env vars: {\"WA_EXECUTABLE_PATH\":\"/usr/bin/google-chrome\",\"WA_POPUP\":\"true\",\"WA_DISABLE_SPINS\":\"true\",\"WA_CLI_CONFIG\":\"/config\",\"WA_USE_CHROME\":\"true\"}","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.620Z"}
- Launching EASY API
info: Launching EASY API  {"data":"Launching EASY API","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.620Z"}
info: config:   {"PORT":8002,"cliConfig":{"allowIps":[],"allowSessionDataWh":"[REDACTED]","cliConfig":"/config","cors":false,"debug":true,"disableSpins":true,"ef":["qr","STARTUP","MD_DETECT"],"emitUnread":false,"executablePath":"/usr/bin/google-chrome","forcePort":true,"forceUpdateCwWebhook":false,"generateApiDocs":true,"headful":false,"host":"localhost","inDocker":true,"keepAlive":true,"logging":[{"done":true,"type":"console"}],"multiDevice":true,"noApi":false,"noKillOnLogout":false,"popup":true,"port":8002,"preAuthDocs":false,"qrTimeout":0,"sessionDataOnly":"[REDACTED]","sessionId":"session","skipSavePostmanCollection":false,"socket":true,"stats":false,"useChrome":true,"verbose":true},"createConfig":{"allowIps":[],"allowSessionDataWh":"[REDACTED]","cliConfig":"/config","cors":false,"debug":true,"disableSpins":true,"ef":["qr","STARTUP","MD_DETECT"],"emitUnread":false,"executablePath":"/usr/bin/google-chrome","forcePort":true,"forceUpdateCwWebhook":false,"generateApiDocs":true,"headful":false,"host":"localhost","inDocker":true,"keepAlive":true,"logging":[{"done":true,"type":"console"}],"multiDevice":true,"noApi":false,"noKillOnLogout":false,"popup":8002,"port":8002,"preAuthDocs":false,"qrTimeout":0,"sessionDataOnly":"[REDACTED]","sessionId":"session","skipSavePostmanCollection":false,"socket":true,"stats":false,"useChrome":true,"verbose":true},"timestamp":"2023-01-16T17:45:47.621Z"}
- Selected port is free
info: Selected port is free  {"data":"Selected port is free","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.640Z"}
- Generating Swagger Spec
info: Generating Swagger Spec  {"data":"Generating Swagger Spec","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:47.643Z"}
- Postman collection generated: open-wa-session.postman_collection.json
info: Postman collection generated: open-wa-session.postman_collection.json  {"data":"Postman collection generated: open-wa-session.postman_collection.json","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.041Z"}
- API collections (swagger + postman) generated successfully
info: API collections (swagger + postman) generated successfully  {"data":"API collections (swagger + postman) generated successfully","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.147Z"}
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃                                                                              ┃┃   @open-wa/wa-automate                                                       ┃┃   💬 🤖 The most reliable NodeJS whatsapp library for chatbots with          ┃┃   advanced features.                                                         ┃┃   Version: 4.55.0                                                            ┃┃   Check out the latest changes:                                              ┃┃   https://github.com/open-wa/wa-automate-nodejs#latest-changes               ┃┃                                                                              ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
info: popup port set to 8002 {"timestamp":"2023-01-16T17:45:48.273Z"}
You can also authenticate the session at: http://localhost:8002
info: You can also authenticate the session at: http://localhost:8002 {"timestamp":"2023-01-16T17:45:48.294Z"}
info: RAM INFO Total: 25.15 GB | Free: 14.72 GB {"timestamp":"2023-01-16T17:45:48.295Z"}
info: PPTR VERSION INFO 19.4.1 {"timestamp":"2023-01-16T17:45:48.297Z"}
- Starting
info: Starting  {"data":"Starting","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.298Z"}
- Version: 4.55.0
info: Version: 4.55.0  {"data":"Version: 4.55.0","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.299Z"}
- Initializing WA
info: Initializing WA  {"data":"Initializing WA","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.299Z"}
- Using custom chromium args with multi device will cause issues! Please remove them:
info: Using custom chromium args with multi device will cause issues! Please remove them:   {"data":"Using custom chromium args with multi device will cause issues! Please remove them: ","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.300Z"}
info: SCRIPT READY: jsSha.min.js 8982 {"timestamp":"2023-01-16T17:45:48.304Z"}
info: SCRIPT READY: qr.min.js 18603 {"timestamp":"2023-01-16T17:45:48.304Z"}
info: SCRIPT READY: base64.js 4173 {"timestamp":"2023-01-16T17:45:48.304Z"}
info: SCRIPT READY: hash.js 34983 {"timestamp":"2023-01-16T17:45:48.304Z"}
- Launching Browser
info: SCRIPT READY: wapi.js 79911 {"timestamp":"2023-01-16T17:45:48.305Z"}
info: SCRIPT READY: launch.js 65074 {"timestamp":"2023-01-16T17:45:48.305Z"}
info: Launching Browser  {"data":"Launching Browser","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.306Z"}
- MD Enabled, turning off incognito mode.
info: MD Enabled, turning off incognito mode.  {"data":"MD Enabled, turning off incognito mode.","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.307Z"}
- Data dir: /sessions/_IGNORE_session
info: Data dir: /sessions/_IGNORE_session  {"data":"Data dir: /sessions/_IGNORE_session","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.308Z"}
error: Given check path threw an error ENOENT: no such file or directory, access '/sessions/_IGNORE_session'  {"code":"ENOENT","errno":-2,"path":"/sessions/_IGNORE_session","stack":"Error: ENOENT: no such file or directory, access '/sessions/_IGNORE_session'","syscall":"access","timestamp":"2023-01-16T17:45:48.309Z"}
- Data dir doesnt exist, creating...: /sessions/_IGNORE_session
info: Data dir doesnt exist, creating...: /sessions/_IGNORE_session  {"data":"Data dir doesnt exist, creating...: /sessions/_IGNORE_session","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.309Z"}
info: Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
  {"data":"Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.330Z"}
error: Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
 {"timestamp":"2023-01-16T17:45:48.330Z"}
error: Error: Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

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

    at onClose (/usr/src/...[TRUNCATED]... {"timestamp":"2023-01-16T17:45:48.331Z"}
Error: Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

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

    at onClose (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:299:20)
    at ChildProcess.<anonymous> (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:293:24)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
- session_STARTUP
info:   {"data":"","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.331Z"}
- Error Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
 Error: Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

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

info: Error Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
 Error: Failed to launch th...[TRUNCATED]... {"data":"Error Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n Error: Failed to launch th...[TRUNCATED]...","eventName":"STARTUP.session","eventNamespace":"STARTUP","sessionId":"session","timestamp":"2023-01-16T17:45:48.332Z"}

Environment

- OS: 20.04
- Node: 19.4.0
- npm: 9.2.0

Screenshots/Logs

imagen

Anything else?

No response

fxmiko commented 1 year ago

3015

try checking this out, i had similar error to yours which already solved

smashah commented 1 year ago

@fejorca try this:

docker run --platform linux/arm64 -p 2234:8002 --init openwa/wa-automate --socket --multi-device --keep-alive --verbose