I got this crash report on Crashlytics. The device is a Nexus 5X, Android version 6.0.1.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
at com.google.firebase.database.tubesock.WebSocketHandshake.verifyServerHandshakeHeaders(com.google.firebase:firebase-database@@16.0.5:111)
at com.google.firebase.database.tubesock.WebSocket.runReader(com.google.firebase:firebase-database@@16.0.5:418)
at com.google.firebase.database.tubesock.WebSocket.access$000(com.google.firebase:firebase-database@@16.0.5:47)
at com.google.firebase.database.tubesock.WebSocket$2.run(com.google.firebase:firebase-database@@16.0.5:143)
at java.lang.Thread.run(Thread.java:818)
Same here
Me too.
There is a pull request addressing this issue
https://github.com/firebase/firebase-android-sdk/pull/119
Same here.
The same here. The same device and Android version.
Per the referenced PR, the fix should go out in the next SDK release, currently scheduled for end of January.
Same here with latest C++ SDK 5.5.0
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
at com.google.firebase.database.tubesock.WebSocketHandshake.verifyServerHandshakeHeaders(com.google.firebase:firebase-database@@16.0.5:111)
at com.google.firebase.database.tubesock.WebSocket.runReader(com.google.firebase:firebase-database@@16.0.5:418)
at com.google.firebase.database.tubesock.WebSocket.access$000(com.google.firebase:firebase-database@@16.0.5:47)
at com.google.firebase.database.tubesock.WebSocket$2.run(com.google.firebase:firebase-database@@16.0.5:143)
at java.lang.Thread.run(Thread.java:818)
Hi @mrpuzzler,
From your stack trace, it looks like you're using version 16.0.5 of the Database. This NPE issue was fixed in 16.0.6 (released on 2019-01-25). https://firebase.google.com/support/release-notes/android. Could you update the Database component and try again?
I use version as declared here https://firebase.google.com/docs/cpp/setup ... is it safe to use other version?
Yes, it should be safe; the docs just need to be updated. (I'll see if I can get that to happen.)
Ok; slight refinement/correction to my last comment:
If you've got a c++ app, then it should be safe to update to 16.0.6 within your gradle file as I suggested.
If you've got a unity app, then it's slightly more involved:
The docs themselves represent the versions that were in use when the sdk's were spun up, so they're the "best" versions to use, but in cases like this where there's a known bug that's been fixed, it should be safe to upgrade beyond the versions listed so long as there's no breaking changes. (Breaking changes are indicated by an increase in the major version number.)
I use C++ app, updated to 16.0.6 ... uploaded/released app ... hope it will fly without any bugs.
Most helpful comment
Per the referenced PR, the fix should go out in the next SDK release, currently scheduled for end of January.