raweee / node-red-contrib-whatsapp-link

Simple Node-Red node to link Whatsapp
https://discord.gg/VApVeGuF
30 stars 8 forks source link

Docker : Nodered crashing: Failed to launch the browser process! #10

Closed ryangonzalez133 closed 1 year ago

ryangonzalez133 commented 1 year ago

hello, when installing your node and configuring admin node, node-red closes and I get this in terminal. tarting NGinx... 16 Jan 15:12:19 - [info] [whatsappLink:Web] Status : Initializing Whatsapp.. 16 Jan 15:12:19 - [error] [e-mail in:dcf783aa2d6db19e] No e-mail userid set 16 Jan 15:12:19 - [error] [e-mail in:dcf783aa2d6db19e] No e-mail password set 16 Jan 15:12:19 - [info] Started flows 16 Jan 15:12:19 - [red] Uncaught Exception: 16 Jan 15:12:19 - [error] Error: Failed to launch the browser process! spawn /config/node-red/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome ENOENT TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md at onClose (/config/node-red/node_modules/puppeteer/src/node/BrowserRunner.ts:268:9) at ChildProcess. (/config/node-red/node_modules/puppeteer/src/node/BrowserRunner.ts:257:9) at ChildProcess.emit (node:events:513:28) at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:476:16) at processTicksAndRejections (node:internal/process/task_queues:82:21).

node-red just starts again after I restore to a previous backup

ryangonzalez133 commented 1 year ago

This is the log I get when I install the node ----------------------------------------------------------- 2023-01-16T18:24:10.094Z Install : node-red-contrib-whatsapp-link 0.1.29

2023-01-16T18:24:10.279Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-whatsapp-link@0.1.29 2023-01-16T18:24:10.785Z [err] npm 2023-01-16T18:24:10.785Z [err] WARN 2023-01-16T18:24:10.786Z [err] config production Use --omit=dev instead. 2023-01-16T18:24:20.407Z [err] npm 2023-01-16T18:24:20.407Z [err] WARN 2023-01-16T18:24:20.407Z [err] deprecated puppeteer@13.7.0: < 18.1.0 is no longer supported 2023-01-16T18:24:40.671Z [out] 2023-01-16T18:24:40.671Z [out] added 92 packages in 30s 2023-01-16T18:24:40.680Z rc=0

raweee commented 1 year ago

Brother its same, Failed to launch the browser process means unable to start chrome in background. missing lib.. You may update these libs -- $ sudo apt install -y gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

ryangonzalez133 commented 1 year ago

ok, i will test and get back to you

ryangonzalez133 commented 1 year ago

I did as you recommended, but it keeps crashing, I'm using node-red integrated into homeassistant image Any other tips?

ryangonzalez133 commented 1 year ago

image

ryangonzalez133 commented 1 year ago

@raweee could you give me a little help?

ryangonzalez133 commented 1 year ago

I think the reason for the error is that I'm using node-red built into home assistant and home assistant is on a debian host 11 console so I think it prevents chrome from opening. any alternative to resolve this?

raweee commented 1 year ago

Hi, i know WhatsappLink node req. lots of dependencies to run chrome and Puppeteer in background (because it have to emulate whatsapp web). To solve this I'm already working on a light version "whatsappLite" which use only web sockets in background. It will small in size and eat less RAM( no chrome/ Puppeteer). Hope that node 'whatsappLite' will be completed this Sunday.

ryangonzalez133 commented 1 year ago

Got it, very good idea. I tried to install chrome and puppeter directly on my machine, but the node-red integrated into the home assistant continued with an error, I didn't understand why it didn't work. I think it's not working because node-red is integrated into home assistant

raweee commented 1 year ago

As shown in line no 10 Error : fail to launch browser process means node is not able to start chrome in background. It is due to some missing system libs.

milmat72 commented 1 year ago

I have the same issue, installed via node-red in Home Assistant. I tried to re-install the node-red , but the issue persists after fresh node-red installation. Is there any way how to de-install it? Normally I would do it in node-red, but it is not running now. Thx.

ryangonzalez133 commented 1 year ago

the only way to reverse the error was to restore a more recent backup, before the error, I did it that way and it was back to normal Screenshot_2023-01-22-09-13-43-303_io homeassistant companion android

ryangonzalez133 commented 1 year ago

Hello my friend, if you need help to test whatsapp lite, you can contact me.

afcasasfranco commented 1 year ago

HI,

I have the same problem with a node-red docker installation.

The logs said that problem with puppeteer module, thats supposed contain chromium.

If node-red not work, go to the module path (node_module) and emove the directories whatsapp-web.js node-red-contrib-whatsapp-link/

With this you can recovery node red

afcasasfranco commented 1 year ago

Hi Everybody

I thing that solved the problem if you can try to make the activation by docker, maybe on HA because its the same.

docker exec -it --user=root node-red /bin/sh

` apk update

apk add --no-cache chromium --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main

rm /data/node_modules/pup peteer/.local-chromium/linux-982053/chrome-li nux/chrome

ln -s /usr/bin/chromium-b rowser /data/node_modules/puppeteer/.local-ch romium/linux-982053/chrome-linux/chrome `

raweee commented 1 year ago

Hello my friend, if you need help to test whatsapp lite, you can contact me.

WhatsApp lite will be available tomorrow in beta mode for testing.

afcasasfranco commented 1 year ago

Hello my friend, if you need help to test whatsapp lite, you can contact me.

WhatsApp lite will be available tomorrow in beta mode for testing.

Hi

Excellent, what's the WhatsApp Lite, and how can access?

ryangonzalez133 commented 1 year ago

O lite is a version that uses websocket, so it is lighter and does not need to run chrome and Puppeteer, so it is more difficult for dependency errors to occur. more or less that. it is still in development

afcasasfranco commented 1 year ago

O lite is a version that uses websocket, so it is lighter and does not need to run chrome and Puppeteer, so it is more difficult for dependency errors to occur. more or less that. it is still in development

Perfect. How can i acces?? im in

ryangonzalez133 commented 1 year ago

it is still under development, only tomorrow the developer will make it available for testing

JohnnyBreslin commented 1 year ago

Hi, Using whatsapp Lite as had same issue as others with NR under docker on Synology NAS. Lite working great except with Group messages. Showing connected but always times out but will raise this under a new thread if one does not already exist. Great work and will make alerts real easy and more accessible. Thanks, Johnny

TVEN2 commented 1 year ago

Had this issue using node-red on Raspberry Pi, was able to resolve it:

  1. sudo apt install chromium-browser chromium-codecs-ffmpeg
  2. cp /usr/bin/chromium-browser /.nodered/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux 3
  3. delete chrome in /.nodered/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux
  4. rename chromium-browser to chrome

Source