whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Evaluation failed: i

Open AlAreqi320 opened this issue 2 years ago • 8 comments

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

AlAreqi320 avatar May 17 '22 12:05 AlAreqi320

too little information sometimes I meet Evaluation failed: g

MinosIE avatar May 17 '22 13:05 MinosIE

in my case it happened in functions getNumberID and isRegisteredUser

erlipinheiro avatar May 17 '22 13:05 erlipinheiro

@erlipinheiro I found it when I trigger function isRegisteredUser WWebVersion: 2.2216.8 Whatsapp-webjs: 1.16.6

MinosIE avatar May 17 '22 13:05 MinosIE

me too

Mohadin avatar May 17 '22 14:05 Mohadin

This was caused by Whatsapp that has now been resolved.

pedropuppim avatar May 17 '22 15:05 pedropuppim

@pedropuppim how did you solve it

MinosIE avatar May 18 '22 02:05 MinosIE

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
        }  
    }
}`

g4w4 avatar May 18 '22 03:05 g4w4

@pedropuppim how did you solve it

whatsapp fixing alone

pedropuppim avatar May 26 '22 13:05 pedropuppim