Debugging SSR Page
What is the best way to debug a 1101 Error and tail says Error: The script will never return a response. For context we are hosting an astro site with SSR as a "sandbox" environment for customers to test CMS changes before deploying (the final page is static). But for some "some minutes - minutes could also last for 20-25 minutes" the page works perfeclty fine and then for a long time there is the 1101 Error and I really cant find a way to debug, etc. Any help / direction would be really appreciated.
moved from #Debugging SSR Page
23 Replies
bump
New thing happening today, we have no code changes, we only changed the name of an css class and the deployments (direct upload via ci/cd) start failing without any reason
Just for reference if you want to "reproduce" the error by yourself, go onto https://murtleontour.ruxiom.dev and spam the reload button (after at least 5 times, you will receive the above error)
there is actually no debugging possible from our end :/
That error usually means you're doing things in the global scope
i.e starting a promise on request A and waiting on request B. It doesn't see the promise from another request / thinks you're deadlocked and dies. Only possible by mishandling stuff in the global scope
as I am using Astro and the cloudflare adapter I would not know where to start. We are using Storyblok as an cms and the only "fetch" that is done is on page load which is completely error handeled:
[...slug].astro
I'm really trying to find where to start. I could obviously try to optimize the js even more, but if it is not the problem (and astro's whole "doing" is less js) I would rather try working on something elselooks like it is storyblok https://github.com/withastro/adapters/issues/43
GitHub
Erron when hosting in Cloudflare with Server Side Rendering enabled...
What version of astro are you using? 2.7.4 Are you using an SSR adapter? If so, which one? Cloudflare What package manager are you using? npm What operating system are you using? Mac What browser a...
downstream issue https://github.com/storyblok/storyblok-js-client/issues/682#issuecomment-1824512798
GitHub
Storyblok client throttling crashing Astro adapter in CloudFlare Wo...
I have a project using Astro. Astro has a CloudFlare Worker "adapter" for doing server side rendering (SSR). This will re-render the preview page every time someone hits "save" ...
looks like there's a hotpatch there as well
wow. you really helped me out so much. really appreciate it. I was doing my research aswell but I didnt find any issue related to that... maybe blindeyed, so thanks.
But could this also be the reason for the deployments just not "deploying" ? (pun intended)
what's the error you get with that? You're using wrangler direct upload and they just show up as failed in the dash, or?
just shows up as failed in the dash
direct upload goes through perfectly fine and also returns an preview url (which does not work)
the webhook for page deployments warns me that it didnt work
Your function is too large/fails to startup/etc. I would check size and such first, and if needed Pages team can always pull the logs on their side
That's a CF bug that makes it not show: https://github.com/cloudflare/workers-sdk/issues/3966
If you were using the github integration it would show the exact error, but for direct upload it just swallows it.
I just implemented the hotpatch in the issue you provided me with. I will give it a try uploading again and if it works now, I can ignore it, if it does not work, ill check back and maybe try to reduce bundle size... at least theres something I can do now
ty very much ❤️
the limits you're looking for is if it's over 1 MB (free) or 10 MB (paid)
(im on paid and the js is not even close to 10mb -> its 1.34mb)
as long as you've got Workers Paid that shouldn't be an issue then, could be startup time though. if it fails randomly like that again just need the deployment id so they can grab the logs for it
?pages-deployment-id
The Pages deployment ID is a unique build identifier.
It's the UUID in the browser bar (for example, a URL would be
dash.cloudflare.com/ACCOUNT_ID/pages/view/PROJECT/DEPLOYMENT_ID
where the deployment ID looks something like a398d794-7322-4c97-96d9-40b5140a8d9b).
This ID can help troubleshoot some issues with Pages builds so if you have a failing build make sure you grab that ID for the Pages team to use.e36638e3-145b-4ff4-b0b9-b55a5ab79062
this is the build identifier (this included the patch for the storyblok api client)
limits should really (really) not apply here
and that one just failed? What's the pages.dev?
https://e36638e3.murtleontour.pages.dev
jep that one failied, dash says "failed" but you explained already why this is so
Escalated. We'll see, maybe it's start up time. That issue with it not showing the error has been around for a while sadly, hopefully one day they fix that directly
thank you very very much for your help and time, really appreciate it. Really curios what the issue now is. I could try downgrading Astro to try debugging from my end, as I just bumbed a minor version today.
JFYI: Astro 4.3.3 broke something, as the deploy works perfectly fine (is live right now) with Astro 4.3.2
I would really like to know the issue tho, as I could make a new issue on astro side.
Did you say it only happened intermittently or was that just about the script never returning a response issues?
it happened in two steps (commits). Did change some styling (changed the css) deploy worked, bumped dependencies (only astro) deploy did not work. That was the reason I started this thread again because after the bump of the dependencies the deploy did not work anymore.
after reverting the second commit (only reverting the bump) everything works perfectly fine (including the patch for the api client of storyblok)
I only have one server side function and am getting this error
I am using NextJS however