eclipse / paho.mqtt.android

MQTT Android
Other
2.89k stars 865 forks source link

[BUG] mqtt connect fail, cause: Attempt to invoke virtual method 'java.lang.Object byte[].clone()' on a null object reference #438

Open cyixlq opened 3 years ago

cyixlq commented 3 years ago

Please fill out the form below before submitting, thank you!

Android API Version Bug Seen on: Android L Android Version Bug Seen on: 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.2' 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Description of Bug:

connect fail

Console Log output (if available):

com.lzy.smartcan W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object byte[].clone()' on a null object reference 10-23 11:50:13.843 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.internal.MqttPersistentData.(MqttPersistentData.java:63) 10-23 11:50:13.843 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence.get(MqttDefaultFilePersistence.java:219) 10-23 11:50:13.843 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.internal.ClientState.restoreState(ClientState.java:342) 10-23 11:50:13.844 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.internal.ClientState.(ClientState.java:172) 10-23 11:50:13.844 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.internal.ClientComms.(ClientComms.java:108) 10-23 11:50:13.844 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:470) 10-23 11:50:13.844 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:320) 10-23 11:50:13.844 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.android.service.MqttConnection.connect(MqttConnection.java:289) 10-23 11:50:13.845 3407-3407/com.lzy.smartcan W/System.err: at org.eclipse.paho.android.service.MqttService.connect(MqttService.java:329)

sandeepsankla commented 2 years ago

Hi @cyixlq You sure this issue is fixed in 1.1.2-SNAPSHOT, Please let me know how to know import 1.1.2-SNAPSHOT. Unable to resolved Gradle dependency for 1.1.2-SNAPSHOT