firebase-android-sdk: Various exceptions in signInAnonymously()
[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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 28
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.