FixedLaunchBack

fix guide

TypeError: Failed to fetch with Supabase

·

All fix guides

Your app shows "TypeError: Failed to fetch" in the console, or a sign-in or a list fails with no clear message. It may work on your machine and fail on the live site.

This message means the browser could not reach a server at all. It never got an answer, so there is no Supabase error to read. Usually the app points at the wrong address, or the project at that address is not running. Check these five in order.

1. Look at the failed request

Open the live site and press F12 (Cmd + Option + I on a Mac). Open the Network tab, reload, and do the thing that fails. Click the red request.

Its address should look like https://your-project-ref.supabase.co/. If it says undefined, localhost or the name of a different project, go to step 2. If it is the right address and the request has no status code, go to steps 3 and 4.

signs A red request with no status code, sometimes with undefined in its address.

2. The Supabase address is wrong or missing on the live host

The live site only has the variables you added at the host. Vite apps (Lovable, Bolt) use VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY. Next.js apps use NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY. These values are baked in when the site builds, so redeploy after you add or change them.

Copy the project URL from your Supabase project's settings and check it for a typo or a trailing space. For the Vercel version of this problem, read Environment variable undefined in production on Vercel.

signs The request address contains undefined, or points at a project you do not recognise.

3. The Supabase project is paused

Supabase's docs say Free Plan projects may be paused after a 7-day period of low activity. A paused project does not answer requests, so every call from your app fails.

Open your project in the Supabase dashboard. The docs say you can restore a paused project from the dashboard, and that you have a 1-year window to restore it with one click. Restore it, then reload your app.

The docs say upgrading to Pro guarantees Supabase will not pause the project for inactivity.

signs Everything fails at once on a project you have not opened in a while, and the dashboard shows it as paused.

4. Something in the browser blocked the request

Ad blockers and privacy extensions can block calls to some domains. Open the live site in a private window with extensions off, or in a different browser. A failed request that works in a clean window points at an extension.

A request from your app to one of your own Supabase Edge Functions can also show as Failed to fetch when the function does not allow your site's address. If that is your case, read Supabase Edge Function CORS error on your live site.

signs The app works in a private window or another browser, or only the Edge Function call fails.

5. Only one request fails

If sign-in and other pages load fine and only one list or action fails, your Supabase address is right and the project is running. Click that one request in the Network tab. If it has a status code and a response, the server did answer, and you are chasing a different error than Failed to fetch.

Read the response text. It usually names the table, the column or the rule that refused the request.

signs Most of the app works, and one request fails.

Test it like a new user

  1. Open the live site in a private window with extensions off and do the action that failed.
  2. In the Network tab, check every request goes to your Supabase project's address, with no undefined in it.
  3. Open your Supabase dashboard and confirm the project shows as active, not paused.
  4. After any variable change, redeploy, then repeat the first check on the new deploy.

Common questions

What does TypeError: Failed to fetch mean?

The browser could not get any answer from the server. There is no error from Supabase because the request never reached it. Typical causes are a wrong or missing Supabase address, a paused project, a request blocked by an extension, or a CORS failure on your own function.

Why does Failed to fetch only happen on my live site?

The live host only has the settings you added there. If the Supabase URL variable is missing, misspelled or added after the last deploy, requests go to an address containing undefined. Add the variable on Vercel or Netlify with the right name for your framework, then redeploy.

Can a paused Supabase project cause Failed to fetch?

Yes. Supabase's docs say Free Plan projects may be paused after 7 days of low activity, and a paused project does not answer requests. Open the project in the Supabase dashboard, restore it, and reload your app. Upgrading to Pro stops inactivity pauses.

Still stuck?

Not sure this is the cause? Paste your app's link into the free scan. It lists what a visitor's browser can see, like leaked keys and exposed files, worst first. The score is free; every fix as a prompt for your builder is $9, one-time.

Want a person to look inside? See the diagnosis

More fix guides

See all fix guides