open-wa / wa-automate-docker

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

failed to npm run sessiondata [UPDATE README] #9

Closed sicenul closed 2 years ago

sicenul commented 3 years ago

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 npm@6.14.4    
  4 3 info using node@v10.19.0
  5 4 verbose run-script [ 'presessiondata', 'sessiondata', 'postsessiondata' ]
  6 5 info lifecycle wa-automate-docker@1.0.0~presessiondata: wa-automate-docker@1.0.0
  7 6 info lifecycle wa-automate-docker@1.0.0~sessiondata: wa-automate-docker@1.0.0
  8 7 verbose lifecycle wa-automate-docker@1.0.0~sessiondata: unsafe-perm in lifecycle true
  9 8 verbose lifecycle wa-automate-docker@1.0.0~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 wa-automate-docker@1.0.0~sessiondata: CWD: /home/sicenul/docker/wa-automate-docker
 11 10 silly lifecycle wa-automate-docker@1.0.0~sessiondata: Args: [ '-c',
 12 10 silly lifecycle   'npx @open-wa/wa-automate --disable-spins --session-data-only' ]
 13 11 silly lifecycle wa-automate-docker@1.0.0~sessiondata: Returned: code: 1  signal: null 
 14 12 info lifecycle wa-automate-docker@1.0.0~sessiondata: Failed to exec sessiondata script
 15 13 verbose stack Error: wa-automate-docker@1.0.0 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 wa-automate-docker@1.0.0
 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 wa-automate-docker@1.0.0 sessiondata: `npx @open-wa/wa-automate --disable-spins --session-data-only`
 32 22 error Exit status 1
 33 23 error Failed at the wa-automate-docker@1.0.0 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

smashah commented 3 years ago

@sicenul there are some major changes coming to this repo. One of which is you no longer need to use docker-compose.

Please try

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

and just scan the qr code normally, it should save the session data in the container by default then

thanks

CreativeWarlock commented 3 years ago

Hi there,

nice to hear that! And it works fantastically!

But why is this (and maybe other) information not on the front page of this project? ;)

Cheers, Marcel