Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERRO NA FUNÇÃO "CHECKNUMBERSTATUS" #647

Closed
mvac1991 opened this issue Nov 13, 2021 · 1 comment
Closed

ERRO NA FUNÇÃO "CHECKNUMBERSTATUS" #647

mvac1991 opened this issue Nov 13, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mvac1991
Copy link

Description

Ao chamar a função "checkNumberStatus" passando o telefone do cliente + '@c.us' está retornando erro. Porém, isso só acontece com determinados números, não é com todos.

Environment

  • Wppconnect version(s): [1.10.1]
  • Browser: [e.g. Chrome 87, Chromium 85]
  • OS: [LInux Centos 6]
  • Node version: [Node 7.6.0]
  • WhatsApp version: [2.2144.10]
  • MultiDevice (BETA): no

Steps to Reproduce

  1. Call function "checkNumberStatus" with '554498764492@c.us'

Log Output

Error in App.js > getAuth > checkNumberStatus -> TypeError: Cannot read properties of undefined (reading 'createWid')
0|App  |     at Object.<anonymous> (/home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:110360)
0|App  |     at Generator.next (<anonymous>)
0|App  |     at vo (/home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:85350)
0|App  |     at a (/home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:85554)
0|App  |     at /home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:85615
0|App  |     at j (https://web.whatsapp.com/bootstrap_qr.37b05cd2420f8e06848b.js:2:390225)
0|App  |     at new g (https://web.whatsapp.com/bootstrap_qr.37b05cd2420f8e06848b.js:2:381120)
0|App  |     at Object.<anonymous> (/home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:85494)
0|App  |     at Object.checkNumberStatus (/home/zapmutacao/node_modules/@wppconnect-team/wppconnect/dist/lib/wapi/wapi.js:1:110591)
0|App  |     at __puppeteer_evaluation_script__:44:68
0|App  | Problem with validate customer number profile.

Your Code

try {
      validate_profile = user_whatsapp + '@c.us';
      customer_whatsapp = await client.checkNumberStatus(validate_profile);
      if (customer_whatsapp) {
          customer_whatsapp = customer_whatsapp.id._serialized;
      }
  } catch (error) {
      console.log('Error in App.js > getAuth > checkNumberStatus ->', error);
  }

Additional context / Screenshot

image

@mvac1991 mvac1991 added the bug Something isn't working label Nov 13, 2021
@alanvictorjp
Copy link

Esse erro: TypeError: Cannot read properties of undefined (reading 'createWid') vem incomodando mesmo. Com o método sendText também acontece, porem, as vezes sim e as vezes não, vejo acontecer com mais frequência, quando o node é reiniciado e enviado a primeira mensagem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants