Closed prggTheProgrammer closed 2 years ago
Update: It now gives this error: Error: [firebasestorage/object-not-found] No object exists at the desired reference. at Object.throw [as throw] (http://localhost:62317/dart_sdk.js:5063:11) at http://localhost:62317/packages/firebase_core/src/internals.dart.lib.js:81:63 at _RootZone.runUnary (http://localhost:62317/dart_sdk.js:40062:59) at _FutureListener.catchError.handleError (http://localhost:62317/dart_sdk.js:34996:33) at handleError (http://localhost:62317/dart_sdk.js:35567:51) at Function._propagateToListeners (http://localhost:62317/dart_sdk.js:35593:17) at _Future.new.[_completeError] (http://localhost:62317/dart_sdk.js:35443:23) at async._AsyncCallbackEntry.new.callback (http://localhost:62317/dart_sdk.js:35479:31) at Object._microtaskLoop (http://localhost:62317/dart_sdk.js:40330:13) at _startMicrotaskLoop (http://localhost:62317/dart_sdk.js:40336:13) at http://localhost:62317/dart_sdk.js:35811:9
@prggTheProgrammer I tried the sample code you shared and incorporated in the plugin's official example and ran on web using latest stable, but didn't see the issue you mentioned. Also the chrome console doesn't show any error.
Not sure if I am missing anything to properly replicate it. Can you try the same example and check if you still get same behavior with it too ?
This error code: firebase_storage/object-not-found
means there isn't anything at the path you have passed into .ref(<PATH>)
I would double check the path is correct, there might be an issue with special characters for example.
Hey @prggTheProgrammer. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
@darshankawar Thanks for testing, I am using the manual installation (https://firebase.flutter.dev/docs/manual-installation/web), mabey it has something to do with that.
@russellwheatley, yes I know, I checked it, it works when I use the whole path (but this doesn't work on mobile) but when I remove the gs://... It doesn't work anymore.
The problem is already fixed but I was using the old sdk () instead of ()
Bug report
.getdata fails when I call the .getdata method on a .ref() it doesn't stop loading, but gives no error in the flutter console. But if I click inspect in google it says:
failed to load resource: https://firebasestorage.googleapis.com/v0/b/%5Bobject%20Object%5D/o/<filename> the server responded with a status of 404 ()
So I think the problem is that it is not getting the url right, because this is not a good url and returns 404. The only way I get it to work is to use the whole e.g. .ref("gs://storage_name/file"), but that is not what is mentioned in the docs (https://firebase.flutter.dev/docs/storage/usage#downloading-files) and this doesn't work on mobile.Steps to reproduce
Steps to reproduce the behavior:
void main() async{ await Firebase.initializeApp(); var t = await FirebaseStorage.instance.ref("filepath").getData(); print(t.toString()); }
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1415], locale nl-NL) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Chrome - develop for the web [√] Android Studio (version 2020.3) [√] Connected device (2 available)
• No issues found!
Dart SDK 2.15.1 Flutter SDK 2.8.1 schoolstrijd 1.0.0+1
dependencies:
dev dependencies:
transitive dependencies: