Various exceptions in signInAnonymously()
See original GitHub issue[REQUIRED] Step 2: Describe your environment
- Android Studio version: 3.5.1
- Firebase Component: Auth
- Component version: 19.1.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
I authenticate users anonymously with signInAnonymously() and added a log of exceptions to my server from addOnFailureListener() after many reports that something isn’t working. I got 5 kinds of exceptions, none of which I could not find how to fix. It looks like a bug. Here are they:
- com.google.firebase.FirebaseException: An internal error has occurred. [ 7: ]
- com.google.firebase.FirebaseApiNotAvailableException: Error resolution was canceled by the user, original error message: CANCELED: null
- com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device. Connection failed with: c{statusCode=SERVICE_INVALID, resolution=null, message=null}
- com.google.android.gms.common.api.ApiException: 8: The connection to Google Play services was lost
- com.google.firebase.g: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
First is the most popular. The latter is not necessarily a bug, but I do not know how they were able to send a log to the server if they do not have Internet.
Relevant Code:
FirebaseAuth.getInstance().signInAnonymously()
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
// ...
}
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
// log exception to server
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:28
Top Results From Across the Web
signInAnonymously:FAILURE com.google.firebase.auth ...
Despite I have enabled in my Firebase project anonymous sign in, my mobile (Android) app is not able to authenticate and I'm getting...
Read more >Authenticate with Firebase Anonymously on Android
You can use Firebase Authentication to create and use temporary anonymous accounts to authenticate with Firebase. These temporary anonymous accounts can be ...
Read more >Using Firebase Authentication - FlutterFire
Firebase Auth provides many methods and utilities for enabling you to ... To get started, call the signInAnonymously() method on the FirebaseAuth instance:....
Read more >An internal error has occured. - Google Groups
//Control reaches here and prints the exception as stated above. Log.d(Constants.TAG, "onError:: Code : "+ task. ... I am using signInAnonymously().
Read more >Super Simple Authentication Flow with Flutter & Firebase
try/catch is used to catch any exceptions. We can use this to alert the user if sign-in fails. await FirebaseAuth.instance.signInAnonymously() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope, it’s back. Seems crashlytics had a few hours delay.
No, it seems. It’s been 15 days since I created the report, looks like we were left with this bug alone.