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

storage functions not working when upgrading to NextJS 13.4, 13.5 or 14 #912

Open
2 tasks done
gascenciom1998 opened this issue Nov 12, 2023 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@gascenciom1998
Copy link

gascenciom1998 commented Nov 12, 2023

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When upgrading to NextJS 13.4, 13.5 or 14, from version 13.2.4, occassionally, storage functions like list and update will not work. list will return no data even though the file being searched exists, and update with not perform an update on an existing file

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Upgrade NextJS to Next14
  2. Run code like the following:
const files = await supabase.storage.from(BUCKET).list('', {
    search: 'searchTerm',
})

Ocassionally (not always, very weird) files will be empty even though I am sure a file exists with the 'searchTerm' in my BUCKET in the root path

Also running code like

supabase.storage.from(BUCKET).update(data)

will not actually perform an update.

I made no changes to this code in my codebase, I just upgraded to NextJS 14

Expected behavior

I would expect list to return something for a file that exists, and update to actually perform an update on the file that exists

Screenshots

N/A

System information

  • OS: macOS
  • Browser (chrome
  • Version of supabase-js: Tried with 2.15.0 and with 2.38.4
  • Version of Node.js: 18

Additional context

This only happens when I upgrade to NextJS 14 from NextJS 13. Also not sure but possible related to this other issue: #898

@gascenciom1998 gascenciom1998 added the bug Something isn't working label Nov 12, 2023
@gascenciom1998
Copy link
Author

Not sure but could this PR in the storage-api fix it? supabase/storage#394

@gascenciom1998 gascenciom1998 changed the title storage.list not working when upgrading to NextJS 14 storage functions not working when upgrading to NextJS 14 Nov 12, 2023
@gascenciom1998 gascenciom1998 changed the title storage functions not working when upgrading to NextJS 14 storage functions not working when upgrading to NextJS 13.4, 13.5 or 14 Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant