|
Project ref: qcljtqizujwxmxqrogkg POST requests carrying an Authorization: Bearer header fail in-browser with net::ERR_CONNECTION_RESET / net::ERR_CONNECTION_CLOSED. Affects multiple routes: /community/join, /community/data (GET), /education/progress, /education/bookmark, /community/thread/create. The key symptom: the OPTIONS preflight to the exact same path succeeds cleanly (204, ~1ms, logged normally). The actual POST/GET that follows never appears in the function's own Logs or Invocations tab at all — no boot, no invocation record, nothing. It's being dropped somewhere between the browser and the function, before the function is ever invoked. Reproduced identically across Chrome, Edge, and a clean mobile browser with zero extensions — so this isn't a client-side/CORS/cookie issue. Already ruled out: Function code — confirmed unrelated to a separate (real, now-fixed) bug where we were still reading the retired SUPABASE_ANON_KEY/SUPABASE_SERVICE_ROLE_KEY secret names instead of the new SUPABASE_PUBLISHABLE_KEYS/SUPABASE_SECRET_KEYS. Fixed and redeployed (confirmed via the function's "deployed X minutes ago" timestamp) — issue persisted identically afterward, and since the request never reaches the function, this fix couldn't have mattered either way. Already opened a support ticket (SU-442129, High severity) but wanted to post here too in case someone's seen this pattern before — the "preflight succeeds, real request vanishes with zero function-side trace" combination feels like it points at something in the gateway/routing layer in front of the function rather than anything in our code. Has anyone run into this? Any pointers on what else to check (or logs we could pull) would be hugely appreciated. |
Replies: 2 comments 2 replies
|
Could it be a network/firewall issue where it treats options different to GET requests? if you use a vpn or different network do you still get the issue? |
|
I’d try to isolate whether the reset is happening at the client/network edge before the Edge Function gateway. Since the OPTIONS request reaches the function and succeeds, while the subsequent authenticated GET/POST never appears in Invocations, I’d compare the failing request outside the browser:
For example: curl -v \
-X POST \
'https://<project-ref>.supabase.co/functions/v1/make-server-1aee76a8/community/join' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
--data '{}'Also worth testing: curl -4 -v ...
curl -6 -v ...If Given that OPTIONS succeeds but the authenticated request disappears before invocation, I’d focus on identifying exactly where the TCP/TLS/HTTP connection is being terminated rather than changing the function/CORS code. |
I’d try to isolate whether the reset is happening at the client/network edge before the Edge Function gateway.
Since the OPTIONS request reaches the function and succeeds, while the subsequent authenticated GET/POST never appears in Invocations, I’d compare the failing request outside the browser:
curl -vusing the exact function URL and Authorization header.Au…