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_messaging] Failed to get FIS auth token #2120
Comments
Any idea what causes this? I just saw this today in a completely unrelated context (Google search results on |
I am also in an unrelated context (Firebase Android SDK, not Flutter), but here is the stack trace of my error in case you need it. It seems like a networking issue.
|
Any further informations? Device You tested and android version? |
I think you're hit by this: https://firebase.google.com/support/release-notes/android#messaging_v20-1-1
|
For the record, we are using firebase messaging 20.1.2 and we use Gradle to to generate our |
I am using the following Firebase libs:
with a google-service.json downloaded from firebase web console (auto-init). The issue still presists. My guess is that this is a firewall-related issue (likely GFW's fault), as most of the incidents occur when the device is trying to establish a connection from China mainland. |
Same error. I got the error in onComplete. com.google.android.gms.tasks.RuntimeExecutionException: java.io.IOException: FIS_AUTH_ERROR:
Here is firebase services I'm using:
|
Change the |
Strange but even on StackOverflow, the solution is to change its version to 20.1.0. Just tested and it works. |
yes, here too - 20.1.4 also has this problem |
Here too. Using Old firebase project issue comes on messaging.getToken() |
Still not fixed on 20.1.5 |
Using 20.1.5 (and trying 20.1.0), but still getting the FIS_AUTH_ERROR. app/build.gradle Notifications.js React Native Debugger Not sure if it's related to the errors found in my GCM: |
To improve security Firebase Android SDK updates on February 27 (M65) and afterwards introduced a new infrastructure service, the Firebase Installations SDK which comes with a dependency on the Firebase Installations API. Errors during communication with the Firebase Installations API indicate invalid or unacceptable Firebase options.
For details, please visit: |
Still not fixed. Firebase is completely broken. Not even using messaging, Doesnt work with firebase core, analytics only either. |
but what about iOS? |
When I was checking in google-service.json, client key is wrong
|
@andirayo I'm still experiencing the issue with the latest fcm library (20.1.6) and I've double checked that we're using the latest We are doing something a bit unusual in our case so I'm wondering if this is causing the problem. We set up a brand new firebase project since we were completely rebuilding our app from scratch. The APK still has the same Android name (package scheme) since we want users to be able to upgrade, etc. We are getting lots of non-fatal error messages in Crashlytics where we report any failures to obtain the FCM token. Note that when I check our backend database later for the device in question we do see the token and we're able to message that device with the token. So it looks like it works eventually. private fun collectFcmToken() {
if (fcmToken != null) {
return
}
Log.debug("Collecting FCM token")
val editor = preferences.edit()
FirebaseInstanceId.getInstance().instanceId.addOnSuccessListener {
Log.debug("Obtained FCM token ${it.token}")
editor.put(FCM_TOKEN, it.token).commit()
EventUtils.submitRecords()
}.addOnFailureListener {
Log.error("Failed to retrieve FCM token ${it.message}")
}
} My hunch is that the |
I had a similar issue with a native android app (without flutter). I was getting this error:
I ended up fixing the issue by re-downloading the google-services.json and replacing it on my project. I am not sure why but the keys were different than my previous google-services.json I have never had to re-download the .json file so I think Google re-generated the keys by some reason. Hopefully that helps someone in here |
version 20.1.0 works! thank you! |
My gradle user versin with 'com.google.firebase:firebase-messaging:20.2.0',have this issue ,if 20.1.0 fix this issue ,why 20.2.0 still have the issue ? |
@wangjianpeng I have problems with both so I don't think it's completely fixed (at least not for all use cases.) |
I found a solution to this problem
and it vill works sorry i very bad speak english iam from Russia my contacts is: appla.ru@mail.ru my personal site with contacts: appla.ru |
Hi everyone buildscript { allprojects {
} |
In my case error is Firebase-Installations: Error when communicating with the Firebase Installations server API. HTTP response: [403 Forbidden: { FirebaseOptions options = new FirebaseOptions.Builder()
Gradle File below // Add the Firebase SDK for Google Analytics
Thanks |
Use downgrade gradle and working
implementation 'com.google.firebase:firebase-messaging:20.1.0'
…On Sat, Jul 25, 2020 at 6:24 PM Bhalla Ram Dhatarwal < ***@***.***> wrote:
In my case error is
Firebase-Installations: Error when communicating with the Firebase
Installations server API. HTTP response: [403 Forbidden: {
"error": {
"code": 403,
"message": "Requests from this Android client application
com.axes.axestrack are blocked.",
"status": "PERMISSION_DENIED",
"details": [
{
***@***.*** <https://github.com/type>": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API key",
"url": "
https://console.developers.google.com/project/102453438543/apiui/credential
"
}
]
}
]
}
}
]
FirebaseOptions options = new FirebaseOptions.Builder()
.setApplicationId("1:102453438543:android:27dcec4074a56618") // Required
for Analytics.
.setProjectId("api-project-102453438543") // Required for Firebase
Installations.
.setApiKey("AIzaSyBXWJ8Q-BTEzqe0tN5yRtOkBrAGrTwUKN0") // Required for Auth.
.build();
if(FirebaseApp.getApps(getContext()).isEmpty()) {
FirebaseApp.initializeApp(Objects.requireNonNull(getContext()), options,
"AxesTrack");
}
FirebaseApp.initializeApp(getContext());
FirebaseInstanceId.getInstance().getInstanceId()
.addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
@OverRide
public void ***@***.*** Task<InstanceIdResult> task) {
if (!task.isSuccessful()) {
Log.e("TAG", "getInstanceId failed", task.getException());
return;
}
// Get new Instance ID token
String token = Objects.requireNonNull(task.getResult()).getToken();
AxesTrackApplication.setRegistrationId(token, getContext());
}
});
Gradle File below
// Add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.4.4'
// Add the SDK for Firebase Cloud Messaging
implementation 'com.google.firebase:firebase-messaging:20.2.3'
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOOXMBHKA5OKXZ2MS2PCL7TR5LIW3ANCNFSM4LBEEPYQ>
.
--
Thanks and Regards,
Amit Kumar Gupta
Mobile SDK Developer
3rd Floor, A-35,
Sector 2- Noida 201301
Contact: 7905717240
www.izooto.com
|
For me the issue was caused by setting the DNS of Android Emulator to 8.8.8.8. Ref -> https://medium.com/@cafonsomota/android-emulator-when-theres-no-connection-to-the-internet-129e8b63b7ce |
i meet this problem. i try to solves it just like belowe: old code: Future getToken() async { new code: getToken() async { conclusion:the different of the two coding style is the getToken() method have a async return type。 and i had found anther method is ok too, like this: String tokenStr; |
Closing in favour of trying the latest messaging version which has been been heavily reworked, along with documentation, since this issue was raised: https://firebase.flutter.dev/docs/messaging/overviewIf you still have a problem please raise a new GitHub issue with up to date information and code snippets if possible. Thanks. |
Stacktrace
Flutter doctor output
Dependencies
The text was updated successfully, but these errors were encountered: