OneSignal/OneSignal-Android-SDK

[Bug]: login user fails due to corrupted `onesignalId`, stop subscribing & receiving pushes

Opened this issue · 1 comments

What happened?

There's an irrecoverable state we can run into where the device no longer subscribes to push despite re-installing the app. Logs show login failure due to non-uuid onesignalId

Steps to reproduce?

Unsure.

1. Install app
2. Subscribe
3. Uninstall app
4. Reinstall

at some point, it entered this irrecoverable state

What did you expect to happen?

App should resubscribe upon re-install and not fail on login.

OneSignal Android SDK version

5.2.2

Android version

14

Specific Android models

* Pixel 7

Relevant log output

2024-09-22 00:26:32.886 25014-25014 GrantPermi...sViewModel com....android.permissioncontroller  V  Logged buttons presented and clicked permissionGroupName=android.permission-group.NOTIFICATIONS uid=10671 selectedPrecision=0 package=com.example.app presentedButtons=9 clickedButton=1 isPermissionRationaleShown=false sessionId=-4735407853372208505 targetSdk=34
2024-09-22 00:26:32.894 25014-25014 GrantPermi...sViewModel com....android.permissioncontroller  V  Permission grant result requestId=-4735407853372208505 callingUid=10671 callingPackage=com.example.app permission=android.permission.POST_NOTIFICATIONS isImplicit=false result=4 isPermissionRationaleShown=false
 E  Operation execution failed with eventual retry, pausing the operation repo: [{"name":"login-user","appId":"39310c32-50cf-417d-a911-a2df4e26f711","onesignalId":"local-1ffa3489-5db2-4574-a139-061d58a37126","id":"20809ec6-dcd6-4039-8ba1-5962cc34be7c"}]
2024-09-22 00:19:20.899 13724-13744 OneSignal               com.example.app            W  [DefaultDispatcher-worker-3] HttpClient: Got Response = POST - STATUS: 400 - Body: {"errors":["There was a problem in the JSON you submitted","uuid: incorrect UUID length 42 in string \"local-e4d27b3f-b469-42bf-9ab6-60d1e63a6460\""],"success":false}
2024-09-22 00:19:20.901 13724-13879 OneSignal               com.example.app            W  [Thread-15] OutcomeEventsController.sendSavedOutcomeEvent: Sending outcome with name: exercise_completed failed with status code: 400 and response: {"errors":["There was a problem in the JSON you submitted","uuid: incorrect UUID length 42 in string \"local-e4d27b3f-b469-42bf-9ab6-60d1e63a6460\""],"success":false}
                                                                                                    Outcome event was cached and will be reattempted on app cold start
2024-09-22 00:19:21.081 13724-13744 OneSignal               com.example.app            W  [DefaultDispatcher-worker-3] HttpClient: Got Response = POST - STATUS: 400 - Body: {"errors":["There was a problem in the JSON you submitted","uuid: incorrect UUID length 42 in string \"local-e4d27b3f-b469-42bf-9ab6-60d1e63a6460\""],"success":false}
2024-09-22 00:19:21.085 13724-13879 OneSignal               com.example.app            W  [Thread-15] OutcomeEventsController.sendSavedOutcomeEvent: Sending outcome with name: exercise_completed failed with status code: 400 and response: {"errors":["There was a problem in the JSON you submitted","uuid: incorrect UUID length 42 in string \"local-e4d27b3f-b469-42bf-9ab6-60d1e63a6460\""],"success":false}
                                                                                                    Outcome event was cached and will be reattempted on app cold start


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
micbis commented

@rgomezp Do you have backups allowed for your app (android:allowBackup) ? As this could restore data after re-installing the app.