Cobalt icon indicating copy to clipboard operation
Cobalt copied to clipboard

Reconnects during registration process.

Open schuettec opened this issue 10 months ago • 3 comments

Hi there, thanks for this lib! Great work!

While performing the registration process, I get multiple reconnects. Every time a reconnect occurs, a new code is generated. Is this normal or am I doing something wrong?

The code is use:

        Whatsapp whatsapp = Whatsapp.webBuilder()
            .lastConnection()
            .unregistered(phoneNumber, PairingCodeHandler.toTerminal())
            .connect()
            .join();

I see several codes on the console and the time to enter and authorize them in WhatsApp is too short.

schuettec avatar Apr 25 '24 09:04 schuettec

Hi there, thanks for this lib! Great work!

While performing the registration process, I get multiple reconnects. Every time a reconnect occurs, a new code is generated. Is this normal or am I doing something wrong?

The code is use:

        Whatsapp whatsapp = Whatsapp.webBuilder()
            .lastConnection()
            .unregistered(phoneNumber, PairingCodeHandler.toTerminal())
            .connect()
            .join();

I see several codes on the console and the time to enter and authorize them in WhatsApp is too short.

Are you using 0.0.5? What if you add .awaitDisconnection() ?

Auties00 avatar Apr 27 '24 20:04 Auties00

Hi, Sorry I forgot to mention the version. I tried with 0.0.4 and 0.0.5

Thx for the hint. I will test the scenario with .awaitDisconnection().

Alessandro Autiero @.***> schrieb am Sa., 27. Apr. 2024, 22:15:

Hi there, thanks for this lib! Great work!

While performing the registration process, I get multiple reconnects. Every time a reconnect occurs, a new code is generated. Is this normal or am I doing something wrong?

The code is use:

    Whatsapp whatsapp = Whatsapp.webBuilder()
        .lastConnection()
        .unregistered(phoneNumber, PairingCodeHandler.toTerminal())
        .connect()
        .join();

I see several codes on the console and the time to enter and authorize them in WhatsApp is too short.

Are you using 0.0.5? What if you add .awaitDisconnection() ?

— Reply to this email directly, view it on GitHub https://github.com/Auties00/Cobalt/issues/484#issuecomment-2081170264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNFVQSB3CFZZNPI4X5UJ2TY7QBMVAVCNFSM6AAAAABGYQAONGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGE3TAMRWGQ . You are receiving this because you authored the thread.Message ID: @.***>

schuettec avatar Apr 27 '24 21:04 schuettec

Updates?

Darker935 avatar May 08 '24 19:05 Darker935

Hi, Sorry I forgot to mention the version. I tried with 0.0.4 and 0.0.5 Thx for the hint. I will test the scenario with .awaitDisconnection(). Alessandro Autiero @.> schrieb am Sa., 27. Apr. 2024, 22:15: Hi there, thanks for this lib! Great work! While performing the registration process, I get multiple reconnects. Every time a reconnect occurs, a new code is generated. Is this normal or am I doing something wrong? The code is use: Whatsapp whatsapp = Whatsapp.webBuilder() .lastConnection() .unregistered(phoneNumber, PairingCodeHandler.toTerminal()) .connect() .join(); I see several codes on the console and the time to enter and authorize them in WhatsApp is too short. Are you using 0.0.5? What if you add .awaitDisconnection() ? — Reply to this email directly, view it on GitHub <#484 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNFVQSB3CFZZNPI4X5UJ2TY7QBMVAVCNFSM6AAAAABGYQAONGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGE3TAMRWGQ . You are receiving this because you authored the thread.Message ID: @.>

This is the solution

Auties00 avatar May 18 '24 12:05 Auties00

Hi sorry for the delay. I tried with .awaitReconnection() but that does not change anything. The registration process is aborted by a reconnect after 20 seconds or so.

Whatsapp.webBuilder()
            .lastConnection()
            .unregistered(phoneNumber, PairingCodeHandler.toTerminal())
            .connect()
            .awaitDisconnection();

And I get this output:

<REGISTRATION_CODE>
Disconnected (reason): RECONNECTING
<REGISTRATION_CODE>

schuettec avatar Jul 05 '24 07:07 schuettec