Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: add Edge Functions Troubleshooting guide.

thorwebdev1538dc25d569
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index bc79c4cbc39..21514701ee4 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -745,6 +745,7 @@ export const functions: NavMenuConstant = {
name: 'Connecting directly to Postgres',
url: '/guides/functions/connect-to-postgres',
},
+ { name: 'Troubleshooting', url: '/guides/functions/troubleshooting' },
],
},
{
diff --git a/apps/docs/pages/guides/functions/troubleshooting.mdx b/apps/docs/pages/guides/functions/troubleshooting.mdx
new file mode 100644
index 00000000000..a2b7eb66d31
--- /dev/null
+++ b/apps/docs/pages/guides/functions/troubleshooting.mdx
@@ -0,0 +1,39 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+
+export const meta = {
+ id: 'functions-troubleshooting',
+ title: 'Troubleshooting Edge Functions',
+ description: 'Troubleshooting Supabase Edge Functions.',
+}
+
+## Unable to call Edge Function
+
+If you're unable to call your Edge Function or are experiencing any CORS issues, even though you followed the [CORS guide](/guides/functions/cors), please head over to [app.supabase.com/project/\_/functions](https://app.supabase.com/project/_/functions), select your function from the list & click Logs. Do you see any errors listed there?
+
+There are two debugging tools available: Invocations and Logs. Invocations shows the Request and Response for each execution, while Logs shows any platform events, including deployments and errors.
+
+## Unable to deploy Edge Function
+
+- Make sure you're on the latest version of the [Supabase CLI](https://supabase.com/docs/guides/cli#updates).
+- Run the deploy command with the `--debug` flag.
+- Run the deploy command with the `--legacy-bundle` flag and see if that works.
+- If the output from the commands above does not help you to resolve the issue, please open a support ticket via the Supabase Dashboard (by clicking the "Help" button at the top right) and include all output from the commands mentioned above.
+
+## Edge Function takes too long to respond
+
+- Head over to [app.supabase.com/project/\_/functions](https://app.supabase.com/project/_/functions), select your function from the list & click Logs.
+- In the looks, look for the `booted` event and check if they have consistent boot times.
+ - If the boot times are similar, it's likely an issue with your function's code, like a large dependency etc.
+ - If only some of the `booted` events are slow, please find the affected `region` in the metadata and submit a support request via the "Help" button at the top.
+
+## Issues serving Edge Functions locally with the Supabase CLI
+
+- Make sure you're on the latest version of the [Supabase CLI](https://supabase.com/docs/guides/cli#updates).
+- Run the serve command with the `--debug` flag.
+- Support engineers can then try to run the provided sample code locally and see if they can reproduce the issue.
+- Search the [Edge Runtime](https://github.com/supabase/edge-runtime) and [CLI](https://github.com/supabase/cli) repos for the error message, to see if it has been reported before.
+- If the output from the commands above does not help you to resolve the issue, please open a support ticket via the Supabase Dashboard (by clicking the "Help" button at the top right) and include all output and details about your commands.
+
+export const Page = ({ children }) => <Layout meta={meta} children={children} />
+
+export default Page