Auties00 / Cobalt

Standalone unofficial fully-featured Whatsapp Web and Mobile API for Java and Kotlin
MIT License
611 stars 179 forks source link

Disconnected: LOGGED_OUT #454

Closed koalsky closed 3 months ago

koalsky commented 4 months ago

Version: Cobalt 0.3 Error: Disconnected: LOGGED_OUT

I'm using 3.5.1 now and it works fine. Now ready to upgrade. Then I tested V0.03, and the result was logout

Whatsapp.webBuilder() // Use the Web api
      .lastConnection() // Deserialize the last connection, or create a new one if it doesn't exist
      .unregistered(QrHandler.toTerminal()) // Print the QR to the terminal
      .addLoggedInListener(api -> System.out.printf("Connected: %s%n", api.store().privacySettings())) // Print a message when connected
      .addDisconnectedListener(reason -> System.out.printf("Disconnected: %s%n", reason)) // Print a message when disconnected
      .addNewChatMessageListener(message -> System.out.printf("New message: %s%n", message.toJson())) // Print a message when a new chat message arrives
      .connect() // Connect to Whatsapp asynchronously
      .join(); // Await the result
koalsky commented 4 months ago

The same code V0.02 can log in normally

Auties00 commented 4 months ago

Yeah this is a bug, will be fixed on 0.0.4

Auties00 commented 3 months ago

Fixed