I am using firebase storage to upload files , but when I upload I am getting this error
E/StorageUtil: error getting token java.util.concurrent.ExecutionExce
I was facing the same issue and it was caused because by default firebase will only allow uploading files from user's that have been authenticated.
Above the storage util exception there might be a log similar to this:
E/StorageUtil: error getting token java.util.concurrent.ExecutionException: com.google.android.gms.internal.zzajb: Please sign in before trying to get a token.
We had our own authentication process without using firebase so we decided to change the storage rules in firebase console.
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}
Note: Changing the rules will allow any user to upload files to your firebase cloud server.