Can't interact with files in storage (StorageApiError: Object not found)

When I try to download files manually uploaded to storage buckets in sveltekit I get the error StorageApiError: Object not found. I already tripple-checked every spelling of bucket name and filepath and it is all correct.

I know that supabase is responding because I have another page that gets text from a table and it does that no problem.

The storage bucket has no policies because I want it to be accessible by everyone since my app doesn't require an account.

Technical information:
npm: '10.2.4'
node: '21.5.0'
supabase: '1.131.3'
svelte-kit: '1.2.0'

Full error message
StorageApiError {
  __isStorageError: true,
  name: 'StorageApiError',
  status: 400,
  stack: 'StorageApiError: Object not found\n' +
    '    at /Users/███████████████/██████████████/███████████/node_modules/@supabase/storage-js/dist/main/lib/fetch.js:22:20\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
  message: 'Object not found'
}


P.S: If it wasnt clear already I'm using SvelteKit
Was this page helpful?