My site seems to have a similar problem. I have been receiving frequent function timeouts since 1/31/24. Error logs do not provide good information.
Function is a graphql function tied to Railway database. I thought it might be Railway, but I have set up using Supabase and still get the same errors.
I’m not sure how easy it will be to generate a non-expiring JWT or create a simpler reproduction case. The easiest solution I can think of would be to just repeatedly provide you new JWTs (ours expire every 60 minutes I believe).
For now, however, I can confirm that the error still occurred at 7:51AM Pacific time today (though as of 8:17 I’ve been struggling to catch an instance of it).
We have also turned off a feature flag (which was only active for Starter users) that we think might be related. But we are still waiting to make a meaningful progress here as people who are reporting the issue have not yet shared (except @slept) the details of their sites and proper reproduction steps.
@skippyyy, thank you for the offer, we would really appreciate that. Please setup a site and let us know its ID so we can enable the flag for that. Then also let us know how we can confirm the corrupted JSON (like would you be logging it somewhere, or would your API be returning it as a response, etc.).
Hello, the site ID is celebrated-panda-8e0d08. Let me know when the feature is enabled on the site so I can provide you with further details/instructions.
Okay so, I was able to replicate it by just going to https://celebrated-panda-8e0d08.netlify.app/ and just spamming the trigger button like 5 times in a row really quick, after a few tries you should be able to see a few 5xx responses with json parsing error. I have logging enabled and a middleware in my express server that console logs the payload before it’s passed to the json parser, and it seems like there’s an extra “}” at the end of each payload but i’ve seen some other weird behaviour before like missing quotes etc. Let me know if you were able to replicate the issue or if you need any more details!
Hey @hrishikesh did we recently enable back the flag, we started seeing the corrupted json errors again. It showed up but disappeared after you turned off the flag last time. Thanks!