You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client.addClientActionListener(new ClientActionListener() {
@Override
public void onQRCodeScanRequired(BufferedImage qr) {
System.out.println("Authentication required! Please scan the QR code!");
File outputFile = new File("qr.jpg");
try {
ImageIO.write(qr, "jpg", outputFile);
} catch (IOException e) {
e.printStackTrace();
}
}
});
int httpCode = client.openConnection();
if (httpCode == 200) {
System.out.println("Logged in successfully!");
} else {
System.out.println("Login failed! Code: " + httpCode);
}
throw an exception :
Exception in thread "main" java.lang.IllegalStateException: Not a JSON Object: ["Cmd",{"type":"update"}] at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) at icu.jnet.whatsjava.helper.Utils.encodeValidJson(Utils.java:56) at icu.jnet.whatsjava.whatsapp.WABackendConnector.initOrRestoreSession(WABackendConnector.java:101) at icu.jnet.whatsjava.whatsapp.WABackendConnector.openConnection(WABackendConnector.java:58)
The text was updated successfully, but these errors were encountered:
java.lang.IllegalStateException: Not a JSON Object: ["Cmd",{"type":"update"}] at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) ~[gson-2.8.7.jar:na] at icu.jnet.whatsjava.helper.Utils.encodeValidJson(Utils.java:56) ~[WhatsJava-v1.0.2.jar:na] at icu.jnet.whatsjava.whatsapp.WABackendConnector.initOrRestoreSession(WABackendConnector.java:101) ~[WhatsJava-v1.0.2.jar:na]
Hello
When I run :
throw an exception :
Exception in thread "main" java.lang.IllegalStateException: Not a JSON Object: ["Cmd",{"type":"update"}] at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) at icu.jnet.whatsjava.helper.Utils.encodeValidJson(Utils.java:56) at icu.jnet.whatsjava.whatsapp.WABackendConnector.initOrRestoreSession(WABackendConnector.java:101) at icu.jnet.whatsjava.whatsapp.WABackendConnector.openConnection(WABackendConnector.java:58)
The text was updated successfully, but these errors were encountered: