You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
High crash rate on Android (Google Play Console): java.lang.Error, java.io.IOException: SERVICE_NOT_AVAILABLE / java.io.IOException: TOO_MANY_REGISTRATIONS
#221
Open
localhorst opened this issue
Feb 27, 2023
· 3 comments
We needed the bugfix commit because we experienced background crashes according to #198
Unfortunately, with the current release, we have a relatively high crash rate (0.4- 0.5%) on Android. However, we cannot recreate the crashes. The crashes are spread across a wide variety of devices and Android versions.
The reason seems to be these two error messages:
java.io.IOException: SERVICE_NOT_AVAILABLE
java.io.IOException: TOO_MANY_REGISTRATIONS.
Crashes seem to be related to this Plugin, as PushPlugin.kt is mentioned in the stack trace.
According to a review on Google Play, a crash occurs when app is starting (and trying to register with FCM).
Expected Behaviour
No crashes of the app
Actual Behaviour
On some devices and Android versions (8 - 13) the app crashes, probably at startup
Reproduce Scenario (including but not limited to)
Not possible for us so far.
Steps to Reproduce
--
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
(How can I export / debug a payload, e.g. from an emulator?)
Sample Code that illustrates the problem
--
Logs taken while reproducing problem
From Google Play Console:
Stacktrace 1:
Exception java.lang.Error: java.util.concurrent.ExecutionException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1173)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)
Caused by java.util.concurrent.ExecutionException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
at com.google.android.gms.tasks.Tasks.zza (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.Tasks.await (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.adobe.phonegap.push.PushPlugin.executeActionInitialize$lambda-8 (PushPlugin.kt:465)
at com.adobe.phonegap.push.PushPlugin.lambda$ohS9Ls90r5WAZnI3N99GgMOBsaE
at com.adobe.phonegap.push.-$$Lambda$PushPlugin$ohS9Ls90r5WAZnI3N99GgMOBsaE.run
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
Caused by java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken (FirebaseMessaging.java:628)
at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$FirebaseMessaging (FirebaseMessaging.java:393)
at com.google.firebase.messaging.-$$Lambda$FirebaseMessaging$m5Uvt0n8P9zrx-ecASLTQKzoABQ.run
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:462)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
Caused by java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
at com.google.android.gms.tasks.Tasks.zza (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.Tasks.await (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken (FirebaseMessaging.java:626)
Caused by java.io.IOException: SERVICE_NOT_AVAILABLE
at com.google.firebase.messaging.GmsRpc.handleResponse (GmsRpc.java:309)
at com.google.firebase.messaging.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc (GmsRpc.java:320)
at com.google.firebase.messaging.-$$Lambda$GmsRpc$cZg7VRs3aHaJlHVdosXKlJfYwHY.then
at com.google.android.gms.tasks.zzc.run (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.firebase.messaging.-$$Lambda$PNiE7SuEFxRjAZH7pJpZIFOFjWg.execute
at com.google.android.gms.tasks.zzd.zzd (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.zzc.run (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.google.android.gms.cloudmessaging.zzz.execute
at com.google.android.gms.tasks.zzd.zzd (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.TaskCompletionSource.setResult (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.cloudmessaging.zzp.zzd (com.google.android.gms:play-services-cloud-messaging@@17.0.0:3)
at com.google.android.gms.cloudmessaging.zzr.zza (com.google.android.gms:play-services-cloud-messaging@@17.0.0:2)
at com.google.android.gms.cloudmessaging.zzf.handleMessage (com.google.android.gms:play-services-cloud-messaging@@17.0.0:14)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8751)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)
Stacktrace 2:
Exception java.lang.Error:
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1173)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)
Caused by java.util.concurrent.ExecutionException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS
at com.google.android.gms.tasks.Tasks.zza (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.Tasks.await (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.adobe.phonegap.push.PushPlugin.executeActionInitialize$lambda-8 (PushPlugin.kt:465)
at com.adobe.phonegap.push.PushPlugin.lambda$ohS9Ls90r5WAZnI3N99GgMOBsaE
at com.adobe.phonegap.push.-$$Lambda$PushPlugin$ohS9Ls90r5WAZnI3N99GgMOBsaE.run
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
Caused by java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken (FirebaseMessaging.java:628)
at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$FirebaseMessaging (FirebaseMessaging.java:393)
at com.google.firebase.messaging.-$$Lambda$FirebaseMessaging$m5Uvt0n8P9zrx-ecASLTQKzoABQ.run
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:462)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
Caused by java.util.concurrent.ExecutionException: java.io.IOException: TOO_MANY_REGISTRATIONS
at com.google.android.gms.tasks.Tasks.zza (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.Tasks.await (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken (FirebaseMessaging.java:626)
Caused by java.io.IOException: TOO_MANY_REGISTRATIONS
at com.google.firebase.messaging.GmsRpc.handleResponse (GmsRpc.java:309)
at com.google.firebase.messaging.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc (GmsRpc.java:320)
at com.google.firebase.messaging.-$$Lambda$GmsRpc$cZg7VRs3aHaJlHVdosXKlJfYwHY.then
at com.google.android.gms.tasks.zzc.run (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.firebase.messaging.-$$Lambda$PNiE7SuEFxRjAZH7pJpZIFOFjWg.execute
at com.google.android.gms.tasks.zzd.zzd (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.zzc.run (com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.google.android.gms.cloudmessaging.zzz.execute
at com.google.android.gms.tasks.zzd.zzd (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb (com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb (com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.TaskCompletionSource.setResult (com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.cloudmessaging.zzp.zzd (com.google.android.gms:play-services-cloud-messaging@@17.0.0:3)
at com.google.android.gms.cloudmessaging.zzr.zza (com.google.android.gms:play-services-cloud-messaging@@17.0.0:2)
at com.google.android.gms.cloudmessaging.zzf.handleMessage (com.google.android.gms:play-services-cloud-messaging@@17.0.0:14)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8751)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)
The text was updated successfully, but these errors were encountered:
For us, this bug makes using this plugin unsustainable. We have decided to switch our app architecture to Capacitor because we don't know if the future of Cordova as a whole is stable.
Bug Report
We are using a bugfix commit of this plugin in our Cordova app released for target SDK 31:
"@havesource/cordova-plugin-push": "git+https://github.com/havesource/cordova-plugin-push.git#326057995bf581c5a0c50712cf3a010e01297803"
Link: 3260579
We needed the bugfix commit because we experienced background crashes according to #198
Unfortunately, with the current release, we have a relatively high crash rate (0.4- 0.5%) on Android. However, we cannot recreate the crashes. The crashes are spread across a wide variety of devices and Android versions.
The reason seems to be these two error messages:
java.io.IOException: SERVICE_NOT_AVAILABLE
java.io.IOException: TOO_MANY_REGISTRATIONS.
Crashes seem to be related to this Plugin, as PushPlugin.kt is mentioned in the stack trace.
According to a review on Google Play, a crash occurs when app is starting (and trying to register with FCM).
Expected Behaviour
No crashes of the app
Actual Behaviour
On some devices and Android versions (8 - 13) the app crashes, probably at startup
Reproduce Scenario (including but not limited to)
Not possible for us so far.
Steps to Reproduce
--
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 10
Android 11
Android 12
Android 13
(Android) Device Vendor (e.g. Samsung, HTC, Sony...)
cordova info
PrintoutSample Push Data Payload
(How can I export / debug a payload, e.g. from an emulator?)
Sample Code that illustrates the problem
--
Logs taken while reproducing problem
From Google Play Console:
Stacktrace 1:
Stacktrace 2:
The text was updated successfully, but these errors were encountered: