© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
3 replies
ard

I am getting the error `The script will

I am getting the error
The script will never generate a response
The script will never generate a response
when trying to use fetch() in my generateMetaData function in NextJS 14. I've seen a lot of similar bugs reported on this but haven't been able to find a solution. Is anyone familiar with this?
I can reproduce this locally when running npx @Cloudflare/next-on-pages@1 and then using wrangler to do a preview, otherwise this works on local.
The error I was getting before reproducing on local (in my dev cloudflare url) was
A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.
A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Next-On-Pages: The script will never generate a response
Cloudflare DevelopersCDCloudflare Developers / next-on-pages
2y ago
getting this error
Cloudflare DevelopersCDCloudflare Developers / next-on-pages
15mo ago
Hi team I m getting a
Cloudflare DevelopersCDCloudflare Developers / next-on-pages
3y ago
Hey Guys, I am stuck on this issue while
Cloudflare DevelopersCDCloudflare Developers / next-on-pages
2y ago