supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
737 stars 184 forks source link

Internal server error when using storage #809

Open tekmen0 opened 9 months ago

tekmen0 commented 9 months ago

Dart client functions like download & delete throw 500 internal server error.

Steps to reproduce the behavior:

  1. Go to 'supabase dashboard'
  2. Create a public bucket with a policy that allow anything to any user.
  3. Create file with depth 4, which means 4 parnet directories.
  4. On supabase dart client, try to use delete or download :

await supabase.storage .from("correct_bucket_name") .remove("correct-file/path-with/dashes/in-it/image.jpg");

It throws 500 Internal Server error, however, I am able to delete from dashboard.

Expected behavior : It should delete file without error.

Screenshot from 2024-01-25 19-12-10 bucket name = user_data print output : anan : 3cd252ef-2c83-4623-be8c-2be0a38d6ca9/bfc5b906-5e46-4158-b611-00829a324537/front/a8ede62b-70bd-472e-96f5-aa3b0552c81c.png

Versions: Supabase Dashboard flutter sdk: ">=2.19.0 <3.0.0" supabase_flutter: ^2.2.0

Note : Since google banned my gmail while debugging oauth w supabase, I can't open support ticket.

tekmen0 commented 9 months ago

This works fine for your info :

supabase.storage
        .from(curUser.userBucketName())
        .uploadBinary(
            "${supabaseFaceDir}/${dd.designModel!.uniqueId!}.png",
            screenShot,
            fileOptions: const FileOptions(upsert: true));
  }
dshukertjr commented 9 months ago

@tekmen0 Would you be able to provide an actual set of bucket names and path strings instead of variables that you were able to produce the error? Also, would you be able to provide the RLS policy that you have set on your bucket?