CrossGeeks / PushNotificationPlugin

Push Notification Plugin for Xamarin iOS and Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in PushNotificationManager.OnComplete

stefan89 opened this issue · comments

Currently it sometimes happens that a crash occurs when calling PushNotificationManager.Initialize when starting our app.

Thrown exceptions:

  • java.io.IOException: SERVICE_NOT_AVAILABLE (happens when no internet connection while initializing PushNotificationManager)
  • Java.IO.IOException: AUTHENTICATION_FAILED
  • Java.IO.IOException: TOO_MANY_REGISTRATIONS
  • Java.IO.IOException: MISSING_INSTANCEID_SERVICE

Stacktrace:
java.io.IOException: SERVICE_NOT_AVAILABLE
com.google.firebase.iid.zzr.zza(Unknown Source)
com.google.firebase.iid.zzr.zza(Unknown Source)
com.google.firebase.iid.zzu.then(Unknown Source)
com.google.android.gms.tasks.zzd.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1113
JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args)
JniPeerMembers+JniInstanceMethods.InvokeAbstractObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
TaskInvoker.get_RawResult ()
Task.get_Result ()
PushNotificationManager.OnComplete (Android.Gms.Tasks.Task task)
IOnCompleteListenerInvoker.n_OnComplete_Lcom_google_android_gms_tasks_Task_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_task)
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.22(intptr,intptr,intptr)
com.google.android.gms.tasks.RuntimeExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
com.google.android.gms.tasks.zzu.getResult(Unknown Source)
md53da296b4b9f7aa6e187dc28cf9fd28f3.PushNotificationManager.n_onComplete(Native Method)
md53da296b4b9f7aa6e187dc28cf9fd28f3.PushNotificationManager.onComplete PushNotificationManager.java:30
com.google.android.gms.tasks.zzj.run(Unknown Source)
android.os.Handler.handleCallback Handler.java:739
android.os.Handler.dispatchMessage Handler.java:95
android.os.Looper.loop Looper.java:158
android.app.ActivityThread.main ActivityThread.java:7230
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run ZygoteInit.java:1230
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1120
Caused by: java.io.IOException: SERVICE_NOT_AVAILABLE
com.google.firebase.iid.zzr.zza(Unknown Source)
com.google.firebase.iid.zzr.zza(Unknown Source)
com.google.firebase.iid.zzu.then(Unknown Source)
com.google.android.gms.tasks.zzd.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1113
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java:588
java.lang.Thread.run Thread.java:818

As you can see in the stacktrace, the Exception is thrown in class: PushNotificationManager, method: OnComplete

Which version are you using?

It doesn't seem you are using the latest

I am using version 3.0.25.

Is this issue fixed in a newer version?

Thanks, any other new version of the library (with bug fixes) coming soon? If so, I will wait to update