0


I get this error :

E/StorageUtil(21342): error getting token java.util.concurrent.ExecutionException: com.google.firebase.internal.api.FirebaseNoSignedInUserException: Please sign in before trying to get a token.
W/NetworkRequest(21342): no auth token for request


When I execute this code from https://stackoverflow.com/a/50877590/9272698 (to get the download url from an image with Firestore Storage) :

 Future _getImageUrl() async {
    final ref = FirebaseStorage.instance.ref().child('lake');
    var url = await ref.getDownloadURL();
    return url;
  }


This is not due to my firestore rules since, I enabled it to be public like this :

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}

Moreover I don't think it is due to internet connection since I'm able to load fields from Firebase Cloud Database. Do you have a solution? Thanks a lot

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Mxwan
  • 191
  • 13

1 Answers1

0

I managed to get my url images.
Here's how :

  1. Add SAH-1 certification to your project firebase and upload new google-service file to your project
  2. Make your users sign-in anonymously (and enable it in your firebase project) before calling .getDownloadUrl()
Mxwan
  • 191
  • 13