QR Code not showing for login in terminal
Disconnected: LOGGED_OUT
Login QR code not showing in terminal.
Even delete the .cobal folder and tried , but not showing QR.
Pairing code also not getting to app, may be whatsapp detected.
I’m experiencing the same problem and was about to open an issue.
Here are some details about the problem:
- I can’t even log in or register a new device.
- It always disconnects with the reason LOGGED_OUT.
- I always receive a node with description "failure", reason code 405, and the location alternates between rva, odn, cco, lla, cln and frc (those are the ones I could capture).
Note: Web API
Same issue
Well... it's the WhatsApp version. I think 0.0.10 will fix this.
I’m using a workaround until version 0.0.10 is deployed: In version 0.0.9, there’s a class called WhatsappMetadata. In the getWebVersion method (line 54), a request is sent to WhatsApp to retrieve the current version. WhatsApp returns 2.3000.0, so webVersion is set to 2.3000.0, which causes the errors.
What I did was debug the code, place a breakpoint on line 56 of WhatsappMetadata, and set webVersionResponse as new WebVersionResponse(false, true, true, 0, null, "2.3000.1023231279")
That worked.
same problem here
java.lang.RuntimeException: Cannot login: no response from Whatsapp
Same here, always disconnects
Same thing here!
Well... it's the WhatsApp version. I think 0.0.10 will fix this.
I’m using a workaround until version 0.0.10 is deployed: In version 0.0.9, there’s a class called WhatsappMetadata. In the getWebVersion method (line 54), a request is sent to WhatsApp to retrieve the current version. WhatsApp returns 2.3000.0, so webVersion is set to 2.3000.0, which causes the errors.
What I did was debug the code, place a breakpoint on line 56 of WhatsappMetadata, and set webVersionResponse as
new WebVersionResponse(false, true, true, 0, null, "2.3000.1023231279")That worked.
Fixed for me!
Great temporary solution for those able to build the project.
I fix it changing the device of the store of my Whatsapp object before connect whatsapp.store().setDevice(CompanionDevice.web(Version.of("2.3000.1023231279")));
Well... it's the WhatsApp version. I think 0.0.10 will fix this.
I’m using a workaround until version 0.0.10 is deployed: In version 0.0.9, there’s a class called WhatsappMetadata. In the getWebVersion method (line 54), a request is sent to WhatsApp to retrieve the current version. WhatsApp returns 2.3000.0, so webVersion is set to 2.3000.0, which causes the errors.
What I did was debug the code, place a breakpoint on line 56 of WhatsappMetadata, and set webVersionResponse as
new WebVersionResponse(false, true, true, 0, null, "2.3000.1023231279")That worked.
Just as a note.
I tested using the most recent changes of this repository and this issue is now fixed.
0.0.10 Commits solved this.
I fix it changing the device of the store of my Whatsapp object before connect whatsapp.store().setDevice(CompanionDevice.web(Version.of("2.3000.1023231279")));
Well... it's the WhatsApp version. I think 0.0.10 will fix this. I’m using a workaround until version 0.0.10 is deployed: In version 0.0.9, there’s a class called WhatsappMetadata. In the getWebVersion method (line 54), a request is sent to WhatsApp to retrieve the current version. WhatsApp returns 2.3000.0, so webVersion is set to 2.3000.0, which causes the errors. What I did was debug the code, place a breakpoint on line 56 of WhatsappMetadata, and set webVersionResponse as
new WebVersionResponse(false, true, true, 0, null, "2.3000.1023231279")That worked.
Thanks! I didn't know that
I fix it changing the device of the store of my Whatsapp object before connect whatsapp.store().setDevice(CompanionDevice.web(Version.of("2.3000.1023231279")));
This works!
For older versions (Whatsappweb4j) you can set the version on the Options class:
var options = Whatsapp.Options.newOptions()
.version(Version.builder().primary(2).secondary(3000).tertiary(1023231279).build())
.build();
Whatsapp.newConnection(options).connect()
this is fixed in 0.0.10, but i haven't released it yet
Good evening everyone, I took a look at the previous comments. Has anyone managed to solve this using the Whatsapp.webBuilder() constructor?
I can't solve the version and I need the QrCode because I pass it via URI request.
Thank you very much to anyone who can help me.
Whatsapp.webBuilder()
.firstConnection()
.name("CMCE LOGIN NÃO DESCONECTE")
.mediaProxySetting(MediaProxySetting.NONE)
.automaticMessageReceipts(false)
.textPreviewSetting(TextPreviewSetting.DISABLED)
.historySetting(WebHistorySetting.discard(true))
.autodetectListeners(true)
.unregistered(qrCode -> {
System.out.println("QRCodeRecebido");
this.qrCode = qrCode;
})
.addLoggedInListener(api -> {
whatsappFuture.complete(api);
System.out.printf("conectado: %s%n", api.store().privacySettings());
isDisconnecting = false;
})
.addDisconnectedListener(reason -> {
whatsappFuture = new CompletableFuture<>();
System.out.printf("disconectado: %s%n", reason);
}).connect();
Good evening everyone, I took a look at the previous comments. Has anyone managed to solve this using the Whatsapp.webBuilder() constructor?
I can't solve the version and I need the QrCode because I pass it via URI request.
Thank you very much to anyone who can help me.
Whatsapp.webBuilder() .firstConnection() .name("CMCE LOGIN NÃO DESCONECTE") .mediaProxySetting(MediaProxySetting.NONE) .automaticMessageReceipts(false) .textPreviewSetting(TextPreviewSetting.DISABLED) .historySetting(WebHistorySetting.discard(true)) .autodetectListeners(true) .unregistered(qrCode -> { System.out.println("QRCodeRecebido"); this.qrCode = qrCode; }) .addLoggedInListener(api -> { whatsappFuture.complete(api); System.out.printf("conectado: %s%n", api.store().privacySettings()); isDisconnecting = false; }) .addDisconnectedListener(reason -> { whatsappFuture = new CompletableFuture<>(); System.out.printf("disconectado: %s%n", reason); }).connect();
you can do like that
Whatsapp wl= Whatsapp.webBuilder()
.firstConnection()
.name("CMCE LOGIN NÃO DESCONECTE")
.mediaProxySetting(MediaProxySetting.NONE)
.automaticMessageReceipts(false)
.textPreviewSetting(TextPreviewSetting.DISABLED)
.historySetting(WebHistorySetting.discard(true))
.autodetectListeners(true)
.unregistered(qrCode -> {
System.out.println("QRCodeRecebido");
this.qrCode = qrCode;
})
.addLoggedInListener(api -> {
whatsappFuture.complete(api);
System.out.printf("conectado: %s%n", api.store().privacySettings());
isDisconnecting = false;
})
.addDisconnectedListener(reason -> {
whatsappFuture = new CompletableFuture<>();
System.out.printf("disconectado: %s%n", reason);
});
wl.store().setDevice(CompanionDevice.web(Version.of("2.3000.1023231279")));
wl.connect() // Connect to Whatsapp asynchronously
.join() // Await the result
.awaitDisconnection();
fixed in 0.0.10