Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when using storage #809

Open
tekmen0 opened this issue Jan 25, 2024 · 2 comments
Open

Internal server error when using storage #809

tekmen0 opened this issue Jan 25, 2024 · 2 comments
Labels
bug Something isn't working storage This issue or pull request is related to storage

Comments

@tekmen0
Copy link

tekmen0 commented Jan 25, 2024

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 tekmen0 added the bug Something isn't working label Jan 25, 2024
@tekmen0
Copy link
Author

tekmen0 commented Jan 25, 2024

This works fine for your info :

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

@dshukertjr dshukertjr added the storage This issue or pull request is related to storage label Jan 26, 2024
@dshukertjr
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working storage This issue or pull request is related to storage
Projects
None yet
Development

No branches or pull requests

2 participants