whatsapp-web.js
whatsapp-web.js copied to clipboard
Evaluation failed: i
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
Evaluation failed: i
Expected behavior
Evaluation failed: i
Steps to Reproduce the Bug or Issue
Evaluation failed: i
Relevant Code
No response
Browser Type
Google Chrome
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Windows Phone OS: Android whatsapp-web.js version: 1.16.6 WhatsApp Web version: 2.2216.8 Node.js Version: v16.15.0
Additional context
No response
too little information sometimes I meet Evaluation failed: g
in my case it happened in functions getNumberID and isRegisteredUser
@erlipinheiro I found it when I trigger function isRegisteredUser WWebVersion: 2.2216.8 Whatsapp-webjs: 1.16.6
me too
This was caused by Whatsapp that has now been resolved.
@pedropuppim how did you solve it
I catch the bug with try/catch and repeat the function one more time because this problem can occur when the contact blocks you and may stuck in a recursion loop.
Example
` async checkContact(id_chat, retry_=false){ try {
let number = await this.client.getNumberId(id_chat.replace('c.us@',''))
if( !number ){
return false
}else{
return true
}
} catch (error) {
if( retry_ == false ){
// THIS IS A setTimeout with promise
await sleep(1000)
await checkContact(id_chat,true)
}else{
console.error(error)
return false
}
}
}`
@pedropuppim how did you solve it
whatsapp fixing alone