thomasgalliker / Plugin.FirebasePushNotifications

Receive and handle firebase push notifications in .NET MAUI apps
MIT License
66 stars 5 forks source link

[Bug] MISSING_INSTANCEID_SERVICE #94

Open gdonato022 opened 3 days ago

gdonato022 commented 3 days ago

Description

Error from Plugin.FirebasePushNotifications library after updating MAUI project to .net 9

Expected Behavior

Actual Behavior

Basic Information

Screenshots, Attachments, Links

{"HResult":-2146233088,"Message":"java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE","Source":"System.Private.CoreLib","StackTrace":" at Plugin.FirebasePushNotifications.Platforms.FirebasePushNotificationManager.RegisterForPushNotificationsAsync()\n at MobileAppMaui.UI.Services.ConfigNotificationService.RegisterPushNotificationAsync()\n at Microsoft.Maui.Dispatching.DispatcherExtensions.<>cDisplayClass3_0.<b0>d.MoveNext()\n--- End of stack trace from previous location ---\n at Microsoft.Maui.Dispatching.DispatcherExtensions.<>cDisplayClass2_0`1.<b0>d[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()\n--- End of stack trace from previous location ---\n at AsyncAwaitBestPractices.SafeFireAndForgetExtensions.d__25`1[[System.Exception, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()\n --- End of managed Java.IO.IOException stack trace ---\njava.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:632)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:393)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda9.run(Unknown Source:4)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.2.0:2)\n\tat java.lang.Thread.run(Thread.java:920)\nCaused by: java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.0.2:5)\n\tat com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.0.2:8)\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:630)\n\t... 9 more\nCaused by: java.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.android.gms.cloudmessaging.Rpc.send(com.google.android.gms:play-services-cloud-messaging@@17.0.0:3)\n\tat com.google.firebase.messaging.GmsRpc.startRpc(GmsRpc.java:227)\n\tat com.google.firebase.messaging.GmsRpc.getToken(GmsRpc.java:180)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$blockingGetToken$10$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:617)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda6.start(Unknown Source:6)\n\tat com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(RequestDeduplicator.java:67)\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:613)\n\t... 9 more\n","TargetSite":"Void Throw()","InnerException":{"HResult":-2146233088,"Message":"java.io.IOException: MISSING_INSTANCEID_SERVICE","Source":null,"StackTrace":"\n --- End of managed Java.Util.Concurrent.ExecutionException stack trace ---\njava.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.0.2:5)\n\tat com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.0.2:8)\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:630)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:393)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda9.run(Unknown Source:4)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.2.0:2)\n\tat java.lang.Thread.run(Thread.java:920)\nCaused by: java.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.android.gms.cloudmessaging.Rpc.send(com.google.android.gms:play-services-cloud-messaging@@17.0.0:3)\n\tat com.google.firebase.messaging.GmsRpc.startRpc(GmsRpc.java:227)\n\tat com.google.firebase.messaging.GmsRpc.getToken(GmsRpc.java:180)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$blockingGetToken$10$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:617)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda6.start(Unknown Source:6)\n\tat com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(RequestDeduplicator.java:67)\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:613)\n\t... 9 more\n","InnerException":{"HResult":-2146233088,"Message":"MISSING_INSTANCEID_SERVICE","Source":null,"StackTrace":"\n --- End of managed Java.IO.IOException stack trace ---\njava.io.IOException: MISSING_INSTANCEID_SERVICE\n\tat com.google.android.gms.cloudmessaging.Rpc.send(com.google.android.gms:play-services-cloud-messaging@@17.0.0:3)\n\tat com.google.firebase.messaging.GmsRpc.startRpc(GmsRpc.java:227)\n\tat com.google.firebase.messaging.GmsRpc.getToken(GmsRpc.java:180)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$blockingGetToken$10$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:617)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda6.start(Unknown Source:6)\n\tat com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(RequestDeduplicator.java:67)\n\tat com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:613)\n\tat com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:393)\n\tat com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda9.run(Unknown Source:4)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.2.0:2)\n\tat java.lang.Thread.run(Thread.java:920)\n","JniPeerMembers":{"ManagedPeerType":"Java.IO.IOException","JniPeerTypeName":"java/io/IOException","JniPeerType":{"PeerReference":{"Handle":"10874","Type":"Global","IsValid":true,"$type":"JniObjectReference"},"Name":"java/io/IOException"},"InstanceMethods":{},"InstanceFields":{},"StaticMethods":{},"StaticFields":{}},"Cause":null,"LocalizedMessage":"MISSING_INSTANCEID_SERVICE","JniIdentityHashCode":170225286,"PeerReference":{"Handle":"14982","Type":"Global","IsValid":true,"$type":"JniObjectReference"},"Handle":"14982","Class":{"JniPeerMembers":{"ManagedPeerType":"Java.Lang.Class","JniPeerTypeName":"java/lang/Class","JniPeerType":{"PeerReference":{"Handle":"7538","Type":"Global","IsValid":true,"$type":"JniObjectReference"},"Name":"java/lang/Class"},"InstanceMethods":{},"Instance

thomasgalliker commented 2 days ago

Not good. Thanks for reporting. I could not yet upgrade to net9.