supabase / supabase

The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
https://supabase.com
Apache License 2.0
73.55k stars 7.1k forks source link

Unexpected token < in JSON at position 0 #21428

Closed freedbrd closed 4 months ago

freedbrd commented 8 months ago

When attempting to retrieve files from a specific folder in the Supabase bucket, an error is encountered. The error message states: "Failed to retrieve folder contents from 'folder name': Unexpected token < in JSON at position 0." Additionally, when trying to access the files or delete the folder, a 502 error occurs for the endpoint "buckets/folder_name/objects/list," accompanied by the following message:

{
    "message": "An invalid response was received from the upstream server"
}

image image

The error seems to suggest a problem with the JSON response received from the server when attempting to retrieve folder contents.

GaryAustin1 commented 8 months ago

Can you be a bit clearer on how you are calling this?

Your endpoint you show does not seem right.

......supabase.co/storage/v1/object/list/abc Is the list operation on bucket abc.
The folder is in the body sent for that request.

freedbrd commented 8 months ago

Can you be a bit clearer on how you are calling this?

Your endpoint you show does not seem right.

......supabase.co/storage/v1/object/list/abc Is the list operation on bucket abc. The folder is in the body sent for that request.

Hello, this is a dashboard. I am using a supabase UI for getting buckets and time to time I can see the issue.

https://supabase.com/dashboard/project/prj_id/storage/buckets

Hallidayo commented 5 months ago

Hi @freedbrd - I've tried this on the dashboard now and I'm able to retrieve bucket items. Are you still getting the same issue you reported?

Hallidayo commented 4 months ago

Hi all, We’re going to close this one due to inactivity. Please feel free to reopen if you’re still having issues here or open a new issue.