open-wa / wa-automate-docker

💬 🤖 The easiest way to turn your WhatsApp into an API. Be sure to 🌟 this repository for updates!
106 stars 31 forks source link

Package 'google-chrome-stable' has no installation candidate #35

Closed ahmeaqas closed 2 years ago

ahmeaqas commented 2 years ago

I tried to build image from legacy docker file as buildin image works on x86 platforms.

I change [arch=amd64] to [arch=armv7l] in the following line, as I am trying to build it on one of my spare Raspberry Pi 2 lying around.

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list

It is giving an error as follows;

E: Package 'google-chrome-stable' has no installation candidate

May someone help in this regard?

smashah commented 2 years ago

@HobbytronicsPK because google chrome does not have an arm version. This issue is also present in m1 macbooks.

ahmeaqas commented 2 years ago

So what will be the solution?

Can it not use Chromium Web Browser? As it is dependent upon puppeteer and puppeteer does work on a Raspberry Pi.

smashah commented 2 years ago

install node, then try this:

> mkdir wa
> cd wa
> npm i  @open-wa/wa-automate
> npx @open-wa/wa-automate --ras-pi
ahmeaqas commented 2 years ago

install node, then try this:

> mkdir wa
> cd wa
> npm i  @open-wa/wa-automate
> npx @open-wa/wa-automate --ras-pi

I tried this but it throws an error.

`✖ Error Failed to launch the browser process! /home/pi/docker/wa/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: 1: /home/pi/docker/wa/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: Syntax error: redirection unexpected

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md Error: Failed to launch the browser process! /home/pi/docker/wa/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: 1: /home/pi/docker/wa/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: Syntax error: redirection unexpected

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

ahmeaqas commented 2 years ago

npx @open-wa/wa-automate --ras-pi --useChrome command resolved the issue

ahmeaqas commented 2 years ago

Now the only issue is, to keep the session open, if terminal is closed or Ctrl + C is pressed to free the terminal up.

ahmeaqas commented 2 years ago

managed auto reboot with pm2 + sh script + delay. Information can be found in Autostart @open-wa/wa-automate on Raspberry Pi using pm2.