Firebase storage FirebaseApiNotAvailableException repeatedly in the log when it is disabled

I use:

compile "com.google.firebase:firebase-core:9.0.1" compile "com.google.firebase:firebase-storage:9.0.1" 

And this is the code that I execute using the device offline (without the Internet):

 StorageReference mStorageRef = FirebaseStorage.getInstance().getReferenceFromUrl([MY_URL]); mStorageRef.child("my_file.json").getBytes(Long.MAX_VALUE) .addOnSuccessListener(bla bla bla).addOnFailureListener(more bla bla) 

I repeat this message in my log every second :

 W/ExponenentialBackoff: network unavailable, sleeping. E/StorageUtil: error getting token java.util.concurrent.ExecutionException: com.google.firebase.FirebaseApiNotAvailableException: firebase-auth is not linked, please fall back to unauthenticated mode. 

Is this a bug or an expected behavior? I know that if I am offline, I will not receive the deleted file, but why does the Firebase code try to poll every second?

Note : when reconnecting, it runs a success / failure listener and finishes polling.

+6
source share
2 answers

Sorry for overloading the log. The first ( W/ExponenentialBackoff ) needs to be slightly reduced (in the future we plan to improve client-side logging), and the second ( E/StorageUtil ) can be prevented by linking Firebase authentication to the application assembly. Gradle file:

implementation "com.google.firebase:firebase-auth:16.2.0" .

+7
source

Google Play Services has been updated to 9.0.2 . A version for Google Play Services version 9.0.2 is now available. This release fixes a known issue with Firebase Authentication where FirebaseAuthApi is not available on some devices. FirebaseApiNotAvailableException error when these devices try to use the authentication API.

0
source

All Articles