Backendless Support
 
Waiting for user's response

App crash on register device - Error while committing the transaction

Hi, I have issue with device register, app crash when try to register device, the code I use to register device and stack track are below. My application id is 5396D848-49DA-BBA7-FFCE-3183CE0A0000. I am using compile 'com.backendless:backendless:4.0.3'. Device info:Galaxy S5, OS 6.0.1. The device token is "dfOUgnupTkE:APA91bFHbNZKkfPCKQMS9LYPyyhhtkZQlyC-I9Wejv9frWS1KlLx9lg0_Gxmc9OETPnHx5isICyFt6wIVavvOq-NgX-kzaSo2LpXPbMwqkgEz2uHU3p0ZI7WxlHaY_LCGa6Eu1xAnPyk". Using debugging, it seem crash on registerFurther method when handleFault return with error.Thanks

  1. try {
  2. Backendless.Messaging.registerDevice(context.getString(R.string.google_project_number), channel, new AsyncCallback<Void>() {
  3. @Override
  4. public void handleResponse(Void response) {
  5. Log.e("register device", "Device has been subscribed to channel " + channel);
  6. }
  7. @Override
  8. public void handleFault(BackendlessFault fault) {
  9. Log.e("register device", "Device subscription failed. " + fault.getMessage());
  10. }
  11. });
  12. } catch (Exception e) {
  13. e.printStackTrace();
  14. return false;
  15. }

java.lang.RuntimeException: Could not register device on Backendless server: javax.persistence.RollbackException: Error while committing the transaction

at com.backendless.push.BackendlessPushService.onError(BackendlessPushService.java:88)

at com.backendless.push.BackendlessPushService$1.handleFault(BackendlessPushService.java:252)

at com.backendless.Messaging$2.handleFault(Messaging.java:255)

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:158)

at android.app.ActivityThread.main(ActivityThread.java:7224)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Leave a Comment

Comments (1)

photo
1

Please try again, it should work now