question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Venom doesn't send messages (gadd called without an id attr (id))

See original GitHub issue

Description

When i try to send a text message (to unkown or a contact) it fails.

Environment

  • Venom version(s): 4.0.6
  • Browser: Chrome Version 98.0.4758.102
  • OS: Windows 10 x64
  • Node version: Node v16.13.2

Steps to Reproduce

  1. Enable multi-device
  2. Send a message to a number (like 55999123456@c.us)
  3. It will crash.

Log Output

Error: Evaluation failed: Error: gadd called without an id attr (id)
    at W.gadd (https://web.whatsapp.com/bootstrap_qr.faeb72dc2a3a441a20d1.js:65:420665)
    at https://web.whatsapp.com/bootstrap_qr.faeb72dc2a3a441a20d1.js:65:249166
    at Generator.next (<anonymous>)
    at t (https://web.whatsapp.com/vendor1~bootstrap_qr.947b18aebaee33ade8af.js:2:63784)
    at s (https://web.whatsapp.com/vendor1~bootstrap_qr.947b18aebaee33ade8af.js:2:63995)
    at https://web.whatsapp.com/vendor1~bootstrap_qr.947b18aebaee33ade8af.js:2:64054
    at Y (https://web.whatsapp.com/bootstrap_qr.faeb72dc2a3a441a20d1.js:5:243670)
    at new y (https://web.whatsapp.com/bootstrap_qr.faeb72dc2a3a441a20d1.js:5:236237)
    at https://web.whatsapp.com/vendor1~bootstrap_qr.947b18aebaee33ade8af.js:2:63935
    at W._findAndParse (https://web.whatsapp.com/bootstrap_qr.faeb72dc2a3a441a20d1.js:65:249899)
    at ExecutionContext._evaluateInternal

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:27 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
michaelloliveiracommented, Feb 26, 2022

Gentlemen, I took a test and it seems that messages can only be sent to contacts who are in your conversation list.

In other words, it is necessary for the recipient to contact you first by sending a message.

try:

let chats = await client.getAllChats(); if(chats.findIndex(c => c.id._serialized === message.from) > -1) { //send message }

2reactions
matheusb-compcommented, Mar 8, 2022

Maybe this should be reopened. Using WAPI directly, on WhatsApp legacy (without multi-device), the function sendExist fails with this error. Screenshot from 2022-03-08 20-29-52

Checking the calls, sendExist calls checkNumberStatus that in turn is calling WAPI.isBeta without await.

Read more comments on GitHub >

github_iconTop Results From Across the Web

venom-bot - Message send repeat doesn't work - Stack Overflow
Using the code below, only the "sendText" is sent. When it arrives at "sendImage" the system stops and does not return any message...
Read more >
venom-bot - npm
Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, ...
Read more >
orkestral/venom (Raised $0.00) - Issuehunt
Venom is a high-performance system developed with JavaScript to create a bot for ... getHostDevice() return Error: gadd called without an id attr...
Read more >
ED 288 74 - ERIC - Department of Education
Such insights into nature are obviously rare -id spectacular. A ... which Bruno called "the three headed hellhound of Aristotle, Ptolemy, and.
Read more >
Super Smash Bros. Ultimate - Mario Wiki
Super Smash Bros. Ultimate is the fifth game in the Super Smash Bros. series, released for the Nintendo Switch. The game was announced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found