raweee / node-red-contrib-whatsapp-link

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

Connecting error : Evaluation failed: TypeError: Cannot read properties of undefined (reading 'LegacyPhoneFeatures') #8

Closed renants286 closed 1 year ago

renants286 commented 1 year ago

I'm trying login to WA by QR code but I'm getting an error. Can you help me with this? After the error, I can not run node-red.

Image error attached.

wal_nr_error

raweee commented 1 year ago

Hi, Some users are facing this issue caused by new update in Whatsapp feature. To solve this, we have two option..

Option-1 :

  1. Go to folder .node-red/Whatsapp-Link and delete complete session folder. (It will delete your current whatsapp session)
  2. Update to Node Node-Red-Contrib-Whatsapp-Link Ver-0.1.28 or higher.
  3. Connect with new generated QR code and you are ready to go. --- It works for me :+1:

Option-2 :

  1. go to node_modules\whatsapp-web.js\src\util\Injected.js
  2. then go to line 16 and comment it with "//" and save it. As shown in image... image

it'll also work for you.. Let me know, if both of them doesn't work.

renants286 commented 1 year ago

Hello, Thanks for your fast response...

I found an option similar to your Option-2 that is working. See it here: https://github.com/pedroslopez/whatsapp-web.js/pull/1917/files/ccf9438a0c46f0387ad2c65604314f53b0b07e84

renants286 commented 1 year ago

After deploying my Flow new Error appears.

wal_nr_error_2

Are you already faced with it?

ps: I tested options 1 and 2 before asking for help.

raweee commented 1 year ago

Mine is working fine. it might be due to slow connection.. Try once again with updated one. let me know if you find any other issue, i can work on it right now..

Tsamsiyu1 commented 1 year ago

i had the same issue after a couple flow restarts. I then tried option 1 that worked for about 5 flow deployments and then the same issue starts up again.

modocomodo20 commented 1 year ago

Hi, Some users are facing this issue caused by new update in Whatsapp feature. To solve this, we have two option..

Option-1 :

  1. Go to folder .node-red/Whatsapp-Link and delete complete session folder. (It will delete your current whatsapp session)
  2. Update to Node Node-Red-Contrib-Whatsapp-Link Ver-0.1.28 or higher.
  3. Connect with new generated QR code and you are ready to go. --- It works for me 👍

Option-2 :

  1. go to node_modules\whatsapp-web.js\src\util\Injected.js
  2. then go to line 16 and comment it with "//" and save it. As shown in image... image

it'll also work for you.. Let me know, if both of them doesn't work.

Option-2 it work thank you for the solution.

zaromarco commented 1 month ago

Hi, Some users are facing this issue caused by new update in Whatsapp feature. To solve this, we have two option..

Option-1 :

1. Go to folder `.node-red/Whatsapp-Link` and delete complete `session` folder. (It will delete your current whatsapp session)

2. Update to Node `Node-Red-Contrib-Whatsapp-Link Ver-0.1.28 ` or higher.

3. Connect with new generated QR code and you are ready to go.
   --- It works for me 👍

Option-2 :

1. go to `node_modules\whatsapp-web.js\src\util\Injected.js`

2. then go to line 16 and comment it with "//" and save it. As shown in image...
   ![image](https://user-images.githubusercontent.com/45591228/212145914-e63d8e0e-dd32-4f26-8458-c8e8af498f61.png)

it'll also work for you.. Let me know, if both of them doesn't work.

Hi i have installed node-red latest version with nodejs v18 using docker , when i deploy this flow i get this error and container keep crashing: [info] Starting flows 12 May 09:46:07 - [info] [whatsappLink:Web] Status : Initializing Whatsapp.. 12 May 09:46:07 - [info] Started flows 12 May 09:46:07 - [red] Uncaught Exception: 12 May 09:46:07 - [error] Error: ENOENT: no such file or directory, mkdir '/.node-red/Whatsapp-Link/session'

where can i find .node-red/Whatsapp-Link directory ? i have searched in all directory where i have binded the /data/ folder of node-red container without any luck