Closed karthikcse closed 3 years ago
Same problem I faced now. Does anyone have any solution??
No solution as of yet. I am also experiencing the same problem. FATAL EXCEPTION: MQTT Con: paho260179451002981
I've also met it. How to solve this problem?
Let me see the paho library you are using
Let me see the paho library you are using
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0' implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' The two above
Alright. I am using the same libraries as yours. My problem with this exception was forgetting to close mqtt connection when not needed. Please verify your connection using MQTT client Application.
Anyone find the solution?
The issue has been solved by increasing the MQTT connection limit on the server-side.
Using paho android service version org.eclipse.paho:org.eclipse.paho.android.service:1.1.1
fixed it for me
I confirm what @TheMrPhantom said, by upgrading the library, there is no crash and they are handling if a resource failed to call close as @Joesta said 👍
Description of Bug:
app crash when ever the MQTT Brocker termination occur
Console Log output (if available):
E/AndroidRuntime: FATAL EXCEPTION: MQTT Con: paho1056446537855693 Process: com.mobitech.mconproject, PID: 16966 java.lang.NullPointerException: cancel() called with a null PendingIntent at android.app.AlarmManager.cancel(AlarmManager.java:945) at org.eclipse.paho.android.service.AlarmPingSender.stop(AlarmPingSender.java:86) at org.eclipse.paho.client.mqttv3.internal.ClientComms.shutdownConnection(ClientComms.java:327) at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:608) at java.lang.Thread.run(Thread.java:760)