Backendless Exception on device
This exception occurs occasionally when I run the Chat App. It seems the Backendless has failed to register the device and is throwing an error. How can I resolve this, or at least catch this exception so that it won't crash the app entirely?
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.braunster.chatsdk, PID: 15600 java.lang.RuntimeException: Could not register device on Backendless server: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true at com.backendless.push.BackendlessBroadcastReceiver.onError(BackendlessBroadcastReceiver.java:148) at com.backendless.push.BackendlessBroadcastReceiver$1.handleFault(BackendlessBroadcastReceiver.java:310) at com.backendless.Messaging$2.handleFault(Messaging.java:247) at com.backendless.async.message.AsyncMessage$FaultHandler.handle(AsyncMessage.java:83) 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:98) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
This problem has happened to others: http://support.backendless.com/topic/android-push-registration-crashes-app
The accepted answer was not applicable as the suggested removal of certain lines in the manifest does not exist in the ChatCat project.
We have found the problem causing this and will push it in the next ChatSDK commit:
-
The need to upgrade Backendless 3.0.17.1 to 3.0.24 (MessageStatus Class moved): Sdk/build.gradle -> 'com.backendless:backendless:3.0.24'
-
In 3.0.24 the MessageStatus class has moved. The need to change the import statement to this: import com.backendless.services.messaging.MessageStatus;
The error goes away with this upgrade of the Backendless library.
Hi Simon,
Was this issue patched? I notice that the other related issue has been closed.
-- Kyle