eclipse-paho / eclipse-paho/paho.mqtt.java

NullPointerException in org.eclipse.paho.client.mqttv3.internal.ConnectActionListener.onFailure()

Open
#883 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

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

- [x] Bug exists Release Version 1.2.5 ( Master Branch)
- [x] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [x] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

We meet NullPointerException during automatic tests. It happened when connection is closed and reconnect timer try reconnect. Please check the logs below.

- log1:
java.lang.NullPointerException: Attempt to get length of null array at org.eclipse.paho.client.mqttv3.internal.ConnectActionListener.onFailure(Proguard:119) at org.eclipse.paho.client.mqttv3.internal.ConnectActionListener.connect(Proguard:188) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.connect(Proguard:774) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.attemptReconnect(Proguard:1408)

- log2:
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.eclipse.paho.client.mqttv3.internal.CommsCallback.setReconnectCallback(org.eclipse.paho.client.mqttv3.MqttCallbackExtended)' on a null object reference\r\n"
b'06-16 16:22:10.970 E/AndroidRuntime( 3573): \tat org.eclipse.paho.client.mqttv3.internal.ClientComms.setReconnectCallback(Proguard:586)\r\n'
b'06-16 16:22:10.970 E/AndroidRuntime( 3573): \tat org.eclipse.paho.client.mqttv3.MqttAsyncClient.connect(Proguard:757)\r\n'
b'06-16 16:22:10.970 E/AndroidRuntime( 3573): \tat org.eclipse.paho.client.mqttv3.MqttAsyncClient.attemptReconnect(Proguard:1408)\r\n'

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.