eclipse-paho / paho.mqtt.android

MQTT Android
Other
2.94k stars 892 forks source link

Connection Failure #251

Open Namra-Khurshid opened 7 years ago

Namra-Khurshid commented 7 years ago

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

Android API Version Bug Seen on:

Android Version Bug Seen on:

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:

E.g. Steps to re-create, how often does this happen etc..

Console Log output (if available):

Namra-Khurshid commented 7 years ago

Using org.eclipse.paho:org.eclipse.paho.android.service:1.1.1 I always encounter connection failure.

jpwsutton commented 7 years ago

Hi,

zdsagittarius commented 4 years ago

when I call MqttAndroidClient.connect()

version is 1.1.1

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object byte[].clone()' on a null object reference 01-11 17:25:58.462 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.internal.MqttPersistentData.(MqttPersistentData.java:63) 01-11 17:25:58.462 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence.get(MqttDefaultFilePersistence.java:219) 01-11 17:25:58.462 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.internal.ClientState.restoreState(ClientState.java:342) 01-11 17:25:58.462 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.internal.ClientState.(ClientState.java:172) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.internal.ClientComms.(ClientComms.java:108) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:470) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:320) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.android.service.MqttConnection.connect(MqttConnection.java:289) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.android.service.MqttService.connect(MqttService.java:321) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.android.service.MqttAndroidClient.doConnect(MqttAndroidClient.java:436) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.android.service.MqttAndroidClient.access$200(MqttAndroidClient.java:75) 01-11 17:25:58.463 19434 19434 W System.err: at org.eclipse.paho.android.service.MqttAndroidClient$MyServiceConnection.onServiceConnected(MqttAndroidClient.java:112) 01-11 17:25:58.463 19434 19434 W System.err: at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1264) 01-11 17:25:58.463 19434 19434 W System.err: at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1281) 01-11 17:25:58.463 19434 19434 W System.err: at android.os.Handler.handleCallback(Handler.java:815) 01-11 17:25:58.463 19434 19434 W System.err: at android.os.Handler.dispatchMessage(Handler.java:104) 01-11 17:25:58.463 19434 19434 W System.err: at android.os.Looper.loop(Looper.java:207) 01-11 17:25:58.463 19434 19434 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5795) 01-11 17:25:58.464 19434 19434 W System.err: at java.lang.reflect.Method.invoke(Native Method) 01-11 17:25:58.464 19434 19434 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844) 01-11 17:25:58.464 19434 19434 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:734)