Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live updates progressbar #13

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

ellylOS
Copy link

@ellylOS ellylOS commented Apr 12, 2024

No description provided.

@iAmWillShepherd
Copy link
Contributor

iAmWillShepherd commented May 16, 2024

I'm catching NPEs now be0b3b7. I'm unable to produce a crash on my machine consistently, and I'm unsure of the meaning behind the following output 👇🏽

--------- beginning of system
--------- beginning of main
2024-05-16 13:00:53.001   564-2462  JobScheduler.JobStatus  system_server                        E  App com.onesignal.sample.android became active but still in NEVER bucket
2024-05-16 13:00:55.110  2964-3584  FirebaseMessaging       com.onesignal.sample.android         E  Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED. Won't retry the operation.
2024-05-16 13:01:02.648  2964-3434  OneSignal               com.onesignal.sample.android         E  Operation execution failed without retry: [{"name":"login-user","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-e7605d4b-c9e5-4c47-8bca-425c3f8a0a96","id":"05898046-8b0f-4a8d-bb82-d1ee96e371cd"}, {"name":"create-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-e7605d4b-c9e5-4c47-8bca-425c3f8a0a96","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"975ec48f-e7f8-4bab-862e-07d17ec75b05"}, {"name":"update-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-e7605d4b-c9e5-4c47-8bca-425c3f8a0a96","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"3c4240ca-a37f-4750-a159-87dd70b6f10c"}]

@nan-li
Copy link

nan-li commented May 16, 2024

Can you share any network request related logs that would be above that log?

I see Operation execution failed without retry: [{"name":"login-user". This indicates a network request was made and then failed. Can you see the request and response in the logs? It will say something like "HTTPClient: " something something post to users.

I am going to assume it is due to Identity Verification being on, and there may be a lag between turning off in the dashboard and making the requests.

@iAmWillShepherd
Copy link
Contributor

iAmWillShepherd commented May 16, 2024

@nan-li 👇🏽

main] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@f96e2f
2024-05-16 13:08:28.557  7239-7239  OneSignal               com.onesignal.sample.android         D  [main] OperationRepo.enqueue(operation: {"name":"transfer-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca"}, flush: false)
2024-05-16 13:08:28.563  7239-7306  OneSignal               com.onesignal.sample.android         D  [Thread-13] OperationRepo.enqueueAndWait(operation: {"name":"login-user","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","externalId":"will"}, force: false)
2024-05-16 13:08:33.574  7239-7269  OneSignal               com.onesignal.sample.android         D  [OpRepo] processQueueForever:ops:
                                                                                                    [bucket:0, retries:0, operation:{"name":"login-user","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","externalId":"will","id":"fcf7677e-012d-44c1-8603-7e450aadfc24"}
                                                                                                    , bucket:0, retries:0, operation:{"name":"transfer-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","id":"add541d1-1de7-43a6-93a2-c7c2bd18f5a0"}
                                                                                                    ]
2024-05-16 13:08:33.575  7239-7269  OneSignal               com.onesignal.sample.android         D  [OpRepo] LoginUserOperationExecutor(operation: [{"name":"login-user","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","externalId":"will","id":"fcf7677e-012d-44c1-8603-7e450aadfc24"}, {"name":"transfer-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","id":"add541d1-1de7-43a6-93a2-c7c2bd18f5a0"}])
2024-05-16 13:08:33.609  7239-7250  System                  com.onesignal.sample.android         W  A resource failed to call close. 
2024-05-16 13:08:33.614  7239-7274  OneSignal               com.onesignal.sample.android         D  [DefaultDispatcher-worker-5] HttpClient: Request Sent = POST https://api.onesignal.com/apps/5e605fcd-de88-4b0a-a5eb-5c18b84d52f3/users - Body: {"identity":{"external_id":"will"},"subscriptions":[{"id":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d"}],"properties":{"timezone_id":"America\/Chicago","language":"en"},"refresh_device_metadata":true} - Headers: Accept=[application/vnd.onesignal.v1+json], Content-Type=[application/json; charset=UTF-8], OneSignal-Install-Id=[15c102f9-060a-4bbe-8983-96c1eeb5aa41], OneSignal-Subscription-Id=[local-501d468c-13ec-4aa2-83c4-a98f5989e75d], SDK-Version=[onesignal/android/050112]
2024-05-16 13:08:33.779  7239-7274  OneSignal               com.onesignal.sample.android         D  [DefaultDispatcher-worker-5] HttpClient: Got Response = POST https://api.onesignal.com/apps/5e605fcd-de88-4b0a-a5eb-5c18b84d52f3/users - FAILED STATUS: 400
2024-05-16 13:08:33.788  7239-7274  OneSignal               com.onesignal.sample.android         W  [DefaultDispatcher-worker-5] HttpClient: Got Response = POST - STATUS: 400 - Body: {"errors":[{"title":"uuid: incorrect UUID length 42 in string \"local-501d468c-13ec-4aa2-83c4-a98f5989e75d\""}]}
2024-05-16 13:08:33.789  7239-7269  OneSignal               com.onesignal.sample.android         D  [OpRepo] OperationRepo: execute response = FAIL_PAUSE_OPREPO
2024-05-16 13:08:33.789  7239-7269  OneSignal               com.onesignal.sample.android         E  Operation execution failed with eventual retry, pausing the operation repo: [{"name":"login-user","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","externalId":"will","id":"fcf7677e-012d-44c1-8603-7e450aadfc24"}, {"name":"transfer-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","id":"add541d1-1de7-43a6-93a2-c7c2bd18f5a0"}]
2024-05-16 13:08:33.789  7239-7269  OneSignal               com.onesignal.sample.android         D  [OpRepo] retryAfterSeconds: null
2024-05-16 13:08:33.995  7239-7269  OneSignal               com.onesignal.sample.android         D  [OpRepo] OperationRepo is paused
2024-05-16 13:10:01.599  7239-7275  EGL_emulation           com.onesignal.sample.android         D  app_time_stats: avg=2725.27ms min=1.31ms max=92291.23ms count=34
2024-05-16 13:10:01.682  7239-7239  OneSignal               com.onesignal.sample.android         D  [main] OperationRepo.enqueue(operation: {"name":"update-subscription","appId":"5e605fcd-de88-4b0a-a5eb-5c18b84d52f3","onesignalId":"local-0692d7e6-fa27-4071-b116-7b07905384ca","subscriptionId":"local-501d468c-13ec-4aa2-83c4-a98f5989e75d","type":"PUSH","enabled":true,"address":"eYWZaefNSIaHZj_maW60Xg:APA91bFglnx7AiJhJgGrLnTmlBGHvVbjws9R8p52QgGsHmhauVXwOl1ANX0WVite6byF7h_nyU0fyO6buaL9IHRVpPR31U9vcKYkyOxSudc8FqP0M3cPPwk-x9cF2U5p8PlDv_v2gZz4","status":"SUBSCRIBED"}, flush: false)
2024-05-16 13:10:02.015  7239-7323  .sample.android         com.onesignal.sample.android         W  Verification of kotlinx.coroutines.MainCoroutineDispatcher kotlinx.coroutines.internal.MainDispatcherLoader.loadMainDispatcher() took 328.919ms (383.07 bytecodes/s) (4456B approximate peak alloc)
2024-05-16 13:10:02.608  7239-7275  EGL_emulation           com.onesignal.sample.android         D  app_time_stats: avg=16.61ms min=1.74ms max=330.07ms count=38

Brian thinks this is because identity verification is turned on in the app. Can the SDK handle this gracefully without crashing?

@nan-li
Copy link

nan-li commented May 16, 2024

Interesting, we end up sending a local push subscription ID, which the SDK should not be doing even when things have gone wrong... we'll investigate that as a bug.

These logs show the follow up User Create made when login is called, but I am now sure the first User Create for the anonymous user failed due to unauthorized (because Identity Verification is on), and now the SDK is in a poor state.

Solution: Use a different app ID or turn off Identity Verification, then do a fresh install.

Me: Recreate this flow to find bugs in the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants