-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error: The script will never generate a response. #57
Comments
I can deploy my app now (after upgrading to But I'm not able to run it locally or in the worker in Cloudflare. My browser shows this: Error: The script will never generate a response. at async Object.fetch (file:///{removed}/node_modules/miniflare/dist/src/workers/core/entry.worker.js:1029:22) And the output from Wrangler shows this: ✘ [ERROR] Uncaught (async) Error: Invariant: renderHTML should not be called in minimal mode at Xe.renderHTMLImpl (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:404:9251) at file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:404:9176 at m.trace (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:333:249036) at Xe.renderHTML (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:404:9123) at Fa (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:372:23698) at Yn.responseCache.get.routeKind (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:374:1436) at o.get (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:387:77655) at Xe.renderToResponseWithComponentsImpl (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:374:389) at file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:372:15795 at m.trace (file:///{removed}/packages/application/.wrangler/tmp/dev-3Gm2Gb/index.js:333:249036) ✘ [ERROR] Uncaught (in response) Error: The script will never generate a response. ✘ [ERROR] Uncaught (async) Error: Promise will never complete. Adding the environment variables (WRANGLER_BUILD) don't fix the issue for me. |
Thanks for reporting! |
Here are the steps to reproduce: First error scenario
Second error scenario
T3 Stack has a similar packages to my project, so was the best way I could think of to reproduce the problems, @vicb I hope it helps |
It does help, thanks! I presume that's an issue with NextAuth but I'll take a closer look next week. |
@vicb any luck on this issue? |
I hope that will be solved when integrate with existing code in |
I've been following the updates and updating the T3 Stack example repo and the errors are improving, now it says the following
So no more the Error: The script will never generate a response. |
I'm getting a similar error when using the instrumentation hook to load Sentry configuration for the server:
I know instrumentation hook is still experimental, but I haven't seen anything in the docs mentioning a specific issue to this. Is this feature supported by this lib? Is it related to this package or to wrangler SDK? Thanks in advance! |
At least in my case, In my case I've been trying to get something, anything deployed to Cloudflare for days, so I'm deploying just a single API route. So when my API route file fails to
The actual underlying issue in my case is, well, much more complex. There's not one, I've fixed (worked around) dozens of issues with the workerd runtime thus far. Currently I'm locking horns with |
Is this still an issue with the latest version? Thanks! |
@vicb It's still happening with the latest version. You can reproduce it with the following example (we are starting a new Next.js app so it's almost an empty one):
In both cases, it failed: locally and deployed, while it works with ![]() ![]() |
You should use the latest version of wrangler too :) Not enough to solve the issue first issue but it fixes module.findSourceMap. A few more notes:
You can not use export const GITBOOK_API_URL = process.env.GITBOOK_API_URL ?? 'https://api.gitbook.com';
// And call that in a request context
export const getApiUrl = () => process.env.GITBOOK_API_URL ?? 'https://api.gitbook.com'; Documentation for that is coming... |
After the following issues (#45 and #42) were resolved I was finally able to build my App.
In the meantime I decided to run the following command to test and run App to see if it was working properly, but I'm having the following problem:
wrangler dev --port 3003
When I open in the browser, I immediately get the following error
Strangely enough, the console shows the following errors
By the way, I had to add the following environment variables so that it could at least run without errors (before opening in the browser) otherwise it says the following:
Environment variables based on the docs https://opennext.js.org/cloudflare/troubleshooting#my-app-fails-to-build-when-i-import-a-specific-npm-package
Without the variables above it outputs the following error
PS: I don't use this package jose in my project
Now the problem is to help describe how to cause/replicate this error because I generated a new project from scratch with Yarn and both the build and start run without the app breaking, so most likely it may be a unique case of my project since it already has its size, so I leave this issue open if anyone knows if I'm doing something wrong or if someone else is experiencing the same thing.
The text was updated successfully, but these errors were encountered: