robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
120 stars 12 forks source link

TypeError: process.stdin.setRawMode is not a function on docker on Synology NAS #78

Closed zheffie closed 5 months ago

zheffie commented 5 months ago

Hi there,

I'm using docker on a Synology NAS After login command and scanning the QR code, the output yields:

✔  success   Logged in
◼  pause     Wait until WhatsApp finishes connecting, then press any key to exit
/usr/local/lib/node_modules/mudslide/dist/whatsapp.js:136
        process.stdin.setRawMode(true);
                      ^

TypeError: process.stdin.setRawMode is not a function
    at /usr/local/lib/node_modules/mudslide/dist/whatsapp.js:136:23
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/mudslide/dist/whatsapp.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/mudslide/dist/whatsapp.js:27:12)
    at waitForKey (/usr/local/lib/node_modules/mudslide/dist/whatsapp.js:134:12)
    at /usr/local/lib/node_modules/mudslide/dist/whatsapp.js:161:27
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/mudslide/dist/whatsapp.js:31:71
    at new Promise (<anonymous>)

Node.js v20.11.0

after that, the cache folder seems to be populated, and Whatsapp application properly shows a linked device. However subsequent commands again always trigger the generation of QR code and ultimately do not execute.

Any idea on what could be te problem?

zheffie commented 5 months ago

fixed it.

Docker needs to run in interactive mode => docker run -it ...

create-issue-branch[bot] commented 5 months ago

Branch issue-78-TypeError_process_stdin_setRawMode_is_not_a_function_on_docker_on_Synology_NAS created!

robvanderleek commented 5 months ago

Hi @zheffie

Great you managed to resolve this issue yourself. I've updated the README so other users won't bump into the same problem.

Thanks, Rob