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

Failed to send a request to the Edge Function #12293

Closed
gaodeng opened this issue Feb 9, 2023 · 12 comments
Closed

Failed to send a request to the Edge Function #12293

gaodeng opened this issue Feb 9, 2023 · 12 comments
Labels
edge functions question Further information is requested

Comments

@gaodeng
Copy link

gaodeng commented Feb 9, 2023

Why is the edge function so unstable? Almost more than half of the calls report an error
"Failed to send a request to the Edge Function"
Simulator Screen Shot - iPad Pro (12 9-inch) (6th generation) - 2023-02-08 at 15 48 14

@gaodeng gaodeng added the bug Something isn't working label Feb 9, 2023
@thorwebdev
Copy link
Member

thorwebdev commented Feb 13, 2023

@gaodeng do you have any more information you can add, e.g.

  1. what's the code of your function
  2. What's your project id and your function name
  3. Any logs you are seeing, both in your dev environment and your supabase dashboard?
  4. What is the location that you're calling the function from?

If you're not able to share this information publicly, please click Help > Contact support in your project dashboard. Thanks.
image

@thorwebdev thorwebdev added question Further information is requested and removed bug Something isn't working labels Feb 13, 2023
@gaodeng
Copy link
Author

gaodeng commented Feb 13, 2023

@thorwebdev

Intermittent Issues: We've been experiencing issues with Supabase Edge Functions that seem to occur intermittently, regardless of the user's physical location or network connectivity. This has led us to believe that the issue is not related to local network conditions.

Multiple Edge Functions Affected: While these issues are occurring, we have noticed that other Supabase APIs are functioning normally. However, it's not just one specific Edge Function that is experiencing issues. In fact, multiple Edge Functions are experiencing the same problems. This suggests that the issue may be related to Supabase infrastructure or platform-wide changes.

As a workaround to address the issue, we have decided to migrate and replace all Edge Functions.

I previously reached out through the dashboard, but I didn't receive a response, Could you please check if you can find my previous message through the dashboard

@thorwebdev
Copy link
Member

@gaodeng I'm afraid I'm not able to locate your ticket with your GitHub profile information. Could you help me by providing your project reference?

@gaodeng gaodeng closed this as completed Feb 13, 2023
@rafayahmed123
Copy link

Did you end up finding a solution to this one? If so, please explain how you were able to achieve it.

@Mykyta-Chernenko
Copy link

I experience the same issue, some requests, around 10% just fail with this error, different locations, different functions, different time, it's especially painful to see that users cannot subscribe to premium because of it

@flogy
Copy link

flogy commented Nov 23, 2023

Same here...

@KOoba1
Copy link

KOoba1 commented Dec 14, 2023

Also having the same issue, very scary that edge functions can just arbitrarily not work

@yuriyyakym
Copy link

yuriyyakym commented Jan 2, 2024

The very likely reason for the problem is that you are using http protocol.
Not sure about macOS, but iOS requires connection to be secure by default.

Possible solutions:

  • use your local IP address. Note: http://127.0.0.1:54321 does not work for me because I connet from my phone, whereas http://192.168.1.3:54321 does the job
  • use tool like ngrok in order to expose your local server via https
  • update your app config in order to allow macOS/iOS to establish insecure connections

@sebestindragos
Copy link

Recently launched a product on Supabase and having this problem too. Just as others have mentioned, pretty much arbitrary failures with no obvious pattern.

@yuriyyakym You're providing a fix for edge functions running locally in a docker container while developing. Most people here have this problem in production with the real supabase API. Interestingly enough, it doesn't happen with the development env on my local machine.

@williamlmao
Copy link

+1 on this, I really wish these errors gave some more information. Incredibly hard to debug this right now.

@flogy
Copy link

flogy commented Apr 19, 2024

Could it be that Cloudflare blocks some of the requests for some reason? 🤔

@antonioglass
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edge functions question Further information is requested
Projects
None yet
Development

No branches or pull requests