Hi!
We have for the latest downtimes of Backendless servers seen weird crashes in our Android applications.These stop once the server is back up but whenever Backendless servers are down we see spikes in crash reports. Example:
java.lang.NullPointerException:
at com.indevlabs.shlive.LivePage$fetchGames$1.handleResponse (LivePage.kt:109)
at com.backendless.async.message.AsyncMessage$ResponseHandler.handle (AsyncMessage.java:64)
at com.backendless.async.message.AsyncMessage.handleCallback (AsyncMessage.java:41)
at com.backendless.core.AndroidCarrier$1.handleMessage (AndroidCarrier.java:37)
at android.os.Handler.dispatchMessage (Handler.java:103)
at android.os.Looper.loop (Looper.java:213)
at android.app.ActivityThread.main (ActivityThread.java:8178)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)
We’ve checked our line 109 and it looks like this:
Backendless.Persistence.of(Games::class.java).find(queryBuilder, object : AsyncCallback<List<Games>> {
And the content after it is the following:
override fun handleResponse(foundGames: List<Games>) {
handleGames(foundGames)
if (refresh_live != null) {
refresh_live.isRefreshing = false
}
}
override fun handleFault(fault: BackendlessFault) {
println(fault)
}
})
We can’t understand why we get a NullPointerException when the servers are down in this code… Shouldn’t a downtime throw the handleFault callback? (We are using the SDK 6.2.1)