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

Firebase AUTHENTICATION_FAILED on some devices #1286

Closed
jehadmashhour opened this issue Feb 27, 2020 · 53 comments
Closed

Firebase AUTHENTICATION_FAILED on some devices #1286

jehadmashhour opened this issue Feb 27, 2020 · 53 comments
Assignees
Labels
api: messaging firebase-installations Firebase Installations service

Comments

@jehadmashhour
Copy link

I use the Firebase remote config SDK , i have noted that on some devices (nearly 15 users) that the Firebase SDKs not working .

The error message is : Failed to get Firebase Instance ID token for fetch

The log shows the following error :

com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: Failed to get Firebase Instance ID token for fetch. at c.i.c.r.a.m.a(com.google.firebase:firebase-config@@19.1.1:30) at c.i.c.r.a.j.then(Unknown Source:4) at com.google.android.gms.tasks.zzf.run(Unknown Source:3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:784)
Caused by: java.io.IOException: AUTHENTICATION_FAILED at c.i.c.m.P.then(com.google.firebase:firebase-iid@@20.0.2:7) at com.google.android.gms.tasks.zzd.run(Unknown Source:7) ... 3 more

Notes :

Some of devices have the same issue -> Huawei DUB-LX1 , HUAWEI JKM-LX1 , Samsung SM-A750F , Samsung SM-J700H

Let me know if you need my google api key .

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@chong-shao
Copy link

Hi @jehadmashhour , it would be better if you can report this issue by filing a Firebase Support ticket https://firebase.google.com/support, from there it will be easier for you to share your account information and credentials

@jaanmurumets-sk
Copy link

We have reported issue to google https://issuetracker.google.com/issues/143413382 and there is acknowledge by Google of problem:

"We got information from Firebase support that this AUTHENTICATION_FAILED error is caused by GPS (Google Play Services) but fix date is not clear yet."

@pnehren
Copy link

pnehren commented Mar 9, 2020

We are also affected with a custom device without Play Services.

@arbutler
Copy link

I'm still seeing the AUTHENTICATION_FAILED failure on a Samsung S8 device using the latest google play api's according to the release notes:

build.gradle (app level)
dependencies {
...
implementation 'com.google.firebase:firebase-iid:20.1.2'
implementation 'com.google.firebase:firebase-messaging:20.1.3'
implementation 'com.google.firebase:firebase-bom:25.1.1'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
implementation 'com.google.android.gms:play-services-base:17.2.0'
implementation 'com.google.android.gms:play-services-basement:17.2.0'
implementation 'com.google.android.gms:play-services-tasks:17.0.1'
...
}

Log:
...
03-20 14:36:53.917 E/FirebaseInstanceId(18116): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
03-20 14:36:53.919 D/MainActivity(18116): getInstanceId failed
03-20 14:36:53.919 D/MainActivity(18116): java.io.IOException: AUTHENTICATION_FAILED
03-20 14:36:53.919 D/MainActivity(18116): at com.google.firebase.iid.zzs.zza(com.google.firebase:firebase-iid@@20.1.2:82)
03-20 14:36:53.919 D/MainActivity(18116): at com.google.firebase.iid.zzs.zza(com.google.firebase:firebase-iid@@20.1.2:96)
03-20 14:36:53.919 D/MainActivity(18116): at com.google.firebase.iid.zzx.then(com.google.firebase:firebase-iid@@20.1.2:4)
03-20 14:36:53.919 D/MainActivity(18116): at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.0.1:5)
03-20 14:36:53.919 D/MainActivity(18116): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
03-20 14:36:53.919 D/MainActivity(18116): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
03-20 14:36:53.919 D/MainActivity(18116): at java.lang.Thread.run(Thread.java:762)
...

@ckurban
Copy link

ckurban commented Mar 23, 2020

Any update in this issue as we are facing the failure in our solution?

@jehadmashhour
Copy link
Author

I'm still having the same issue , a one user who has the same issue said to me that he did reset device factory and the firebase issue is resolved !! , incredible .

Please any help , we think the issue is related to the users devices , but we don't know exactly what is the reason .

@pnehren
Copy link

pnehren commented Mar 23, 2020

I think that they stopped supporting devices with no or old versions of play services...on my device without play services firebase-config stopped working with versions higher 19.1.0. Devices with play services or emulators have no problems...

Sad that there is no information about that.

@jehadmashhour
Copy link
Author

jehadmashhour commented Mar 23, 2020

I was think that , but after adding some logs to check the google play services is installed or not , and what is the version , I have noticed that these devices also have the same issue with the latest version.

In addition , I have contacted a user who have the same issue and he said that his device has the latest google play services , but no avail .

Why the issue is resolved by doing reset device factory !!!!

@jehadmashhour
Copy link
Author

Any update in this issue as we are facing the failure in our solution?

@arbutler
Copy link

arbutler commented Apr 3, 2020

Tried downgrading the libraries in my app build.gradle as suggested here and token retrieval in the app succeeded on a Samsung S8 device for one attempt:

build.gradle (app level)
dependencies {
...
implementation 'com.google.firebase:firebase-iid:20.0.2'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
...
}

After re-installing the app, I'm seeing the AUTHENTICATION_FAILED failure again which I reported previously. After seeing the failure on firebase-messaging:20.1.0 I retried with the latest versions of these APIs here and found that token retrieval succeeded for one attempt and then again I'm seeing the AUTHENTICATION_FAILED failure which I reported previously.

@pablo-leite-playkids
Copy link

I'm facing the same issue here. (Google Pixel 1st Gen. Android 10)
It fails on the first run of the app, but succeeds on other runs.

Gradle dependencies:
implementation 'com.google.firebase:firebase-messaging:20.1.5'

downgrading to
implementation 'com.google.firebase:firebase-messaging:20.1.0'
Seems to fix the problem.

@seemacalibrecode
Copy link

seemacalibrecode commented Apr 27, 2020

Hi,

We are facing similar issues on our App and this is blocking usage of App on many recent devices, including Google Pixel with latest version of Google play services on it

Appreciate if we could have an ETA on this fix

Best Regards,
Seema

@thameurr
Copy link

any update ?

@andirayo andirayo added the firebase-installations Firebase Installations service label Apr 28, 2020
@andirayo
Copy link
Contributor

andirayo commented Apr 28, 2020

A few of the errors reported in this issue, particularly @pablo-leite-playkids, might be related to a new Firebase infrastructure service which was introduced in FirebaseMessaging v20.1.1.

Firebase Android SDK updates on February 27 (M65) and afterwards introduced the Firebase Installations SDK which comes with a dependency on the Firebase Installations API.
Firebase Installations requires valid Firebase options API key, project ID, and application ID (a.k.a. "appId") in order to successfully communicate with Firebase servers.

Errors during communication with the Firebase Installations API indicate invalid Firebase options or misconfigurations regarding the API key used in your application.

Only those end-users are affected that installed your application after an update to the latest versions of Firebase SDKs, which might explain why only some devices are affected.

To mitigate the issue

  • make sure that your application is using valid Firebase options from the latest google-services.json file from your Firebase console:
    Firebase options: instructions and background.
  • If you use API restrictions, make sure that the API key used by your application is white-listed for the Firebase Installations API (and for your application):
    API restrictions: instructions and background
  • Regarding Application restrictions: Either set the radio button to None or make sure that your app is white-listed (with the correct SHA-1 certificate).

Just for clarification

Most of the errors reported in this issue are probably not related to the new infrastructure FirebaseInstallations. The reason is that the SDK versions reported in some of the stack-traces (e.g. firebase-iid@@20.0.2:7, firebase-messaging:20.1.0) do not use FirebaseInstallations and thus this issues definitely also exists separately.

@andirayo
Copy link
Contributor

Closing this since there was no more update for over 3 weeks.
Please feel free to reopen if this issue persists for you!

@wa1kb0y
Copy link

wa1kb0y commented Jun 30, 2020

Have same issue with AUTHENTICATION_FAILED

30.06.2020 14:30:18.881
[com.google.firebase.iid.zzu.then(com.google.firebase:firebase-iid@@20.2.0:16), com.google.android.gms.tasks.zzd.run(Unknown Source:5), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641), com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6), java.lang.Thread.run(Thread.java:764)]
  • Don't using FirebaseInstallations
  • Dependencies
    implementation 'com.google.firebase:firebase-core:17.4.3'
    implementation 'com.google.firebase:firebase-messaging:20.2.0'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'
  • Dont receive any errors in Q3 test

@celesteking
Copy link

celesteking commented Aug 3, 2020

Guys, I don't know what you were smoking there, but this really should be fixed. I'm a newbie learning flutter and went through your official guide which links to https://firebase.google.com/docs/flutter/setup?platform=android . The example shown in the latter guide produces that very error. After going through several versions of cloud_firestore: and classpath 'com.google.gms:google-services:4.3.3', I have managed to make it work.

Imagine someone not as persistent as me, they would've dumped both flutter and firebase had they encountered such an obstacle. And that's a "START UP" guide, not some advanced tech config manual.

@stari4ek
Copy link

I'm seeing this issue in live among small percent of users.
Devices: different Sony TVs (BRAVIA 4K 2015, BRAVIA 4K GB, BRAVIA 4K GB ATV3), Panasonic GX655 (app is Android-TV only)
Different locations: Aurope, Asia

On top of that all problematic installations did successfully authorized using Firebase Auth (anonymous).

One user report I've got recently shows that client was constantly getting this error since at least 1 July.
Still getting this issue after cleaning app's data from system settings.

I do not see any correlations between issue and "installations with new SDK".
There are a lot of users using same app version (same SDKs) without this issue. New users and 1-3-6 month users.

Non-fatal Exception: java.io.IOException: AUTHENTICATION_FAILED
       at com.google.firebase.iid.GmsRpc.handleResponse(GmsRpc.java:81)
       at com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc(GmsRpc.java:91)
       at com.google.firebase.iid.GmsRpc$$Lambda$0.then(GmsRpc.java:6)
       at com.google.android.gms.tasks.zze.run(zze.java:5)
       at com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute(FirebaseIidExecutors.java)
       at com.google.android.gms.tasks.zzc.zza(zzc.java:6)
       at com.google.android.gms.tasks.zzr.zza(zzr.java:19)
       at com.google.android.gms.tasks.zzu.zza(zzu.java:104)
       at com.google.android.gms.tasks.zze.run(zze.java:15)
       at com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute(FirebaseIidExecutors.java)
       at com.google.android.gms.tasks.zzc.zza(zzc.java:6)
       at com.google.android.gms.tasks.zzr.zza(zzr.java:19)
       at com.google.android.gms.tasks.zzu.zza(zzu.java:104)
       at com.google.android.gms.tasks.TaskCompletionSource.setResult(TaskCompletionSource.java:8)
       at com.google.firebase.iid.MessengerIpcClient$Request.finish(MessengerIpcClient.java:20)
       at com.google.firebase.iid.MessengerIpcClient$TwoWayRequest.handleResponseInternal(MessengerIpcClient.java:7)
       at com.google.firebase.iid.MessengerIpcClient$Request.handleResponse(MessengerIpcClient.java:29)
       at com.google.firebase.iid.MessengerIpcClient$Connection.receivedResponse(MessengerIpcClient.java:42)
       at com.google.firebase.iid.MessengerIpcClient$Connection$$Lambda$0.handleMessage(MessengerIpcClient.java:14)
       at android.os.Handler.dispatchMessage(Handler.java:101)
       at com.google.android.gms.internal.firebase-iid.zze.dispatchMessageTraced(zze.java:21)
       at com.google.android.gms.internal.firebase-iid.zze.dispatchMessage(zze.java:11)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6541)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Build:

classpath 'com.google.gms:google-services:4.3.3'

    implementation 'com.google.firebase:firebase-analytics:17.5.0'
    implementation 'com.google.firebase:firebase-perf:19.0.8'
    implementation 'com.google.firebase:firebase-config:19.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.2.4'
    implementation 'com.google.firebase:firebase-functions:19.0.2'
    implementation 'com.google.firebase:firebase-auth:19.3.2'
    implementation 'com.google.firebase:firebase-firestore:21.5.0'
    implementation 'com.google.firebase:firebase-storage:19.1.1'

    implementation 'com.google.firebase:firebase-inappmessaging:19.1.0'
    implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.0'

    implementation 'com.google.firebase:firebase-crashlytics:17.2.1'

@stari4ek
Copy link

I've got confirmation from user that factory-resetting device (Sony TV) solves this issue

@huSSooxXx
Copy link

I can get firebase token after than android updates and google play services update

@adamseoul
Copy link

It is something to do with the initialisation of the phone/device, maybe a duplicate or unwritten "android_id"
You need to generate a new Android Unique ID, so it is not feasible for app end users. I worked this out after getting tired of factory resetting devices that run my 1000's of units in the field Android hardware/software product.

adb shell content query --uri content://settings/secure --where "name=\'android_id\'"

adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"

adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:7355de1e9e9670c5

@bienieklucas
Copy link

bienieklucas commented Nov 24, 2020

Same issue with AUTHENTICATION_FAILED.

Non-fatal Exception: java.io.IOException: AUTHENTICATION_FAILED
       at com.google.firebase.iid.zzu.then(zzu.java:16)
       at com.google.android.gms.tasks.zze.run(zze.java:5)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at com.google.android.gms.common.util.concurrent.zza.run(zza.java:6)
       at java.lang.Thread.run(Thread.java:764)

Dependencies:
implementation "com.google.firebase:firebase-messaging:20.2.0"
implementation "com.google.android.gms:play-services-gcm:16.1.0"
classpath "com.google.gms:google-services:4.3.3"

@harshmittal2810
Copy link

harshmittal2810 commented Dec 14, 2020

I am using firebase-bom 26.1.1 and getting the same issues.

FIS_AUTH_ERROR
com.google.firebase.iid.GmsRpc.handleResponse (GmsRpc.java:84)
com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc (GmsRpc.java:94)
com.google.firebase.iid.GmsRpc$$Lambda$0.then (GmsRpc.java:7)
com.google.android.gms.tasks.zze.run (zze.java:5)
com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute (FirebaseIidExecutors.java)
com.google.android.gms.tasks.zzc.zza (zzc.java:6)
com.google.android.gms.tasks.zzq.zza (zzq.java:19)
com.google.android.gms.tasks.zzu.zza (zzu.java:104)
com.google.android.gms.tasks.zze.run (zze.java:15)
com.google.android.gms.cloudmessaging.zzz.execute (zzz.java)
com.google.android.gms.tasks.zzc.zza (zzc.java:6)
com.google.android.gms.tasks.zzq.zza (zzq.java:19)
com.google.android.gms.tasks.zzu.zza (zzu.java:104)
com.google.android.gms.tasks.TaskCompletionSource.setResult (TaskCompletionSource.java:8)
com.google.android.gms.cloudmessaging.zzq.zza (zzq.java:9)
com.google.android.gms.cloudmessaging.zzs.zza (zzs.java:7)
com.google.android.gms.cloudmessaging.zzf.zza (zzf.java:45)
com.google.android.gms.cloudmessaging.zzi.handleMessage (zzi.java:15)
android.os.Handler.dispatchMessage (Handler.java:103)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7397)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:935)

@cyhbench
Copy link

cyhbench commented Jan 6, 2021

I am using firebase-bom 26.1.1 and getting the same issues.

FIS_AUTH_ERROR
com.google.firebase.iid.GmsRpc.handleResponse (GmsRpc.java:84)
com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc (GmsRpc.java:94)
com.google.firebase.iid.GmsRpc$$Lambda$0.then (GmsRpc.java:7)
com.google.android.gms.tasks.zze.run (zze.java:5)
com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute (FirebaseIidExecutors.java)
com.google.android.gms.tasks.zzc.zza (zzc.java:6)
com.google.android.gms.tasks.zzq.zza (zzq.java:19)
com.google.android.gms.tasks.zzu.zza (zzu.java:104)
com.google.android.gms.tasks.zze.run (zze.java:15)
com.google.android.gms.cloudmessaging.zzz.execute (zzz.java)
com.google.android.gms.tasks.zzc.zza (zzc.java:6)
com.google.android.gms.tasks.zzq.zza (zzq.java:19)
com.google.android.gms.tasks.zzu.zza (zzu.java:104)
com.google.android.gms.tasks.TaskCompletionSource.setResult (TaskCompletionSource.java:8)
com.google.android.gms.cloudmessaging.zzq.zza (zzq.java:9)
com.google.android.gms.cloudmessaging.zzs.zza (zzs.java:7)
com.google.android.gms.cloudmessaging.zzf.zza (zzf.java:45)
com.google.android.gms.cloudmessaging.zzi.handleMessage (zzi.java:15)
android.os.Handler.dispatchMessage (Handler.java:103)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7397)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:935)
  • You could try to update "Google Play Service" on the Android device, and I solve this problem after updating "Google Play Service".

  • My dependencies:

    • implementation 'com.google.firebase:firebase-messaging:21.0.0'
    • implementation 'com.google.firebase:firebase-core:18.0.0'

  • I found out that those problem devices are with the some info:
device  manufacturer: Samsung
Android version : 10

Could yours info with trouble device be similiar?

@harshmittal2810
Copy link

I am getting error in all devices but locally debug app works fine.
After pushing to play store, I am getting these issues.

@namgk
Copy link

namgk commented Jan 14, 2021

same here on some of our devices, factory reset fixed the problem. BUT WHY?

@adamseoul
Copy link

adamseoul commented Jan 14, 2021

same here on some of our devices, factory reset fixed the problem. BUT WHY?

I solved this in the past, You are re-making an android_id when you factory reset.

It is something to do with the initialisation of the phone/device, maybe a duplicate or unwritten "android_id"
You need to generate a new Android Unique ID, so it is not feasible for app end users. I worked this out after getting tired of factory resetting devices that run my 1000's of units in the field Android hardware/software product.

adb shell content query --uri content://settings/secure --where "name=\'android_id\'"

adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"

adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:7355de1e9e9670c5

@namgk
Copy link

namgk commented Jan 14, 2021

thanks @adamseoul , how do I generate this value: 7355de1e9e9670c5?

BTW, the fact that Firebase depends on this android_id seems wrong.

same here on some of our devices, factory reset fixed the problem. BUT WHY?

I solved this in the past, You are re-making an android_id when you factory reset.

It is something to do with the initialisation of the phone/device, maybe a duplicate or unwritten "android_id"
You need to generate a new Android Unique ID, so it is not feasible for app end users. I worked this out after getting tired of factory resetting devices that run my 1000's of units in the field Android hardware/software product.

adb shell content query --uri content://settings/secure --where "name=\'android_id\'"

adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"

adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:7355de1e9e9670c5

@adamseoul
Copy link

Hiya, just change the values a little.

@rkshnair
Copy link

ava.io.IOException: AUTHENTICATION_FAILED
at com.google.firebase.iid.zzr.zza(Unknown Source:67)
at com.google.firebase.iid.zzr.zza(Unknown Source:80)
at com.google.firebase.iid.zzu.then(Unknown Source:4)
at com.google.android.gms.tasks.zze.run(com.google.android.gms:play-services-tasks@@17.2.0:5)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

Same issue, is there any ETA for the issue from Google.

@jameshmread
Copy link

Setting your version to implementation 'com.google.firebase:firebase-messaging:20.0.0' worked for me as a workaround for the time being

@kururu-abdo
Copy link

@jameshmread in emulator?

@tanya-sv
Copy link

@jameshmread Can you share which API are you using, is it the FirebaseInstallations or the deprecated FirebaseInstanceId?

@jameshmread
Copy link

@kururu-abdo both emulator and real devices
Using Flutter with the following firebase deps @tanya-sv

  firebase_core: 1.3.0
  firebase_analytics: 8.1.2
  firebase_auth: 1.1.3
  firebase_messaging: ^10.0.0
build.gradle
    implementation platform('com.google.firebase:firebase-bom:28.2.0')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-messaging:20.0.0' 

Disclaimer: I just added as a possible suggestion. I'm not exactly sure what is going on.

@chgsilva
Copy link

chgsilva commented Sep 1, 2021

Same issue here using flutter

  firebase_messaging: ^10.0.0
  firebase_performance: ^0.7.0+2
  firebase_crashlytics: ^2.0.2
  firebase_core: ^1.0.2

@ciarand ciarand removed their assignment Sep 3, 2021
@chgsilva
Copy link

chgsilva commented Sep 7, 2021

I am receiving this error with several firebase test lab devices

@i-am-darshil
Copy link

I have been receiving Firebase AUTHENTICATION_FAILED. Below was my analysis.

Failed sessions -> AUTHENTICATION_FAILED received
Success Sessions ->FCM token recieved

"text": "{\n  \"name\": \"projects/<Project ID>/installations/<fid>\",
  \"fid\": \"<fid>\",
  \"refreshToken\": \"2_8hvwdXJl1frsO2-QMamcJVuBN47Wr4tbja9i1LdBo3UH3TgfpW00f0xZXxpISLhe\",
  \"authToken\": 
        {\"token\": \"<authToken>\",
        \"expiresIn\": \"604800s\"\n  }\n}\n"
},
"text": "token=fcXcK_OaSV22oclS8g_IVV:APA91bE35IjoWQyAlRS0ON6aj6_vxY5qlktdRCrnog_8tZ_2joHn1mLlkhSdsjenK50ESgNNhSPIUVzqrLGU6tBD_Y2azu1rKCypzqOpmD7u6hlYkjt8lH28_WHbOufJs9d7BulG-Wwf"

Now, what’s interesting is Google shut down C2DM long back in 2015. Also, if you visit the API link, the following is found, wherein it mentions server and client APIs were removed on May 29, 2019, and currently any calls to those APIs can be expected to fail

  • Thus, somehow, the deprecated GCM APIs are being called.

  • Now in the firebase repo

    <!-- Required by older versions of Google Play services to create IID tokens -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <application>
    <receiver
    android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
    android:exported="true"
    android:permission="com.google.android.c2dm.permission.SEND" >
    <intent-filter>
    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    </intent-filter>
    </receiver>
    , it mentions com.google.android.c2dm → Required by older versions of Google Play services to create IID tokens

 IID tokens are used in providing the app instance's token  https://iid.googleapis.com/iid/info/IID_TOKEN

Folks, any idea why calls to https://android.clients.google.com/c2dm/register3 are made?

@namgk
Copy link

namgk commented Oct 14, 2021

Same here, it seems if firebase installation is present, i.e.

implementation 'com.google.firebase:firebase-installations:17.0.0'

Firebase Remote Config will depend on this guy. On some devices, such as FireTV as we tested, Firebase Installations wasn't able to make the API call (403). Eventually Firebase Remote Config wasn't working at all.

Our fix was just to remove that firebase-installations dependency, which was somehow there for no reason.

I think if Firebase Installations is not working, it should fallback where as if Firebase Installations doesn't exist.

@gsakakihara
Copy link
Contributor

Closing this as the original issue appears to have been solved. It's unclear whether the other reports added to this issue have the same root cause or are unrelated. For issues that are not related, a new issue should be opened, using the issue template with all of the information added.

For the questions on AUTHENTICATION_FAILED, this usually means that the device does not have a valid registration (Android ID). Factory resetting the device causes the Android ID to be reset and it will try to register the new ID, so this may be why that fixed it in those cases.

Also note that FirebaseInstanceId requires Google Play services to create a token and it will fail on devices without it.

@firebase firebase locked and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: messaging firebase-installations Firebase Installations service
Projects
None yet
Development

No branches or pull requests