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 - create (phoneNumber) codigo conexao -celular - Não retorna o codigo lib fica aguardando infinitamente o codigo #2313

Open
jaderesp opened this issue Aug 20, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@jaderesp
Copy link

Description

[Ao inicializar a lib (sessao) create informando o paramentro config.phoneNumber (gerar codigo de conexão via celular) a lib executa a função para geração do codigo, porém o codigo nunca é gerado, ao debugar a função WPP.conn.genLinkDeviceCodeForPhoneNumber(), é exibido um erro incomum (try catch), e o codigo não é retornado o que a Promise da função nunca é resolvida nem retornada.]
Screenshot_167
Screenshot_165
Screenshot_154

@jaderesp jaderesp added bug Something isn't working needs triage labels Aug 20, 2024
@icleitoncosta
Copy link
Contributor

Ola @jaderesp

Testei a função e está funcionando normalmente, verifique a sua função create, segue exemplo da forma correta.

wppconnect
  .create({
    session: 'sessionName',
    phoneNumber: '5521999999999',
    logQR: true,
    catchLinkCode: (str) => { 
      console.log('Vamos ao codigo');
      console.log(str);
    }
  })
  .then((client) => start(client))
  .catch((error) => {
    console.log(error);
  });

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

No branches or pull requests

2 participants