-
Notifications
You must be signed in to change notification settings - Fork 125
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
Netlify deployment: Randomly returns 404 on requesting my-site.netlify.app/api/_supabase/session #146
Comments
Same here, using Netlify, "@nuxtjs/supabase": "0.3.0" and "nuxt": "^3.0.0" |
I can confirm that this bug appear on Netlify but not on Vercel. My nuxt supabase setup work in Vercel. |
We need to use : nuxt build instead of nuxt generate to make this work on Netlify |
Make sure you are using |
+1 |
I'm seeing this same issue when building/deploying for Cloudflare Pages. I'm using build then generate to create a static site. |
I will recommend you update your build command to |
I guess this is a proxy probleme : https://docs.netlify.com/routing/redirects/rewrites-proxies/ |
I'm using Nuxt3 (SSR: false) and SupabaseNuxt on a Nginx server hosted on Oracle Cloud, with "npm run generate" I get that error (404 /api/_supabase....) and with "npm run build" the index.html file doesn't get generated, so how can I deploy using "npm run build" if it is the solution? Thanks |
Did you find something new? |
Version
"@nuxtjs/supabase": "^0.3.0",
"nuxt": "3.0.0"
Reproduction Link
N/A
Steps to reproduce
Make an auth request using useSupabaseClient().auth.signInWithPassword(), or useSupabaseClient().auth.signOut().
What is Expected?
Requests to APIs is expected to be stable.
What is actually happening?
When deoplyed to Netlify, using eg. useSupabaseClient().auth.signInWithPassword() randomly returns a 404 requesting my-site.netlify.app/api/_supabase/session.
A page refresh seems to solve the issue until next auth event.
Chrome console output:
POST https://budgetpie-beta.netlify.app/api/_supabase/session 404
Uncaught (in promise) FetchError: 404 (/api/_supabase/session)
at async Object.callback (entry.d286fcba.js:9:118483)
Aside from needing this workaround #144 everything works fine on local deployment.
The text was updated successfully, but these errors were encountered: