I'm using:
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 this with the device offline (no 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 get this message repeated 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 expected behavior? I know that if I'm offline, I won't get the remote file, but why is firebase code trying to poll every second?
Note: when I get online again it executes the success/failure listener and finishes polling.
Sorry for the log overload. The first (W/ExponenentialBackoff
) needs to be pared down quite a bit (we're planning on better client side logging in the future), while the second (E/StorageUtil
) can be prevented by linking Firebase Authentication in the app's build.gradle file:
implementation "com.google.firebase:firebase-auth:16.2.0"
.
Google Play services updated to 9.0.2 The Google Play services version 9.0.2 release is now available. This release fixes a known issue with Firebase Authentication where the FirebaseAuthApi is not available on some devices. A FirebaseApiNotAvailableException error occurs when those devices attempt to use Authentication APIs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With