[Beta3] NPE BleManager$BleManagerGattCallback.nextRequest(boolean)' on a null object reference
See original GitHub issueOn Beta3, it happened after I tried to connect and received a TimeoutException
Process: com.mycompany, PID: 20828
java.lang.NullPointerException: Attempt to invoke direct method 'void no.nordicsemi.android.ble.BleManager$BleManagerGattCallback.nextRequest(boolean)' on a null object reference
at no.nordicsemi.android.ble.BleManager$BleManagerGattCallback.access$1300(BleManager.java:1836)
at no.nordicsemi.android.ble.BleManager.lambda$enqueue$4(BleManager.java:1804)
at no.nordicsemi.android.ble.-$$Lambda$BleManager$KDSxdgn5nClZRFe_FvyLUfX8mWc.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Might it be that I immediately tried to connect again, even before receiving bluetoothgatt close callback?
//Exception stack trace
2018-10-01 14:51:21.872 D/MyClass: Invoking connect
2018-10-01 14:51:21.873 D/BluetoothGatt: close()
2018-10-01 14:51:21.873 D/BluetoothGatt: unregisterApp() - mClientIf=7
2018-10-01 14:51:21.881 D/MyClass: onError: a BLE error has occurred message = Error on connection state change, code = 133
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
android - nullObjectReference on a bool - Stack Overflow
for some reason i'm getting a null object reference of this Boolean and i don't know why. i cant figure out why the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I haven’t been able to reproduce the issue, congrats!
Also, I’d say this branch works much better, I’d say there was a stability decrease in beta 3, I don’t know if it makes sense 🤷♂️
I’m going to do it right now