I keep getting this error every time i run getDownloadURL, i keeps saying no object exists at the location but I added the images I want to download in
the root and my file extension is correct, I don't know what I'm doing wrong,
here is the full error
I/flutter (23569): here is your url https://firebasestorage.googleapis.com/v0/b/posweepay.appspot.com/o/cables.jpg?alt=media&token=829a25e4-becd-416f-9b01-3498a3e79546
I/flutter (23569): found data on cloudstore Instance of '_MapStream<QuerySnapshotPlatform, QuerySnapshot>'
E/StorageException(23569): StorageException has occurred.
E/StorageException(23569): Object does not exist at location.
E/StorageException(23569): Code: -13010 HttpResult: 404
E/StorageException(23569): { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }}
E/StorageException(23569): java.io.IOException: { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }}
E/StorageException(23569): at com.google.firebase.storage.network.NetworkRequest.parseResponse(NetworkRequest.java:434)
E/StorageException(23569): at com.google.firebase.storage.network.NetworkRequest.parseErrorResponse(NetworkRequest.java:451)
E/StorageException(23569): at com.google.firebase.storage.network.NetworkRequest.processResponseStream(NetworkRequest.java:442)
E/StorageException(23569): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:272)
E/StorageException(23569): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:286)
E/StorageException(23569): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:70)
E/StorageException(23569): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:62)
E/StorageException(23569): at com.google.firebase.storage.GetDownloadUrlTask.run(GetDownloadUrlTask.java:76)
E/StorageException(23569): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
E/StorageException(23569): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
here is my code
printUrl() async {
Reference ref =
FirebaseStorage.instance.ref().child('cables.jpg');
var togo = (await ref.getDownloadURL()).toString();
setState(() {
url = togo;
print('here is your url'+url);
});
}
these are my rules
1
service firebase.storage {
2
match /b/{bucket}/o {
3
match /{allPaths=**} {
4
allow read, write;
5
}
6
}
7
}
8
ā
