GithubHelp home page GithubHelp logo

open-wa / wa-automate-docker Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 31.0 52 KB

๐Ÿ’ฌ ๐Ÿค– The easiest way to turn your WhatsApp into an API. Be sure to ๐ŸŒŸ this repository for updates!

Dockerfile 20.62% Shell 5.63% JavaScript 73.75%
docker dockerfile wa-automate-nodejs whatsapp

wa-automate-docker's People

Contributors

buster95 avatar phaalonso avatar pschmitt avatar smashah avatar tcortega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wa-automate-docker's Issues

sendLinkWithAutoPreview API not working

I am trying to post message with sendLinkWithAutoPreview API into 15 WhatsApp groups via python code for loop, sometimes it post only in 3 groups or 4 groups and after that process get stuck and all rest all API stop working.
Note: sendText API is working fine without any issue, it post in all groups.

To get start working of other API I have to restart my docker container.

@smashah Can you please help me how to solve this?

Run easy api on background

Hi,

I have follow the instruction and the api working successfull. But how to ensure the npx is running although when i close the terminal?

Is it possible to capture QR code and save as image?

Thank you for making this wonderful library.

I would like to display QR code to my web browser, but currently it generate and display on console screen.

is it possible to export QR code as image or export as base64 to display on web browser?

Thank you !!

license-key issue

hi there
I have a license and im getting this error
License issue: Expected 1576 but this account is 2000
my license is from python but im getting errors (i have open issues)
i want to try out docker
please help

How do I find the session data base64 string?

A comment on the docker-compose.yaml file says the following:
"Uncomment next line and add the session data base64 string to authenticate the session without the need to scan it again"

I downloaded the repo's files, built and run the docker image locally on my server, and scanned the QR code for the initial authentication, Where can I find the session data, and the base64 string that's needed to autothenticate the next session automatically? I couldn't find any file that was auto-generated.

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

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?

Spawn Google Chrome ENOENT->docker

Describe the bug
i got this error when i run in docker.
i want to see the QR code in my browser so i set the popup configObject
if I running In windows this script is working perfectly,but if i deploy using docker i got this ERROR
image

Thanks for a help

create() code
This is the code Iuse to create the client. e.g

create({
    sessionId: 'customer-support',
    executablePath: '/usr/bin/chromium-browser',
    useChrome: true,
    restartOnCrash: start,
    headless: true,
    throwErrorOnTosBlock: true,
    qrTimeout: 0,   //set to 0 to wait forever for a qr scan
    authTimeout: 0, //set to 0 to wait forever for connection to phone
    killProcessOnBrowserClose: true,
    autoRefresh: true, //default to true
    safeMode: true,
    disableSpins: true,
    hostNotificationLang: NotificationLanguage.PTBR,
    viewport: {
        // width: 1920,
        height: 1200
    },
    popup: 3000,
    defaultViewport: null,
    // cacheEnabled:false,
    // devtools:true,
    //OR
    // devtools:{
    //   user:'admin',
    //   pass:'root'
    // },
    //example chrome args. THIS MAY BREAK YOUR APP !!!ONLY FOR TESTING FOR NOW!!!.
    // chromiumArgs:[
    //   '--aggressive-cache-discard',
    //   '--disable-cache',
    //   '--disable-application-cache',
    //   '--disable-offline-load-stale-cache',
    //   '--disk-cache-size=0'
    // ]
})
    .then(async client => await start(client))
    .catch(e => {
        console.log('Error', e.message);
        // process.exit();
    });```

**this Is my DockerFile**
FROM node:current-alpine

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

# Uncomment the next line to use this Dockerfile on your own app
#run npm install
RUN npm install --only=dev --ignore-scripts
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN \
    echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
    && echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
    && echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
    && apk --no-cache  update \
    && apk --no-cache  upgrade \
    && apk add --no-cache --virtual .build-deps \
    gifsicle pngquant optipng libjpeg-turbo-utils \
    udev ttf-opensans chromium \
    && rm -rf /var/cache/apk/* /tmp/*

ENV CHROME_BIN /usr/bin/chromium-browser
ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser
RUN npm install --quiet node-gyp -g
RUN npm rebuild --verbose sharp

# Copy the session data over to the container
# Bundle app source
COPY . .

EXPOSE 8080

CMD ["npm", "run", "start"]



**Screenshots**
If applicable, add screenshots to help explain your problem. Use ```headless: false``` to get screenshots



**Host (please complete the following information):**
 - OS: Windows & Ubuntu

** this Is my Docker-compose.yml**

version: "3.8"
services:

  browser:
    image: browserless/chrome:1.22-chrome-stable
    hostname: browser
    ports:
      - "3000:3000"
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        delay: 10s
      restart_policy:
        condition: on-failure
    environment:
      CONNECTION_TIMEOUT: -1
      KEEP_ALIVE: 'true'
      WORKSPACE_EXPIRE_DAYS: 1
      ENABLE_CORS: 'true'
      CHROME_REFRESH_TIME: 86400000
      DEFAULT_BLOCK_ADS: 'true'
      FUNCTION_ENABLE_INCOGNITO_MODE: 'true'
      ENABLE_XVBF: 'true'
      CHROME_PATH: '/usr/bin/google-chrome'
      USE_CHROME_STABLE: 'true'
      NODE_ENV: 'production'

  app:
    build: .
    restart: on-failure
    container_name: open_WA1
    depends_on:
      - browser
    ports:
      - "8080:8080"
    environment:
      WA_BROWSER_WS_ENDPOINT: 'http://browser:3000'
      WA_DISABLE_SPINS: 'true'
      
      # Uncomment next line and add the session data base64 string to authenticate the session without the need to scan it again
      # WA_SESSION_DATA: ''

ACCES: permission denied, mkdir

After using new Docker file, I am getting following error

EACCES: permission denied, mkdir '.node-persist' [Error: EACCES: permission denied, mkdir '.node-persist']

@smashah Can you please help me?

session.data.json empty (only e30=)

I'm running with docker-compose, and either using MD or not, I can't get session data saved to file so then I can enter the info on docker-compose.yaml
How can I get session data and save it manually?

Incremental Memory

Hi ,

I have some issues about memory, for example I have a VPS (4GB ram, 2 CPU cores), when I run a docker or local process memory ram starts about 400 mb, but after 5 days it is around 2GB. When memory reaches 100% api disconnects
Captura de Pantalla 2021-11-03 a la(s) 4 46 14 p ย m
Captura de Pantalla 2021-11-03 a la(s) 4 48 06 p ย m
s

Error in openwa/wa-automate:latest docker mage

I'm getting this error when run

docker run -p 8081:8080 --init openwa/wa-automate --multi-device

During the container initialisation comes the error:

You can also authenticate the session at: http://localhost:8080
- Starting
- Version: 4.40.2
- Initializing WA
- Using custom chromium args with multi device will cause issues! Please remove them:
- Launching Browser
- MD Enabled, turning off incognito mode.
- Data dir: /sessions/_IGNORE_session
- Data dir doesnt exist, creating...: /sessions/_IGNORE_session
- Browser launched: 908ms
TypeError: waPage._client.send is not a function
    at /usr/src/app/node_modules/@open-wa/wa-automate/dist/controllers/browser.js:71:24
    at Generator.next (<anonymous>)
    at fulfilled (/usr/src/app/node_modules/@open-wa/wa-automate/dist/controllers/browser.js:24:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
- session_STARTUP
- Error waPage._client.send is not a function TypeError: waPage._client.send is not a function

--multi-device The session is invalid. Retrying - Error

- Base inject: 10ms
- Launch inject: 219ms
- WAPI Reinjected
- Checking if session is valid
- Launch inject: 372ms
- The session is invalid. Retrying
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn ps ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    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:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn ps',
  path: 'ps',
  spawnargs: [ '-A', '-o', 'ppid,pid,stat,comm' ]
}

Node.js v17.8.0

I'm having this issue when running --multi-device

How to save login session ?

Hi there,
really liking this docker version , its much faster then the python selenium im used too
was also able to get the webhooks working and will now start to filter the events

the only thing that i still havnt been able to do is to save the session so i do not need to scan and the qr and login everytime

would love it if you could advise on how this is done
thank you very much :) have a good one!

Could not resolve reference: #/components/schemas/EasyApiResponse

swagger

I got multiple error output when clicking into EasyAPI POST example.

I'm using WA-Automate Docker.version with Docker SWAG nginx reverse proxy.

It is still working, though. I can send text message to WhatsApp using one of its API. But those error messages bother me and I'm curious whether it will affect other function.

Also, do you have nginx reverse proxy sample for this? Here is mine for reverse proxy:

# redirect all traffic to https
server {
    listen 80;
    listen [::]:80;
    server_name mydomain.com;
    return 301 https://$host$request_uri;
}

# main server block
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name mydomain.com;

    # all ssl related config moved to ssl.conf
    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        set $upstream_app 192.168.10.10;
        set $upstream_port 8081;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

Are there other location directives should be added?

webhook accept only FQDN

the -w parameter don't accept a not fqdn. This is a problem to use with internal docker hostnames, as generally it is only one word, like laravel

Unread Messages - How to ?

Hi there!
just got to first use this docker version of openwa
looks really cool

can someone please help explain how do i subscribe to new messages?
something like subscribing to onMessage or getting unreadMessages

also, after I log in, how do I save my session

thank you very much ๐Ÿ™

Error in building Dockerfile

I am getting following error when building docker image

[+] Building 32.4s (10/13)
 => [internal] load build definition from Dockerfile                                                                                                                             0.1s
 => => transferring dockerfile: 32B                                                                                                                                              0.1s
 => [internal] load .dockerignore                                                                                                                                                0.1s
 => => transferring context: 34B                                                                                                                                                 0.0s
 => resolve image config for docker.io/docker/dockerfile:1.3-labs                                                                                                               13.8s
 => CACHED docker-image://docker.io/docker/dockerfile:1.3-labs@sha256:250ce669e1aeeb5ffb892b18039c3f0801466536cb4210c8eb2638e628859bfd                                           0.0s
 => [internal] load .dockerignore                                                                                                                                                0.0s
 => [internal] load build definition from Dockerfile                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/node:current-stretch-slim                                                                                                     2.7s
 => [internal] load build context                                                                                                                                                0.1s
 => => transferring context: 382B                                                                                                                                                0.0s
 => CACHED [1/5] FROM docker.io/library/node:current-stretch-slim@sha256:184cda205102d79e97707c81c0a47ab310ef8611df87988327f9b76468513bd2                                        0.0s
 => ERROR [2/5] RUN <<eot bash                                                                                                                                                  15.2s
------
 > [2/5] RUN <<eot bash:
#9 0.549
#9 0.551 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#9 0.551
#9 0.717 Get:1 http://security.debian.org/debian-security stretch/updates InRelease [53.0 kB]
#9 0.935 Ign:2 http://deb.debian.org/debian stretch InRelease
#9 1.008 Get:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [760 kB]
#9 1.319 Get:4 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
#9 1.730 Get:5 http://deb.debian.org/debian stretch Release [118 kB]
#9 2.160 Get:6 http://deb.debian.org/debian stretch Release.gpg [3177 B]
#9 2.341 Get:7 http://deb.debian.org/debian stretch/main amd64 Packages [7080 kB]
#9 5.334 Fetched 8107 kB in 4s (1708 kB/s)
#9 5.334 Reading package lists...
#9 6.838 Building dependency tree...
#9 7.083 Reading state information...
#9 7.120 2 packages can be upgraded. Run 'apt list --upgradable' to see them.
#9 7.130
#9 7.131 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#9 7.133
#9 7.160 Reading package lists...
#9 8.414 Building dependency tree...
#9 8.605 Reading state information...
#9 8.845 The following package was automatically installed and is no longer required:
#9 8.845   xz-utils
#9 8.845 Use 'apt autoremove' to remove it.
#9 8.846 The following additional packages will be installed:
#9 8.846   libffi6 libgmp10 libgnutls30 libhogweed4 libidn11 libidn2-0 libnettle6
#9 8.848   libp11-kit0 libpsl5 libtasn1-6 libunistring0
#9 8.882 Suggested packages:
#9 8.882   gnutls-bin spell
#9 8.882 Recommended packages:
#9 8.882   publicsuffix ca-certificates
#9 9.038 The following NEW packages will be installed:
#9 9.038   libffi6 libgmp10 libgnutls30 libhogweed4 libidn11 libidn2-0 libnettle6
#9 9.039   libp11-kit0 libpsl5 libtasn1-6 libunistring0 nano wget
#9 9.108 0 upgraded, 13 newly installed, 0 to remove and 2 not upgraded.
#9 9.108 Need to get 3443 kB of archives.
#9 9.108 After this operation, 10.9 MB of additional disk space will be used.
#9 9.108 Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 libgmp10 amd64 2:6.1.2+dfsg-1+deb9u1 [253 kB]
#9 9.140 Get:2 http://deb.debian.org/debian stretch/main amd64 nano amd64 2.7.4-1 [485 kB]
#9 9.219 Get:3 http://security.debian.org/debian-security stretch/updates/main amd64 libnettle6 amd64 3.3-1+deb9u1 [192 kB]
#9 9.307 Get:4 http://security.debian.org/debian-security stretch/updates/main amd64 libhogweed4 amd64 3.3-1+deb9u1 [136 kB]
#9 9.330 Get:5 http://security.debian.org/debian-security stretch/updates/main amd64 libp11-kit0 amd64 0.23.3-2+deb9u1 [112 kB]
#9 9.368 Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 libgnutls30 amd64 3.5.8-5+deb9u6 [897 kB]
#9 9.515 Get:7 http://deb.debian.org/debian stretch/main amd64 libidn11 amd64 1.33-1+deb9u1 [115 kB]
#9 9.544 Get:8 http://deb.debian.org/debian stretch/main amd64 libffi6 amd64 3.2.1-6 [20.4 kB]
#9 9.568 Get:9 http://deb.debian.org/debian stretch/main amd64 libtasn1-6 amd64 4.10-1.1+deb9u1 [50.6 kB]
#9 9.577 Get:10 http://deb.debian.org/debian stretch/main amd64 libunistring0 amd64 0.9.6+really0.9.3-0.1 [279 kB]
#9 9.630 Get:11 http://deb.debian.org/debian stretch/main amd64 libidn2-0 amd64 0.16-1+deb9u1 [60.7 kB]
#9 9.640 Get:12 http://deb.debian.org/debian stretch/main amd64 libpsl5 amd64 0.17.0-3 [41.8 kB]
#9 9.641 Get:13 http://deb.debian.org/debian stretch/main amd64 wget amd64 1.18-5+deb9u3 [800 kB]
#9 10.75 debconf: delaying package configuration, since apt-utils is not installed
#9 10.78 Fetched 3443 kB in 1s (2450 kB/s)
#9 10.85 Selecting previously unselected package nano.
(Reading database ... 6368 files and directories currently installed.)
#9 10.87 Preparing to unpack .../00-nano_2.7.4-1_amd64.deb ...
#9 10.88 Unpacking nano (2.7.4-1) ...
#9 11.07 Selecting previously unselected package libgmp10:amd64.
#9 11.07 Preparing to unpack .../01-libgmp10_2%3a6.1.2+dfsg-1+deb9u1_amd64.deb ...
#9 11.08 Unpacking libgmp10:amd64 (2:6.1.2+dfsg-1+deb9u1) ...
#9 11.25 Selecting previously unselected package libnettle6:amd64.
#9 11.26 Preparing to unpack .../02-libnettle6_3.3-1+deb9u1_amd64.deb ...
#9 11.26 Unpacking libnettle6:amd64 (3.3-1+deb9u1) ...
#9 11.35 Selecting previously unselected package libhogweed4:amd64.
#9 11.35 Preparing to unpack .../03-libhogweed4_3.3-1+deb9u1_amd64.deb ...
#9 11.36 Unpacking libhogweed4:amd64 (3.3-1+deb9u1) ...
#9 11.48 Selecting previously unselected package libidn11:amd64.
#9 11.48 Preparing to unpack .../04-libidn11_1.33-1+deb9u1_amd64.deb ...
#9 11.49 Unpacking libidn11:amd64 (1.33-1+deb9u1) ...
#9 11.58 Selecting previously unselected package libffi6:amd64.
#9 11.59 Preparing to unpack .../05-libffi6_3.2.1-6_amd64.deb ...
#9 11.59 Unpacking libffi6:amd64 (3.2.1-6) ...
#9 11.65 Selecting previously unselected package libp11-kit0:amd64.
#9 11.65 Preparing to unpack .../06-libp11-kit0_0.23.3-2+deb9u1_amd64.deb ...
#9 11.66 Unpacking libp11-kit0:amd64 (0.23.3-2+deb9u1) ...
#9 11.73 Selecting previously unselected package libtasn1-6:amd64.
#9 11.73 Preparing to unpack .../07-libtasn1-6_4.10-1.1+deb9u1_amd64.deb ...
#9 11.73 Unpacking libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
#9 11.87 Selecting previously unselected package libgnutls30:amd64.
#9 11.87 Preparing to unpack .../08-libgnutls30_3.5.8-5+deb9u6_amd64.deb ...
#9 11.89 Unpacking libgnutls30:amd64 (3.5.8-5+deb9u6) ...
#9 12.07 Selecting previously unselected package libunistring0:amd64.
#9 12.07 Preparing to unpack .../09-libunistring0_0.9.6+really0.9.3-0.1_amd64.deb ...
#9 12.08 Unpacking libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
#9 12.29 Selecting previously unselected package libidn2-0:amd64.
#9 12.30 Preparing to unpack .../10-libidn2-0_0.16-1+deb9u1_amd64.deb ...
#9 12.31 Unpacking libidn2-0:amd64 (0.16-1+deb9u1) ...
#9 12.39 Selecting previously unselected package libpsl5:amd64.
#9 12.39 Preparing to unpack .../11-libpsl5_0.17.0-3_amd64.deb ...
#9 12.40 Unpacking libpsl5:amd64 (0.17.0-3) ...
#9 12.45 Selecting previously unselected package wget.
#9 12.45 Preparing to unpack .../12-wget_1.18-5+deb9u3_amd64.deb ...
#9 12.46 Unpacking wget (1.18-5+deb9u3) ...
#9 12.69 Setting up libnettle6:amd64 (3.3-1+deb9u1) ...
#9 12.73 Setting up libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
#9 12.75 Setting up nano (2.7.4-1) ...
#9 12.77 update-alternatives: using /bin/nano to provide /usr/bin/editor (editor) in auto mode
#9 12.77 update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/nano.1.gz (of link group editor) doesn't exist
#9 12.78 update-alternatives: using /bin/nano to provide /usr/bin/pico (pico) in auto mode
#9 12.78 update-alternatives: warning: skip creation of /usr/share/man/man1/pico.1.gz because associated file /usr/share/man/man1/nano.1.gz (of link group pico) doesn't exist
#9 12.79 Setting up libgmp10:amd64 (2:6.1.2+dfsg-1+deb9u1) ...
#9 12.81 Processing triggers for libc-bin (2.24-11+deb9u4) ...
#9 12.84 Setting up libunistring0:amd64 (0.9.6+really0.9.3-0.1) ...
#9 12.87 Setting up libffi6:amd64 (3.2.1-6) ...
#9 12.89 Setting up libidn11:amd64 (1.33-1+deb9u1) ...
#9 12.96 Setting up libidn2-0:amd64 (0.16-1+deb9u1) ...
#9 12.98 Setting up libpsl5:amd64 (0.17.0-3) ...
#9 13.00 Setting up libhogweed4:amd64 (3.3-1+deb9u1) ...
#9 13.04 Setting up libp11-kit0:amd64 (0.23.3-2+deb9u1) ...
#9 13.07 Setting up libgnutls30:amd64 (3.5.8-5+deb9u6) ...
#9 13.10 Setting up wget (1.18-5+deb9u3) ...
#9 13.13 Processing triggers for libc-bin (2.24-11+deb9u4) ...
#9 13.22
#9 13.22 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#9 13.22
#9 13.23 Reading package lists...
#9 14.54 Building dependency tree...
#9 14.77 Reading state information...
#9 14.81 Calculating upgrade...
#9 14.98 The following package was automatically installed and is no longer required:
#9 14.98   xz-utils
#9 14.98 Use 'apt autoremove' to remove it.
#9 15.00 The following packages will be upgraded:
#9 15.00   tzdata zlib1g
#9 15.01 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#9 15.01 Need to get 369 kB of archives.
#9 15.01 After this operation, 0 B of additional disk space will be used.
#9 15.01 Do you want to continue? [Y/n] Abort.
------
executor failed running [/bin/sh -c <<eot bash
  mkdir -p /usr/src/app
  mkdir -p /usr/src/app/node_modules
  mkdir -p /sessions
  apt update
  apt install nano wget --no-install-recommends  -y
  apt upgrade
  cd /tmp
  wget -q --no-check-certificate https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  apt install ./google-chrome-stable_current_amd64.deb -y
  rm google-chrome-stable_current_amd64.deb
  rm -rf /var/lib/apt/lists/*
  groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser
  mkdir -p /home/pptruser/Downloads
  chown -R pptruser:pptruser /home/pptruser
  chown -R pptruser:pptruser /usr/src/app
  chown -R pptruser:pptruser /sessions
  chown -R pptruser:pptruser /usr/src/app/node_modules
eot]: exit code: 1

Not working on raspberrypi

Hello, im trying to run the container on a raspberrypi with raspberrypi os Debian version: 11 (bullseye) 64bit using the WA_RASPI=true enviroment and what i got is this:

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT
    at onClose (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:289:20)
    at ChildProcess.<anonymous> (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:283:24)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
- session_STARTUP
- Error Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT
 Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

I think that is looking for binary chromium-browser but that binary does not exists, on raspberry pi os i see that there is a package called chromium but not chromium-browser idk if changing to install chromium instead chromium-browser and launch the browser with chromium will fix this

failed to npm run sessiondata [UPDATE README]

This is my first try, so I follow readme instruction.

git clone url && cd folder
npm run sessiondata

and it's failed with the following logs:

  1 0 info it worked if it ends with ok
  2 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'sessiondata' ]
  3 2 info using [email protected]    
  4 3 info using [email protected]
  5 4 verbose run-script [ 'presessiondata', 'sessiondata', 'postsessiondata' ]
  6 5 info lifecycle [email protected]~presessiondata: [email protected]
  7 6 info lifecycle [email protected]~sessiondata: [email protected]
  8 7 verbose lifecycle [email protected]~sessiondata: unsafe-perm in lifecycle true
  9 8 verbose lifecycle [email protected]~sessiondata: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/sicenul/docker/wa-automate-docker/node_modules/.bin:/home/sicenul/bin:/usr/local/sbin:/usr/local/bin:/usr/sbi    n:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
 10 9 verbose lifecycle [email protected]~sessiondata: CWD: /home/sicenul/docker/wa-automate-docker
 11 10 silly lifecycle [email protected]~sessiondata: Args: [ '-c',
 12 10 silly lifecycle   'npx @open-wa/wa-automate --disable-spins --session-data-only' ]
 13 11 silly lifecycle [email protected]~sessiondata: Returned: code: 1  signal: null 
 14 12 info lifecycle [email protected]~sessiondata: Failed to exec sessiondata script
 15 13 verbose stack Error: [email protected] sessiondata: `npx @open-wa/wa-automate --disable-spins --session-data-only`
 16 13 verbose stack Exit status 1
 17 13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
 18 13 verbose stack     at EventEmitter.emit (events.js:198:13)
 19 13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
 20 13 verbose stack     at ChildProcess.emit (events.js:198:13)
 21 13 verbose stack     at maybeClose (internal/child_process.js:982:16)
 22 13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
 23 14 verbose pkgid [email protected]
 24 15 verbose cwd /home/sicenul/docker/wa-automate-docker
 25 16 verbose Linux 5.4.0-64-generic
 26 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "sessiondata"
 27 18 verbose node v10.19.0
 28 19 verbose npm  v6.14.4
 29 20 error code ELIFECYCLE
 30 21 error errno 1
 31 22 error [email protected] sessiondata: `npx @open-wa/wa-automate --disable-spins --session-data-only`
 32 22 error Exit status 1
 33 23 error Failed at the [email protected] sessiondata script.
 34 23 error This is probably not a problem with npm. There is likely additional logging output above.
 35 24 verbose exit [ 1, true ]

Am I did something wrong? Please enlighten me. Thanks in advance.
I'm using linuxmint 20.1

No Access on API Explorer

Hey i have a problem to access the API Explorer. My Issues, not the problem of wa-automate-docker. My only question is, is there a other way to look into the API Wiki. I need only the webhooks and links not the function to execute on any online page.

sub 400mb image

  • npm cache clean
  • rm adwaita icons
  • rm docs
  • dockerignore > .git*

Enable Multi Device in Docker

how to enable Multi Device in Docker?
I have successfully scan to link at localhost:7000, but it still not linked. It only work at legacy mode (not linked device)

Error when use /sendText request

Suddenly I'm receiving error when try to send a text using /sendText API

Request

`curl -X 'POST' \
  'http://picluster:8081/sendText' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "args": {
    "to": "[email protected]",
    "content": "Olรก!"
  }
}'

Response

{
  "success": false,
  "error": {
    "name": "Error",
    "message": "Evaluation failed: TypeError: Cannot read properties of undefined (reading 'length')\n    at window.WAPI.sendMessage (pptr://__puppeteer_evaluation_script__:803:56)\n    at pptr://__puppeteer_evaluation_script__:3:29"
  }
}

crach on startup in Heroku used to be working in the past days

the server used to work normally in heroku , but since yesterday i stoped working and even with restating the dyno it faild to start
please find the below log FYI

2022-02-16T06:42:34.726153+00:00 heroku[web.1]: Starting process with command `/bin/sh -c node\ ./node_modules/@open-wa/wa-automate/bin/server.js\ --use-chrome\ \ --in-docker\ --qr-timeout\ 0\ --popup`
2022-02-16T06:42:38.472336+00:00 app[web.1]: - Postman collection generated: open-wa-session.postman_collection.json
2022-02-16T06:42:38.664041+00:00 app[web.1]: - API collections (swagger + postman) generated successfully
2022-02-16T06:42:37.501292+00:00 app[web.1]: Unable to read config file json: node ./node_modules/@open-wa/wa-automate/bin/server.js --use-chrome  --in-docker --qr-timeout 0 --popup
2022-02-16T06:42:37.502847+00:00 app[web.1]: - session_STARTUP
2022-02-16T06:42:37.507448+00:00 app[web.1]: - DEBUG - flags: {"sessionId":"session","useChrome":true,"socket":"","sessionData":"eyJXQUJyb3dzZXJJZCI6IlwidXBRblcxbUUwZGh0MDhWYVlaZ1NmUT09XCIiLCJXQVNlY3JldEJ1bmRsZSI6IntcImtleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIixcImVuY0tleVwiOlwiK0gxMitrcjlzVGh0RnRFQ213NkNoQVBBS0h6L2ltWnk3NlBMWmM1b2t4Zz1cIixcIm1hY0tleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIn0iLCJXQVRva2VuMSI6IlwiM3dHZER2Vmw4REVjQXVOcXd2L0xoNVkzSEZKTEtPUFU3dGp6cmpBbjhHTT1cIiIsIldBVG9rZW4yIjoiXCIxQGFGZFNHdi9jbmZJOTZHbWcvUlRnUFUyMENrNW04T0srYktKa1hVQmtLc3k2RlBReVVuNU05RitEQVA3Q3h1R2Y3K0ZEaFdLNW5yNG1udz09XCIifQ==","port":8080,"popup":true,"keepUpdated":false,"keepAlive":false,"executablePath":"/usr/bin/google-chrome-stable","ev":false,"disableSpins":true,"debug":true,"botPressUrl":"","inDocker":true,"qrTimeout":0,"config":"node ./node_modules/@open-wa/wa-automate/bin/server.js --use-chrome  --in-docker --qr-timeout 0 --popup","noApi":false,"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}
2022-02-16T06:42:37.508410+00:00 app[web.1]: - DEBUG - env vars: {"WA_WEBHOOK":"false","WA_USE_CHROME":"true","WA_SOCKET":"","WA_SESSION_DATA":"eyJXQUJyb3dzZXJJZCI6IlwidXBRblcxbUUwZGh0MDhWYVlaZ1NmUT09XCIiLCJXQVNlY3JldEJ1bmRsZSI6IntcImtleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIixcImVuY0tleVwiOlwiK0gxMitrcjlzVGh0RnRFQ213NkNoQVBBS0h6L2ltWnk3NlBMWmM1b2t4Zz1cIixcIm1hY0tleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIn0iLCJXQVRva2VuMSI6IlwiM3dHZER2Vmw4REVjQXVOcXd2L0xoNVkzSEZKTEtPUFU3dGp6cmpBbjhHTT1cIiIsIldBVG9rZW4yIjoiXCIxQGFGZFNHdi9jbmZJOTZHbWcvUlRnUFUyMENrNW04T0srYktKa1hVQmtLc3k2RlBReVVuNU05RitEQVA3Q3h1R2Y3K0ZEaFdLNW5yNG1udz09XCIifQ==","WA_PORT":"8080","WA_POPUP":"true","WA_KEEP_UPDATED":"false","WA_KEEP_ALIVE":"false","WA_EXECUTABLE_PATH":"/usr/bin/google-chrome-stable","WA_EV":"false","WA_DISABLE_SPINS":"true","WA_DEBUG":"true","WA_BOT_PRESS_URL":""}
2022-02-16T06:42:37.508886+00:00 app[web.1]: - Launching EASY API
2022-02-16T06:42:37.529033+00:00 app[web.1]: - Selected port is free
2022-02-16T06:42:37.529744+00:00 app[web.1]: - --ev/-e expecting URL - invalid URL.
2022-02-16T06:42:37.530470+00:00 app[web.1]: - Generating Swagger Spec
2022-02-16T06:42:38.777997+00:00 app[web.1]: โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“โ”ƒ                                                                              โ”ƒโ”ƒ   @open-wa/wa-automate                                                       โ”ƒโ”ƒ   ๐Ÿ’ฌ ๐Ÿค– The most reliable NodeJS whatsapp library for chatbots with          โ”ƒโ”ƒ   advanced features.                                                         โ”ƒโ”ƒ   Version: 4.30.13                                                           โ”ƒโ”ƒ   Check out the latest changes:                                              โ”ƒโ”ƒ   https://github.com/open-wa/wa-automate-nodejs#latest-changes               โ”ƒโ”ƒ                                                                              โ”ƒโ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›
2022-02-16T06:42:38.845667+00:00 app[web.1]: You can also authenticate the session at: NA
2022-02-16T06:42:38.846358+00:00 app[web.1]: - Starting
2022-02-16T06:42:38.846920+00:00 app[web.1]: - Version: 4.30.13
2022-02-16T06:42:38.847325+00:00 app[web.1]: - Initializing WA
2022-02-16T06:42:38.848193+00:00 app[web.1]: - Launching Browser
2022-02-16T06:42:38.959597+00:00 app[web.1]: - Browser launched: 111ms
2022-02-16T06:42:39.603091+00:00 heroku[web.1]: Starting process with command `/bin/sh -c node\ ./node_modules/@open-wa/wa-automate/bin/server.js\ --use-chrome\ \ --in-docker\ --qr-timeout\ 0\ --popup`
2022-02-16T06:42:39.451630+00:00 app[web.1]: - Setting Up Page
2022-02-16T06:42:39.457173+00:00 app[web.1]: - Loading session data
2022-02-16T06:42:39.458166+00:00 app[web.1]: - No session data file found for session : session
2022-02-16T06:42:39.458644+00:00 app[web.1]: - Existing session data detected. Injecting...
2022-02-16T06:42:39.460234+00:00 app[web.1]: - Existing session data injected
2022-02-16T06:42:39.460638+00:00 app[web.1]: - Pre page launch setup complete: 9ms
2022-02-16T06:42:39.460993+00:00 app[web.1]: - Navigating to WA
2022-02-16T06:42:41.442121+00:00 app[web.1]: - Page loaded in 1980ms: 200
2022-02-16T06:42:41.449536+00:00 app[web.1]: - Page loaded
2022-02-16T06:42:41.494688+00:00 app[web.1]: - Base inject: 55ms
2022-02-16T06:42:41.530713+00:00 app[web.1]: - WAPI inject: 35ms
2022-02-16T06:42:41.531248+00:00 app[web.1]: - Checking session integrity
2022-02-16T06:42:41.535208+00:00 app[web.1]: - Debug info: {
2022-02-16T06:42:41.535209+00:00 app[web.1]:   "WA_VERSION": "2.2204.13",
2022-02-16T06:42:41.535212+00:00 app[web.1]:   "PAGE_UA": "WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
2022-02-16T06:42:41.535212+00:00 app[web.1]:   "WA_AUTOMATE_VERSION": "4.30.13",
2022-02-16T06:42:41.535213+00:00 app[web.1]:   "BROWSER_VERSION": "HeadlessChrome/98.0.4758.102",
2022-02-16T06:42:41.535213+00:00 app[web.1]:   "OS": "Linux 4.4",
2022-02-16T06:42:41.535214+00:00 app[web.1]:   "START_TS": 1644993761454
2022-02-16T06:42:41.535214+00:00 app[web.1]: }
2022-02-16T06:42:41.777848+00:00 app[web.1]: Unable to read config file json: node ./node_modules/@open-wa/wa-automate/bin/server.js --use-chrome  --in-docker --qr-timeout 0 --popup
2022-02-16T06:42:41.779228+00:00 app[web.1]: - session_STARTUP
2022-02-16T06:42:41.783568+00:00 app[web.1]: - DEBUG - flags: {"sessionId":"session","useChrome":true,"socket":"","sessionData":"eyJXQUJyb3dzZXJJZCI6IlwidXBRblcxbUUwZGh0MDhWYVlaZ1NmUT09XCIiLCJXQVNlY3JldEJ1bmRsZSI6IntcImtleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIixcImVuY0tleVwiOlwiK0gxMitrcjlzVGh0RnRFQ213NkNoQVBBS0h6L2ltWnk3NlBMWmM1b2t4Zz1cIixcIm1hY0tleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIn0iLCJXQVRva2VuMSI6IlwiM3dHZER2Vmw4REVjQXVOcXd2L0xoNVkzSEZKTEtPUFU3dGp6cmpBbjhHTT1cIiIsIldBVG9rZW4yIjoiXCIxQGFGZFNHdi9jbmZJOTZHbWcvUlRnUFUyMENrNW04T0srYktKa1hVQmtLc3k2RlBReVVuNU05RitEQVA3Q3h1R2Y3K0ZEaFdLNW5yNG1udz09XCIifQ==","port":8080,"popup":true,"keepUpdated":false,"keepAlive":false,"executablePath":"/usr/bin/google-chrome-stable","ev":false,"disableSpins":true,"debug":true,"botPressUrl":"","inDocker":true,"qrTimeout":0,"config":"node ./node_modules/@open-wa/wa-automate/bin/server.js --use-chrome  --in-docker --qr-timeout 0 --popup","noApi":false,"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}
2022-02-16T06:42:41.784446+00:00 app[web.1]: - DEBUG - env vars: {"WA_WEBHOOK":"false","WA_USE_CHROME":"true","WA_SOCKET":"","WA_SESSION_DATA":"eyJXQUJyb3dzZXJJZCI6IlwidXBRblcxbUUwZGh0MDhWYVlaZ1NmUT09XCIiLCJXQVNlY3JldEJ1bmRsZSI6IntcImtleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIixcImVuY0tleVwiOlwiK0gxMitrcjlzVGh0RnRFQ213NkNoQVBBS0h6L2ltWnk3NlBMWmM1b2t4Zz1cIixcIm1hY0tleVwiOlwiMUpOZkdIMXp5SnFNYXc2cXNCUjZPNVRPNklyUUdodE5mQk5kdFRhaTNxST1cIn0iLCJXQVRva2VuMSI6IlwiM3dHZER2Vmw4REVjQXVOcXd2L0xoNVkzSEZKTEtPUFU3dGp6cmpBbjhHTT1cIiIsIldBVG9rZW4yIjoiXCIxQGFGZFNHdi9jbmZJOTZHbWcvUlRnUFUyMENrNW04T0srYktKa1hVQmtLc3k2RlBReVVuNU05RitEQVA3Q3h1R2Y3K0ZEaFdLNW5yNG1udz09XCIifQ==","WA_PORT":"8080","WA_POPUP":"true","WA_KEEP_UPDATED":"false","WA_KEEP_ALIVE":"false","WA_EXECUTABLE_PATH":"/usr/bin/google-chrome-stable","WA_EV":"false","WA_DISABLE_SPINS":"true","WA_DEBUG":"true","WA_BOT_PRESS_URL":""}
2022-02-16T06:42:41.784826+00:00 app[web.1]: - Launching EASY API
2022-02-16T06:42:41.806523+00:00 app[web.1]: - Selected port is free
2022-02-16T06:42:41.807372+00:00 app[web.1]: - --ev/-e expecting URL - invalid URL.
2022-02-16T06:42:41.808414+00:00 app[web.1]: - Generating Swagger Spec
2022-02-16T06:42:41.946058+00:00 app[web.1]: - Use this easy pre-filled link to report an issue: https://github.com/open-wa/wa-automate-nodejs/issues/new?template=bug_report.yaml&d_info=%7B%0A%20%20%22WA_VERSION%22:%20%222.2204.13%22,%0A%20%20%22WA_AUTOMATE_VERSION%22:%20%224.30.13%22,%0A%20%20%22BROWSER_VERSION%22:%20%22HeadlessChrome/98.0.4758.102%22,%0A%20%20%22START_TS%22:%201644993761454,%0A%20%20%22LATEST_VERSION%22:%20true,%0A%20%20%22CLI%22:%20true%0A%7D&enviro=-%20OS:%20Linux%204.4%0A-%20Node:%2017.5.0%0A-%20npm:%208.4.1&labels=CLI,Legacy
2022-02-16T06:42:41.946715+00:00 app[web.1]: - Time to injection: 496ms
2022-02-16T06:42:41.948987+00:00 app[web.1]: - Injecting api
2022-02-16T06:42:41.963716+00:00 app[web.1]: - Base inject: 14ms
2022-02-16T06:42:41.975081+00:00 app[web.1]: - WAPI inject: 11ms
2022-02-16T06:42:41.975441+00:00 app[web.1]: - Checking session integrity
2022-02-16T06:42:41.978247+00:00 app[web.1]: - Session integrity check passed
2022-02-16T06:42:42.569835+00:00 app[web.1]: - Postman collection generated: open-wa-session.postman_collection.json
2022-02-16T06:42:42.688236+00:00 app[web.1]: - API collections (swagger + postman) generated successfully
2022-02-16T06:42:42.766217+00:00 app[web.1]: โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“โ”ƒ                                                                              โ”ƒโ”ƒ   @open-wa/wa-automate                                                       โ”ƒโ”ƒ   ๐Ÿ’ฌ ๐Ÿค– The most reliable NodeJS whatsapp library for chatbots with          โ”ƒโ”ƒ   advanced features.                                                         โ”ƒโ”ƒ   Version: 4.30.13                                                           โ”ƒโ”ƒ   Check out the latest changes:                                              โ”ƒโ”ƒ   https://github.com/open-wa/wa-automate-nodejs#latest-changes               โ”ƒโ”ƒ                                                                              โ”ƒโ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›
2022-02-16T06:42:43.010452+00:00 app[web.1]: - Launch inject: 1032ms
2022-02-16T06:42:43.011067+00:00 app[web.1]: - WAPI injected
2022-02-16T06:42:43.011887+00:00 app[web.1]: - Authenticating
2022-02-16T06:42:43.258801+00:00 app[web.1]: - Session integrity check passed
2022-02-16T06:42:43.195892+00:00 app[web.1]: You can also authenticate the session at: NA
2022-02-16T06:42:43.196669+00:00 app[web.1]: - Starting
2022-02-16T06:42:43.197294+00:00 app[web.1]: - Version: 4.30.13
2022-02-16T06:42:43.197715+00:00 app[web.1]: - Initializing WA
2022-02-16T06:42:43.198657+00:00 app[web.1]: - Launching Browser
2022-02-16T06:42:43.308213+00:00 app[web.1]: - Browser launched: 109ms
2022-02-16T06:42:43.374616+00:00 app[web.1]: - Setting Up Page
2022-02-16T06:42:43.380184+00:00 app[web.1]: - Loading session data
2022-02-16T06:42:43.381258+00:00 app[web.1]: - No session data file found for session : session
2022-02-16T06:42:43.383554+00:00 app[web.1]: - Existing session data detected. Injecting...
2022-02-16T06:42:43.385912+00:00 app[web.1]: - Existing session data injected
2022-02-16T06:42:43.386443+00:00 app[web.1]: - Pre page launch setup complete: 12ms
2022-02-16T06:42:43.386839+00:00 app[web.1]: - Navigating to WA
2022-02-16T06:42:43.668976+00:00 app[web.1]: - Launch inject: 410ms
2022-02-16T06:42:44.940389+00:00 app[web.1]: - Authenticated
2022-02-16T06:42:45.078278+00:00 app[web.1]: - Reinjecting api
2022-02-16T06:42:45.123609+00:00 app[web.1]: - Base inject: 45ms
2022-02-16T06:42:45.228559+00:00 app[web.1]: - Page loaded in 1841ms: 200
2022-02-16T06:42:45.231281+00:00 app[web.1]: - Page loaded
2022-02-16T06:42:45.255279+00:00 app[web.1]: - Base inject: 29ms
2022-02-16T06:42:45.412192+00:00 app[web.1]: - WAPI inject: 156ms
2022-02-16T06:42:45.414519+00:00 app[web.1]: - Checking session integrity
2022-02-16T06:42:45.415413+00:00 app[web.1]: - Debug info: {
2022-02-16T06:42:45.415415+00:00 app[web.1]:   "WA_VERSION": "2.2202.12",
2022-02-16T06:42:45.415417+00:00 app[web.1]:   "PAGE_UA": "WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
2022-02-16T06:42:45.415418+00:00 app[web.1]:   "WA_AUTOMATE_VERSION": "4.30.13",
2022-02-16T06:42:45.415419+00:00 app[web.1]:   "BROWSER_VERSION": "HeadlessChrome/98.0.4758.102",
2022-02-16T06:42:45.415420+00:00 app[web.1]:   "OS": "Linux 4.4",
2022-02-16T06:42:45.415420+00:00 app[web.1]:   "START_TS": 1644993765236
2022-02-16T06:42:45.415420+00:00 app[web.1]: }
2022-02-16T06:42:45.446062+00:00 app[web.1]: - WAPI inject: 322ms
2022-02-16T06:42:45.446505+00:00 app[web.1]: - Checking session integrity
2022-02-16T06:42:45.478560+00:00 app[web.1]: - Session integrity check passed
2022-02-16T06:42:45.751867+00:00 app[web.1]: - Use this easy pre-filled link to report an issue: https://github.com/open-wa/wa-automate-nodejs/issues/new?template=bug_report.yaml&d_info=%7B%0A%20%20%22WA_VERSION%22:%20%222.2202.12%22,%0A%20%20%22WA_AUTOMATE_VERSION%22:%20%224.30.13%22,%0A%20%20%22BROWSER_VERSION%22:%20%22HeadlessChrome/98.0.4758.102%22,%0A%20%20%22START_TS%22:%201644993765236,%0A%20%20%22LATEST_VERSION%22:%20true,%0A%20%20%22CLI%22:%20true%0A%7D&enviro=-%20OS:%20Linux%204.4%0A-%20Node:%2017.5.0%0A-%20npm:%208.4.1&labels=CLI,Legacy
2022-02-16T06:42:45.752380+00:00 app[web.1]: - Time to injection: 521ms
2022-02-16T06:42:45.754207+00:00 app[web.1]: - Injecting api
2022-02-16T06:42:45.755860+00:00 app[web.1]: - Session integrity check passed
2022-02-16T06:42:45.762908+00:00 app[web.1]: - Base inject: 8ms
2022-02-16T06:42:46.487750+00:00 app[web.1]: - Launch inject: 732ms
2022-02-16T06:42:46.888998+00:00 app[web.1]: - Launch inject: 1126ms
2022-02-16T06:42:46.889379+00:00 app[web.1]: - WAPI injected
2022-02-16T06:42:46.891751+00:00 app[web.1]: - Authenticating
2022-02-16T06:42:46.917966+00:00 app[web.1]: - Downloading patches from https://cdn.openwa.dev/patches.json
2022-02-16T06:42:47.137859+00:00 app[web.1]: - Client is ready
2022-02-16T06:42:47.312298+00:00 app[web.1]: - Downloaded patches in 0.394s
2022-02-16T06:42:47.342384+00:00 app[web.1]: - Installing patches
2022-02-16T06:42:46.399016+00:00 app[web.1]: - Launch inject: 920ms
2022-02-16T06:42:46.400618+00:00 app[web.1]: - WAPI Reinjected
2022-02-16T06:42:46.404963+00:00 app[web.1]: - Checking if session is valid
2022-02-16T06:42:47.664087+00:00 app[web.1]: - Patches Installed: 488e2
2022-02-16T06:42:48.053821+00:00 app[web.1]: - Client loaded for normal account with 0 contacts, 0 chats & 0 messages in 9.304s
2022-02-16T06:42:48.311485+00:00 app[web.1]: - Authenticated
2022-02-16T06:42:48.329446+00:00 app[web.1]: - Reinjecting api
2022-02-16T06:42:48.459980+00:00 app[web.1]: - Base inject: 130ms
2022-02-16T06:42:48.553354+00:00 app[web.1]: - WAPI inject: 93ms
2022-02-16T06:42:48.553892+00:00 app[web.1]: - Checking session integrity
2022-02-16T06:42:48.582829+00:00 app[web.1]: - Session integrity check passed
2022-02-16T06:42:49.240348+00:00 app[web.1]: - Finalizing web session...
2022-02-16T06:42:49.342145+00:00 app[web.1]: - Launch inject: 759ms
2022-02-16T06:42:49.343114+00:00 app[web.1]: - WAPI Reinjected
2022-02-16T06:42:49.343415+00:00 app[web.1]: - Checking if session is valid
2022-02-16T06:42:49.417809+00:00 app[web.1]: - Downloading patches from https://cdn.openwa.dev/patches.json
2022-02-16T06:42:49.529264+00:00 app[web.1]: - Client is ready
2022-02-16T06:42:49.774627+00:00 app[web.1]: - Finalizing client...
2022-02-16T06:42:50.248757+00:00 app[web.1]: - Patches Installed: 488e2
2022-02-16T06:42:50.351599+00:00 app[web.1]: - Client loaded for normal account with 127 contacts, 112 chats & 193 messages in 7.627s
2022-02-16T06:42:49.635638+00:00 app[web.1]: - Downloaded patches in 0.217s
2022-02-16T06:42:49.636246+00:00 app[web.1]: - Installing patches
2022-02-16T06:42:50.794612+00:00 app[web.1]: - Finalizing web session...
2022-02-16T06:42:50.938518+00:00 app[web.1]: - Finalizing client...
2022-02-16T06:42:51.725431+00:00 app[web.1]: - ๐Ÿš€ @OPEN-WA ready for account: 1274
2022-02-16T06:42:51.726743+00:00 app[web.1]: - session_STARTUP
2022-02-16T06:42:51.727029+00:00 app[web.1]: - Setting Up API Explorer
2022-02-16T06:42:51.732022+00:00 app[web.1]: - API Explorer set up successfully
2022-02-16T06:42:51.732355+00:00 app[web.1]: - ...waiting for port 8080 to be free
2022-02-16T06:42:51.734173+00:00 app[web.1]: - Port 8080 is now free.
2022-02-16T06:42:51.734506+00:00 app[web.1]: - 
2022-02-16T06:42:51.734507+00:00 app[web.1]: 	API Explorer (โ€‹http://localhost:8080/api-docs/ โ€‹)
2022-02-16T06:42:51.734831+00:00 app[web.1]: - 
2022-02-16T06:42:51.734832+00:00 app[web.1]: โ€ข Listening on port 8080!
2022-02-16T06:42:51.948010+00:00 app[web.1]: - ๐Ÿš€ @OPEN-WA ready for account: 1274
2022-02-16T06:42:51.949768+00:00 app[web.1]: - session_STARTUP
2022-02-16T06:42:51.950064+00:00 app[web.1]: - Setting Up API Explorer
2022-02-16T06:42:51.956828+00:00 app[web.1]: - API Explorer set up successfully
2022-02-16T06:42:51.957459+00:00 app[web.1]: - ...waiting for port 8080 to be free
2022-02-16T06:42:51.959965+00:00 app[web.1]: - Port 8080 is now free.
2022-02-16T06:42:51.960324+00:00 app[web.1]: - 
2022-02-16T06:42:51.960326+00:00 app[web.1]: 	API Explorer (โ€‹http://localhost:8080/api-docs/ โ€‹)
2022-02-16T06:42:51.960739+00:00 app[web.1]: - 
2022-02-16T06:42:51.960740+00:00 app[web.1]: โ€ข Listening on port 8080!
2022-02-16T06:42:19.485540+00:00 app[api]: Set PORT config vars by user XXXXXXXXXXXXXXXX
2022-02-16T06:42:19.485540+00:00 app[api]: Release v7 created by user XXXXXXXXXXXXXXXX
2022-02-16T06:43:35.094272+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-02-16T06:43:35.193953+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-02-16T06:43:35.405654+00:00 heroku[web.1]: Process exited with status 137
2022-02-16T06:43:40.460650+00:00 heroku[web.1]: Process exited with status 137
2022-02-16T06:43:40.088392+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-02-16T06:43:40.239747+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-02-16T06:43:40.541798+00:00 heroku[web.1]: State changed from starting to crashed
2022-02-16T06:43:41.490590+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/sendText" host=mlotfy.herokuapp.com request_id=399da65c-154e-44ef-a546-a516c52f66f0 fwd="54.152.41.238" dyno= connect= service= status=503 bytes= protocol=https
2022-02-16T06:43:42.246037+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/sendText" host=mlotfy.herokuapp.com request_id=aef5270c-6b15-47e4-a65a-7330e062c137 fwd="54.152.41.238" dyno= connect= service= status=503 bytes= protocol=https

docker-compsose.yml some cli flags are working, others are not.

Hello Shah Mohammad,

I am trying to setup webhook but it is not working. May you please have a look on the compose file. This is the block of my docker-compose.yml file.

version: '3'
services:
  nginx:
    container_name: nginx
    restart: unless-stopped
    image: nginx
    volumes:
      - html:/usr/share/nginx/html
      - conf.d:/etc/nginx/conf.d
    ports:
      - '5480:80'
      - '5443:443'
  nodered:
    container_name: nodered
    restart: unless-stopped
    image: nodered/node-red
    environment:
      - PK=Asia/Karachi
      - LD_LIBRARY_PATH=/opt/vc/lib
    volumes:
      - nodered:/data
    ports:
      - '5880:1880'
  wa:
    container_name: wa
    restart: unless-stopped
    image: openwa/wa-automate
    environment:
      - multi-device
      - ras-pi
      - use-chrome
      - popup
      - d
      - qrTimeout=0
      - no-kill-on-logout=true
      - debug
      - verbose
      - keep-alive=true
      - skip-url-check
      - 'webhook=http://nodered:5880/admin/webhook'
      - 'ev=http://nodered:5880/admin/launch'
    volumes:
      - "sessions:/sessions"
    depends_on:
      - nodered
    ports:
      - '5080:8080'
      - '5081:3000'
volumes:
  html:
  conf.d:
  nodered:
  sessions:

Add --popup in docker file

To display QR code on browser, it required to run following docker command

docker run -e PORT=8080 -p 8080:8080 openwa/wa-automate:latest --popup

it is better we can specify --popup in the docker file, so user need not to specify it explicitly

Reference issue: open-wa/wa-automate-nodejs#1866

Use case for WA_SESSION_DATA

I tried to put base64 string data into WA_SESSION_DATA in my docker-compose.yml. I copied those string from session.data.json which was generated automatically after connecting to my WhatsApp account.

Then, I stop my docker container. Started it again, then it still asked me to scan qrcode again for new session.

Did I miss any steps? Do we need to scan qrcode again even if we have put those base64 string already?

Need PHP Example on /sendText

Hi all,

I tried to /sendText using PHP script below :

<?php
$curl = curl_init();
$data = [
    'to' => '[email protected]',
    'content' => 'Hello World!',
];

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_URL, "http://localhost:8002/sendText");
$result = curl_exec($curl);
curl_close($curl);
print_r($result);
?>

and the result always :

{"success":true,"response":"Message missing"}

What am i missed here ?
Help me please... Thanks before.

multi users?

Hi,

Can somebody help me with multi users?
thanks.

further size savings

  • switch from node:current-stretch to node:current-stretch-slim
  • npm clean cache --force

Deattaching from docker container console not possible?

Hi,

I've been amazed by your great work!

I've got a question. Please forgive me when my question is that of a beginner (since I am pretty new to Docker):

After running
docker run -e PORT=9090 -p 9090:9090 openwa/wa-automate:latest

the terminal presents the QR code and then displays all the logged messages when I trigger various API calls shown on http://localhost:9090/api-docs/

But how can I de-attach from that console? Usually Ctrl+P and then Ctrl+Q allow us to detach from attached docker consoles.
Also closing through Ctrl-C or any interruption does not work.

What am I doing wrong or is this a missing feature? :)

Best regards
Marcel

curl command example

Hi, can somebody help with curl command example to send message?
thanks in advance.

Evaluation failed: TypeError: WAPI.healthCheck is not a function

after some periode, need to scan qr code again. this the error logs :

  • Injecting scripts
  • Base inject: 397ms
  • Launch inject: 1890ms
  • Injecting scripts
  • Base inject: 1438ms
  • Launch inject: 1300ms
  • Injecting scripts
  • Base inject: 68ms
  • Injecting scripts
  • Launch inject: 3796ms
  • Base inject: 2910ms
  • Injecting scripts
  • Base inject: 1818ms
  • Injecting scripts
  • Base inject: 492ms
  • WAPI inject: 3208ms
  • Checking session integrity
  • Session integrity check failed, trying again... 3
  • WAPI inject: 3511ms
  • Checking session integrity
  • Session integrity check passed
  • Launch inject: 4096ms
  • Launch inject: 8628ms
    middleware -> error Error: Evaluation failed: TypeError: WAPI.healthCheck is not a function
    at pptr://puppeteer_evaluation_script:1:13
    at ExecutionContext._ExecutionContext_evaluate (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:286:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:117:16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.