Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in WebSocketReceiver #232

Open
Max01010101010101 opened this issue Aug 11, 2017 · 6 comments
Open

NullPointerException in WebSocketReceiver #232

Max01010101010101 opened this issue Aug 11, 2017 · 6 comments
Assignees

Comments

@Max01010101010101
Copy link

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

This bug exists Release Version 1.1.1 (Java Repository Master Branch)
Also this bug exists in Snapshot Version 1.1.2-SNAPSHOT (Android Service Repository Master Branch)

The android version bug Seen on is 6

Console Log output:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.lang.Thread.join()' on a null object reference at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketReceiver.stop(WebSocketReceiver.java:85) at org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketReceiver.run(WebSocketReceiver.java:120) at java.lang.Thread.run(Thread.java:818)

@nguyenlinhnttu
Copy link

I also have the same error as you.
I use version :
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1'
compile 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'

@jpwsutton jpwsutton added the bug label Aug 25, 2017
@jpwsutton jpwsutton self-assigned this Aug 25, 2017
@jpwsutton
Copy link
Member

Looks like an issue with the Java client, somehow the thread is null. I've put a fix forward today which will be built in the Java SNAPSHOTS. (eclipse/paho.mqtt.java@adc1160)

@shriharsha-bhagwat
Copy link

shriharsha-bhagwat commented Dec 31, 2018

Is this issue resolved? I am still facing this issue in following version :
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0'

What steps need to be taken to avoid this issue?

@systane
Copy link

systane commented Oct 7, 2019

@android-bash The fix submitted by @jpwsutton is available at version 1.2.2. I didn't check the version 1.2.1.

@dongweiq
Copy link

mark下,升级到1.2.2版本就没有问题了,可以愉快地和js版本的websocket通信了

hannesa2 referenced this issue in hannesa2/paho.mqtt.android Feb 8, 2021
* Fixing typo in IMqttClient.java

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Issue #213

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Issue #249: Null Check for reconnect timer & Connect options

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
@mustafaboleken
Copy link

It's solved. You can use paho.mqtt.java version 1.2.5

eclipse/paho.mqtt.java@adc1160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants