firebase_dart icon indicating copy to clipboard operation
firebase_dart copied to clipboard

Can't find files when bucket is provided

Open maxfornacon opened this issue 3 years ago • 2 comments

When I try to instantiate the storage with a custom bucket a object not found error occurs when trying to upload or receive metadata, etc.

  var storage = FirebaseStorage.instanceFor(
          app: cloudStorageApp,
          bucket: 'gs://...'
        );

Error message:

flutter: [storage/object-not-found] Object 'path/to/object' does not exist.

I double checked that there is a file in the expected location in firebase console. When I use the default bucket it works perfectly fine.

maxfornacon avatar Feb 19 '22 00:02 maxfornacon

Having the same issue. Has anybody solved the issues? Please I need help. Thanks

usernamekk avatar Jul 28 '22 09:07 usernamekk

When I try, it works. However, it fails when the bucket url is not formatted correctly. It should either be 'bucket-name' or 'gs://bucket-name/'. So, with a trailing slash and without a path. I will change this in the next version to also accept urls without the trailing slash.

Can you confirm that it works with a correctly formatted bucket string?

rbellens avatar Aug 17 '22 16:08 rbellens