raweee / node-red-contrib-whatsapp-link

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

msg : error "TypeError: Cannot read properties of null (reading 'client')" #68

Closed sm4l closed 1 month ago

sm4l commented 1 month ago

ubuntu server 22.0.4 using Whatsapp Socket Client ( Lite)

i already done the modify of Issue #58 but the message continue to appear.

I managed to get it to work the first time, but now after a while it became disconnected and it won't work anymore. I'm using it on a linux server.

I have already uninstalled and installed the module, deleted the WhatsApp-Link/ folder in .node-red/

restarted service

error log on node-red-pi 21 May 00:53:31 - [info] [whatsappLink:Web] ErrorCode: 405 | Error: Connection Failure

` log install :

`2024-05-21T00:18:20.323Z Install : node-red-contrib-whatsapp-link 0.1.39-C

2024-05-21T00:18:19.159Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-whatsapp-link@0.1.39-C
2024-05-21T00:18:19.232Z [err] npm warn config production Use `--omit=dev` instead.
2024-05-21T00:18:42.170Z [err] npm warn deprecated fstream@1.0.12: This package is no longer supported.
2024-05-21T00:18:42.418Z [err] npm warn deprecated puppeteer@13.7.0: < 22.5.0 is no longer supported`
msg : error

"TypeError: Cannot read properties of null (reading 'client')"

Edit1: When i try restart {"payload":"Please Deploy all nodes to subscribe for messgaes","_msgid":"8ca9fcb08c909086"} Then i try logout, and the node-red-pi crashes.

21 May 00:55:28 - [info] [whatsappLink:Web] ErrorCode: 405 | Error: Connection Failure
21 May 00:55:28 - [red] Uncaught Exception:
21 May 00:55:28 - [error] Error: Connection Closed
    at sendRawMessage (/root/.node-red/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:54:19)
    at sendNode (/root/.node-red/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:73:16)
    at Object.logout (/root/.node-red/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:342:19)
    at WhatsappAdmin._inputCallback (/root/.node-red/node_modules/node-red-contrib-whatsapp-link/admin.js:35:28)

nothing works

sm4l commented 1 month ago

Fixed with

https://github.com/raweee/node-red-contrib-whatsapp-link/issues/69#issuecomment-2123746842