# TypeError: Failed to fetch on a Supabase call: find the cause

Source: https://vibe-fixer.com/guides/supabase-typeerror-failed-to-fetch
Last updated: 2026-11-24

**Short answer:** TypeError: Failed to fetch means the browser could not complete a request to your Supabase project, so no response reached your code. Open the Network tab, read the failed request's address and status, and match it to the table below: wrong project URL, paused project, Edge Function CORS, http on an https page, a blocking network or extension, or a DNS problem.

Something broke on your live app? Tell us what happened. Our AI agent tries it on your live app and sends you a screenshot, free. [Check my app free](https://vibe-fixer.com/?src=guide-supabase-typeerror-failed-to-fetch-t#triageForm)

## What does "Failed to fetch" mean here?

Our note: Chrome-based browsers show this wording when a `fetch()` call fails before any answer comes back; other browsers word it differently. MDN lists what makes `fetch()` throw a `TypeError`: an invalid URL, a request blocked by a permissions policy, and "a network error" such as a device with no connectivity ([MDN: Window.fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch)). Supabase's JavaScript library uses `fetch()`, so a Supabase call that fails this way shows the same message.

If the call comes from sign-in code, you can see `AuthRetryableFetchError: Failed to fetch`. Supabase's auth library defines that class as the error thrown when a transient fetch issue occurs ([supabase-js: auth-js errors.ts](https://raw.githubusercontent.com/supabase/supabase-js/master/packages/core/auth-js/src/lib/errors.ts)). The auth library wraps a failed fetch (network, CORS or aborted request) in this error and keeps the original message ([supabase-js: auth-js fetch.ts](https://raw.githubusercontent.com/supabase/supabase-js/master/packages/core/auth-js/src/lib/fetch.ts)).

The message does not say which cause it is. For CORS failures MDN says the specifics "are not available to JavaScript", and the only way to find out what went wrong is to look at the browser console ([MDN: CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS)). So start with the console and the Network tab.

## Which cause is it?

Open your live app, open DevTools, and repeat the action that fails. In the Console, press Control+Shift+J (Command+Option+J on a Mac). Then open the Network tab and click the failed request ([Chrome DevTools: Console reference](https://developer.chrome.com/docs/devtools/console/reference)). In the Network tab, the Status column shows `(failed)` with the error message, and CORS failures show as "CORS error" ([Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)).

| What the console and network tab show | Cause | Fix |
| --- | --- | --- |
| The request address is not your project's address: it is empty, says `undefined`, points to `localhost`, or has a typo | The project URL or environment variable on the live site is wrong or missing | [Cause 1](#1-the-project-url-or-environment-variable-on-the-live-site-is-wrong-or-missing) |
| The address is right and has a Supabase project name, the project is on the Free plan, and the dashboard shows it as paused | The project is paused | [Cause 2](#2-the-project-is-paused) |
| The failed request goes to `/functions/v1/`, the Network tab shows "CORS error", and the console names CORS or a preflight check | CORS on an Edge Function | [Cause 3](#3-cors-on-an-edge-function) |
| The page address starts with `https://` and the request address starts with `http://` | Mixed content | [Cause 4](#4-mixed-content-http-request-from-an-https-page) |
| The request address is right, but it works in a private window with extensions off, or on another network | A network or an extension is blocking the request | [Cause 5](#5-a-network-or-an-extension-blocks-the-request) |
| The host name ends in `.supabase.com`, has a typo, or does not resolve (check with the steps in cause 6) | A DNS issue with the project URL | [Cause 6](#6-a-dns-issue-with-the-project-url) |

## 1. The project URL or environment variable on the live site is wrong or missing

The Supabase client needs the project URL and a key. The docs say both are "supplied when you create a new project in your project dashboard" ([Supabase: Initializing](https://supabase.com/docs/reference/javascript/initializing)). The API address has the form `https://<project_ref>.supabase.co/rest/v1/`, and you can find it under Integrations, then Data API, in the dashboard ([Supabase: REST API](https://supabase.com/docs/guides/api)). If the live site has no value for the variable that holds the URL, or an old one, the request goes to an address that is not your project.

**How to fix it**

1. In the Network tab, click the failed request and read its address.
2. In the Supabase dashboard, open Integrations, then Data API, and copy the project URL. Compare it with the address from step 1, character by character.
3. Our suggestion: in your app's hosting settings, check that the variable holding the URL and the one holding the key are set for the live (production) environment, not only for preview. After you change a variable, deploy again so the live site gets it.
4. Our suggestion: variables read by browser code need a name your framework exposes to the browser. Our v0 guide shows this in detail: [v0 environment variables missing after publish](https://vibe-fixer.com/guides/fix-broken-v0-app).

Source: [Supabase: Initializing](https://supabase.com/docs/reference/javascript/initializing), [Supabase: REST API](https://supabase.com/docs/guides/api), [Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)

## 2. The project is paused

Supabase "pauses Free Plan projects that show low activity over a 7-day period" ([Supabase: Free project pausing](https://supabase.com/docs/guides/platform/free-project-pausing)). Supabase's NXDOMAIN guide says "A paused project stops serving its hostname" ([Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)), so the browser's request fails before any answer comes back.

**How to fix it**

1. Open the Supabase dashboard and look at the project's status.
2. If it is paused, select the organization, then the paused project, and click Resume project and confirm.
3. The docs say a project can be restored for up to 1 year after it was paused, and it returns with its data and configurations ([Supabase: Free project pausing](https://supabase.com/docs/guides/platform/free-project-pausing)).
4. Reload your live app and repeat the failing action.

More detail: [Supabase free project paused](https://vibe-fixer.com/guides/supabase-free-project-paused).

Source: [Supabase: Free project pausing](https://supabase.com/docs/guides/platform/free-project-pausing), [Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)

## 3. CORS on an Edge Function

If the failed request goes to an Edge Function, the browser may send a preflight request first. Supabase says: "To invoke edge functions from the browser, you need to handle CORS Preflight requests" ([Supabase: CORS for Edge Functions](https://supabase.com/docs/guides/functions/cors)). Supabase's troubleshooting page lists the missing `Access-Control-Allow-Origin` header in the response and not handling `OPTIONS` preflight requests as causes. It also lists a function that is not deployed and an incorrect function URL ([Supabase: Unable to call Edge Function](https://supabase.com/docs/guides/troubleshooting/unable-to-call-edge-function)). MDN says most CORS errors "can only be resolved on the server" ([MDN: CORS errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors)).

**How to fix it**

1. In the Network tab, check the failed request's address. It should be `https://<project_ref>.supabase.co/functions/v1/<function-name>` with the right function name.
2. In the Supabase dashboard, check that the function is deployed.
3. Make the function answer the `OPTIONS` preflight request and attach the CORS headers to every response, as shown in the Supabase CORS guide.
4. Deploy the function again, then repeat the action on your live app.

Step-by-step with the exact code: [Supabase Edge Function blocked by CORS policy](https://vibe-fixer.com/guides/supabase-edge-function-blocked-by-cors-policy).

Source: [Supabase: CORS for Edge Functions](https://supabase.com/docs/guides/functions/cors), [Supabase: Unable to call Edge Function](https://supabase.com/docs/guides/troubleshooting/unable-to-call-edge-function), [MDN: CORS errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors)

## 4. Mixed content: http request from an https page

MDN defines mixed content as securely loaded pages that "use resources to be fetched via HTTP or another insecure protocol." It lists `fetch()` and `XMLHttpRequest` requests as blockable content, and says browsers block requests for blockable content ([MDN: Mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content)). If your live site is on https and the project URL in its settings starts with `http://`, the browser blocks the request.

**How to fix it**

1. In the Network tab, read the failed request's address. If it starts with `http://`, this is the cause.
2. Change the project URL variable to the https address from Integrations, then Data API, in the Supabase dashboard.
3. Deploy again and repeat the action. Our suggestion: also search your code for other hard-coded `http://` addresses that your app calls.

Source: [MDN: Mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content), [Supabase: REST API](https://supabase.com/docs/guides/api)

## 5. A network or an extension blocks the request

MDN lists a network error as one reason `fetch()` throws a `TypeError` ([MDN: Window.fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch)). Supabase's NXDOMAIN guide says a failure to reach a project can be "with that network's DNS resolver rather than with Supabase," and it names restrictive office, carrier and ISP networks as places where this happens ([Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)). Chrome's Network tab flags blocked requests in red and has a filter for them ([Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)).

**How to fix it**

1. Our suggestion: open your live app in a private window with extensions turned off. If the request works, turn the extensions back on one at a time to find the one that blocks it.
2. Our suggestion: try the same app on another network, such as a phone's mobile data. If it works there, the first network is the cause.
3. For a network that cannot resolve your project, Supabase says to switch the device or router to a public DNS resolver such as Cloudflare (`1.1.1.1`) or Google (`8.8.8.8`).
4. In the Network tab, use the Blocked requests filter under More filters to list blocked requests.

Source: [MDN: Window.fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch), [Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project), [Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)

## 6. A DNS issue with the project URL

The browser needs to resolve the project's host name before it can send a request. Supabase says "A single mismatched character in the project reference produces `NXDOMAIN`" and "Project hostnames never end in `.supabase.com`" ([Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)). A deleted project's host name "stops resolving permanently," per the same page.

**How to fix it**

1. Copy the project URL from the Supabase dashboard instead of retyping it, and paste it into your app's variable.
2. Check that the host name ends in `.supabase.co` (unless you set up a custom domain), not `.supabase.com`.
3. If you use a custom domain for your project, check its DNS records at your domain provider. Our suggestion: use the project's own `.supabase.co` address to see whether the custom domain is the cause.
4. If the failure happens only on some networks, follow step 3 of cause 5.

More detail: [Supabase project URL not loading: NXDOMAIN](https://vibe-fixer.com/guides/supabase-project-url-not-loading-nxdomain).

Source: [Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)

## How do I check it's fixed?

1. Our suggestion: open your live app in a private window and repeat the action that failed. The Console should show no "Failed to fetch".
2. In the Network tab, click the request. Its Status column should show a status code instead of `(failed)` ([Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)).
3. Our suggestion: repeat the action on a second network, such as mobile data, and on a second device. A fix that works only on your own machine can hide a network cause.
4. Our suggestion: test as a person who has never used the app, not from an account that is already signed in.

## FAQ

### Does "Failed to fetch" mean Supabase is down?

Not by itself. The message comes from the browser's `fetch()`, which throws a `TypeError` for reasons such as an invalid URL, a network error or a blocked request ([MDN: Window.fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch)). The message does not name Supabase, so read the failed request's address and status first.

### Why can't my code read a more detailed error?

For CORS failures, MDN says the browser keeps the specifics from JavaScript for security reasons. The only way to find out what went wrong is to look at the browser's console ([MDN: CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS)). Open the Console and the Network tab, as in the table above.

### Why does it work for me but fail for my customers?

Several causes depend on where the request is made from. Supabase says the problem can be with a network's DNS resolver rather than with Supabase ([Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)). Our suggestion: also check that the live site has its own environment variables, because a preview can have values the live site lacks.

### Is AuthRetryableFetchError a different problem?

It is the Auth library's name for the error thrown when a transient fetch issue occurs ([supabase-js: auth-js errors.ts](https://raw.githubusercontent.com/supabase/supabase-js/master/packages/core/auth-js/src/lib/errors.ts)). Use the same steps: find the failed request in the Network tab and match it to the table above.

### Can VibeFix fix it for me?

Yes, for any app whose code is on GitHub, whichever tool built it (Lovable, Bolt, Base44, Replit, v0, Cursor). The free check confirms the problem on your live app first. If you want it fixed, our AI agent finds the cause, fixes it in your code for $29 and tests your live app again. See [pricing](https://vibe-fixer.com/pricing).

## Want it fixed?

VibeFix's free check tries the problem you describe on your live app. Tell us what broke, and our AI agent tries it and sends you a screenshot. If you want it fixed, it finds the cause, fixes it in your code and re-checks your live app. The free check never changes your app. [Check my app free](https://vibe-fixer.com/?src=guide-supabase-typeerror-failed-to-fetch-f#triageForm)

## Related guides

- [Supabase project URL not loading: NXDOMAIN](https://vibe-fixer.com/guides/supabase-project-url-not-loading-nxdomain)
- [Supabase free project paused](https://vibe-fixer.com/guides/supabase-free-project-paused)
- [Supabase Edge Function blocked by CORS policy](https://vibe-fixer.com/guides/supabase-edge-function-blocked-by-cors-policy)
- [v0 environment variables missing after publish](https://vibe-fixer.com/guides/fix-broken-v0-app)

Last checked: 24 November 2026

## Sources

- [supabase-js: auth-js fetch.ts](https://raw.githubusercontent.com/supabase/supabase-js/master/packages/core/auth-js/src/lib/fetch.ts)

- [MDN: Window.fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch)
- [MDN: Mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content)
- [MDN: Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS)
- [MDN: CORS errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors)
- [Supabase: Initializing (JavaScript reference)](https://supabase.com/docs/reference/javascript/initializing)
- [Supabase: REST API](https://supabase.com/docs/guides/api)
- [Supabase: Free project pausing](https://supabase.com/docs/guides/platform/free-project-pausing)
- [Supabase: NXDOMAIN error connecting to a project](https://supabase.com/docs/guides/troubleshooting/nxdomain-error-connecting-to-a-supabase-project)
- [Supabase: CORS for Edge Functions](https://supabase.com/docs/guides/functions/cors)
- [Supabase: Unable to call Edge Function](https://supabase.com/docs/guides/troubleshooting/unable-to-call-edge-function)
- [supabase-js: auth-js errors.ts](https://raw.githubusercontent.com/supabase/supabase-js/master/packages/core/auth-js/src/lib/errors.ts)
- [Chrome DevTools: Network reference](https://developer.chrome.com/docs/devtools/network/reference)
- [Chrome DevTools: Console reference](https://developer.chrome.com/docs/devtools/console/reference)

VibeFix is independent. Supabase is a trademark of its owner.

Want it fixed for you? For any app whose code is on GitHub, whichever tool built it, VibeFix's AI agent can find the cause of this error, fix it in your code and re-check your live app. Start with a free check: https://vibe-fixer.com
