【发布时间】:2020-06-20 04:34:57
【问题描述】:
我收到此错误:
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
当我从https://stackoverflow.com/a/50877590/9272698 执行此代码时(从带有 Firestore 存储的图像中获取下载 url):
Future _getImageUrl() async {
final ref = FirebaseStorage.instance.ref().child('lake');
var url = await ref.getDownloadURL();
return url;
}
这不是由于我的 Firestore 规则,因为我让它像这样公开:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}
此外,我认为这不是由于互联网连接造成的,因为我能够从 Firebase 云数据库加载字段。 你有解决方案吗?非常感谢
【问题讨论】:
标签: firebase flutter google-cloud-storage firebase-storage