After permission granted, FirebaseMessaging.getToken() failed and return java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED.
I only noticed the problem on an actual Android 13 API(33) device because that's what I have at the moment. I also tested on real Android 11 and iOS devices and everything works fine. It seems the issue is specific to Android 13 with API level 33.
I also specify that the Google services are well installed.
Expected behavior
The call to the getToken() function should return a Firebase Token as is done with API levels lower than 33
build and run test projet in real Android Device with API 33
Other information
Exception trace:
Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED. Won't retry the operation.
Fetching FCM registration token failed
java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:626)
at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:382)
at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda10.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED
at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.0.2:5)
at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.0.2:8)
at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:624)
at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:382)
at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda10.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.io.IOException: AUTHENTICATION_FAILED
at com.google.firebase.messaging.GmsRpc.handleResponse(GmsRpc.java:309)
at com.google.firebase.messaging.GmsRpc.lambda$extractResponseWhenComplete$0$com-google-firebase-messaging-GmsRpc(GmsRpc.java:320)
at com.google.firebase.messaging.GmsRpc$$ExternalSyntheticLambda0.then(Unknown Source:2)
at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.2:3)
at androidx.profileinstaller.ProfileInstallReceiver$$ExternalSyntheticLambda0.execute(Unknown Source:0)
at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.2:1)
at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.2:5)
at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.2:3)
at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.2:8)
at com.google.android.gms.cloudmessaging.zzy.execute(Unknown Source:0)
at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.2:1)
at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.2:5)
at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.2:3)
at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@18.0.2:1)
at com.google.android.gms.cloudmessaging.zzr.zzd(com.google.android.gms:play-services-cloud-messaging@@17.1.0:3)
at com.google.android.gms.cloudmessaging.zzt.zza(com.google.android.gms:play-services-cloud-messaging@@17.1.0:2)
at com.google.android.gms.cloudmessaging.zzk.handleMessage(com.google.android.gms:play-services-cloud-messaging@@17.1.0:14)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:204)
at android.os.Looper.loop(Looper.java:291)
at android.app.ActivityThread.main(ActivityThread.java:8129)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:601)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1019)
Plugin(s)
Version
6.1.0
Platform(s)
Current behavior
After permission granted,
FirebaseMessaging.getToken()
failed and return java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED.I only noticed the problem on an actual Android 13 API(33) device because that's what I have at the moment. I also tested on real Android 11 and iOS devices and everything works fine. It seems the issue is specific to Android 13 with API level 33. I also specify that the Google services are well installed.
Expected behavior
The call to the getToken() function should return a Firebase Token as is done with API levels lower than 33
Reproduction
https://github.com/paulisidore/firebaseapptest
Steps to reproduce
Other information
Exception trace:
Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED. Won't retry the operation. Fetching FCM registration token failed java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:626) at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:382) at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda10.run(Unknown Source:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2) at java.lang.Thread.run(Thread.java:1012) Caused by: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.0.2:5) at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.0.2:8) at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:624) at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$4$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:382) at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda10.run(Unknown Source:4) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.1.0:2) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.IOException: AUTHENTICATION_FAILED at com.google.firebase.messaging.GmsRpc.handleResponse(GmsRpc.java:309) at com.google.firebase.messaging.GmsRpc.lambda$extractResponseWhenComplete$0$com-google-firebase-messaging-GmsRpc(GmsRpc.java:320) at com.google.firebase.messaging.GmsRpc$$ExternalSyntheticLambda0.then(Unknown Source:2) at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.2:3) at androidx.profileinstaller.ProfileInstallReceiver$$ExternalSyntheticLambda0.execute(Unknown Source:0) at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.2:1) at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.2:5) at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.2:3) at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.2:8) at com.google.android.gms.cloudmessaging.zzy.execute(Unknown Source:0) at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.2:1) at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.2:5) at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.2:3) at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@18.0.2:1) at com.google.android.gms.cloudmessaging.zzr.zzd(com.google.android.gms:play-services-cloud-messaging@@17.1.0:3) at com.google.android.gms.cloudmessaging.zzt.zza(com.google.android.gms:play-services-cloud-messaging@@17.1.0:2) at com.google.android.gms.cloudmessaging.zzk.handleMessage(com.google.android.gms:play-services-cloud-messaging@@17.1.0:14) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:204) at android.os.Looper.loop(Looper.java:291) at android.app.ActivityThread.main(ActivityThread.java:8129) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:601) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1019)
Capacitor doctor
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 6.1.1
@capacitor/core: 6.1.1
@capacitor/android: 6.1.1 @capacitor/ios: 6.1.1
Installed Dependencies:
@capacitor/ios: not installed @capacitor/cli: 6.1.1 @capacitor/android: 6.1.1 @capacitor/core: 6.1.1
[success] Android looking great! 👌
Before submitting