Open eloff opened 1 year ago
i get the identical error in my workers project, and i don't use d3. running on macOS 13.5 with wrangler 3.5.0. also filed here: https://github.com/cloudflare/workerd/issues/1010
I tried again this morning, after rebooting overnight. The error is gone, the reboot fixed it. It wasn't the query at fault here, probably not d1 (directly anyway). There's something else going on, and somehow a reboot fixed it.
I'm having the same issue:
I am getting this issue when quickly closing a connection to my worker
I've transferred this to workerd
since it looks like it's an error log coming from workerd
rather than Wrangler directly
We'll need a simple reproduction example in order to diagnose this.
I'm not sure if this is exactly the same thing:
workerd/server/server.c++:3069: error: Uncaught exception: kj/compat/http.c++:3939: disconnected: worker_do_not_log; Request failed due to internal error
(Note kj/compat/http.c++:3939
instead of kj/async-io-unix.c++:186
, which the OP reported.)
@jasnell I can reproduce this, but sometimes it requires patience.
npm install && npm run dev
.localhost:8787
. I opened a few to localhost:8787
and a few to localhost:8787/some/other/path
.Here are the associated log files from one reproduction.
I was able to reproduce this using a bare minimum worker template with fetch('https://example.com').
Strangely it seems to work fine with fetch('http://ip-api.com/json'), so I think it's an issue with SSL.
Here is the reproduction: https://github.com/cloudflare/workers-sdk/files/14214588/test-worker.zip
I am using wrangler 3.28.0 and macOS 13.5 and node.js 18, but I don't think this matters because I've experienced this reliably on both my windows and mac computers, with different sdk versions and different node.js versions
Last week I was not experiencing this and I have no idea why..
cc @jasnell
Can we please rename this issue to something more useful? Like "internal error" on fetch with HTTPS
cc @jasnell
I would like to confirm this issue, but it seemed to resolve with a restart of my machine.
I am currently using WSL2 though, that might have an affect on it but above people have mentioned that it happens regardless of OS.
We'll need a simple reproduction example in order to diagnose this.
I am new to Cloudfare Workers, so I am starting the Rust example project, so I think I have the simplest reproduction:
npx wrangler generate hello-world-rust https://github.com/cloudflare/workers-sdk/templates/experimental/worker-rust
npx wrangler dev
[b]
option.Hello, World!
output, just press Control+R to reload the browser without releasing the keys in order to reload indefinitely.The same error presented here, with different line number, maybe it isn Β΄t the same case but I find it weird that a fast and simple REST endpoint like this could fail so easily.
[ERROR] workerd/server/server.c++:3340: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error`
I am using playwright testing in github actions and this error is spammed. Doesn't seem to affect the behaviour of the server or success of the tests though, so not a huge deal for me. This also happens when running the tests locally but doesnt happen when running the dev server and using the app normally.
Any updates on this? I keep getting similar errors:
β [ERROR] workerd/server/server.c++:3346: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error
stack:
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57e2823
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57e0c8d
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@412a4a4
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57ab0c0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@411945b
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41189a0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3509cf0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@350a124
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@338e460
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3847199
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@411945b
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41189a0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3509cf0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@350a124
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579e353
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@338f8ef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579f72f
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579ffe1
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57a63c4
[wrangler:inf] POST /search 200 OK (2468ms)
[wrangler:inf] POST /search 200 OK (657ms)
[wrangler:inf] POST /search 200 OK (658ms)
[wrangler:inf] GET /student/00111503019 200 OK (669ms)
[wrangler:inf] GET /student/00414901823 200 OK (662ms)
[wrangler:inf] GET /student/00255311623 200 OK (4714ms)
[wrangler:inf] GET /student/00417703523 200 OK (3483ms)
[wrangler:inf] GET /student/00512588822 200 OK (636ms)
[wrangler:inf] GET /student/00255311623 200 OK (651ms)
[wrangler:inf] GET /student/00413215723 200 OK (5846ms)
β [ERROR] workerd/jsg/util.c++:251: error: e = kj/async-io-unix.c++:1298: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Name or service not known
stack:
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57da5cc
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57dafe0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3fb3790
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410b810
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410d290
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410d9f0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4121040
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33d9546
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@357f4f0
/home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35797f0;
sentryErrorContext = jsgInternalError
I am running npx wrangler pages dev .vercel/output/static
after building the site with npx @cloudflare/next-on-pages@latest
. Doesn't work locally or in prod (cf pages) either.
Any updates on this? I keep getting similar errors:
β [ERROR] workerd/server/server.c++:3346: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error stack: /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57e2823 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57e0c8d /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@412a4a4 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57ab0c0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57bf540 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@411945b /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41189a0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3509cf0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@350a124 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@338e460 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3847199 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@411945b /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41189a0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2ddb010 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3509cf0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@350a124 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579e353 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@338f8ef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579deef /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579f72f /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@579ffe1 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57a63c4 [wrangler:inf] POST /search 200 OK (2468ms) [wrangler:inf] POST /search 200 OK (657ms) [wrangler:inf] POST /search 200 OK (658ms) [wrangler:inf] GET /student/00111503019 200 OK (669ms) [wrangler:inf] GET /student/00414901823 200 OK (662ms) [wrangler:inf] GET /student/00255311623 200 OK (4714ms) [wrangler:inf] GET /student/00417703523 200 OK (3483ms) [wrangler:inf] GET /student/00512588822 200 OK (636ms) [wrangler:inf] GET /student/00255311623 200 OK (651ms) [wrangler:inf] GET /student/00413215723 200 OK (5846ms) β [ERROR] workerd/jsg/util.c++:251: error: e = kj/async-io-unix.c++:1298: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Name or service not known stack: /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57da5cc /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@57dafe0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3fb3790 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410b810 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410d290 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@410d9f0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4121040 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33d9546 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2de5310 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@357f4f0 /home/martian/.npm/_npx/32026684e21afda6/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35797f0; sentryErrorContext = jsgInternalError
I am running
npx wrangler pages dev .vercel/output/static
after building the site withnpx @cloudflare/next-on-pages@latest
. Doesn't work locally or in prod (cf pages) either.
I had the exactly same error with minimal reproduction, based on this tutorial, with Ngrok hosting. https://developers.cloudflare.com/durable-objects/examples/websocket-hibernation-server/
WebSocket handshaking is succeeded, but in a few minutes, connection got lost because of this above error. This error does not appear when I just connect to localhost server. It is only on Ngrok environment.
Any solution?
Any solution?
@HiraiKyo
None that I am aware of sorry, plus this issue seems old, I doubt we are getting any response or solution anytime soon.
Any time you see "internal error", there should be a separate log line actually logging the real error. You need to look for that log line.
@martian0x80 in your example the actual error seems to be:
failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Name or service not known
This seems to be a regular DNS lookup error, probably specific to your environment.
Obviously the way these errors reported is not so great. Sorry about that. workerd's error logging is awkward since the code was originally designed to log errors that we, the Cloudflare Workers team, needed to address, while explicitly not logging problems that the application should address (those are simply delivered to the application as thrown exceptions). We really need to go back and come up with a better story here.
@kentonv Thanks mate, so I cannot get some meaningful log for websocket close :(
Any time you see "internal error", there should be a separate log line actually logging the real error. You need to look for that log line.
@martian0x80 in your example the actual error seems to be:
failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Name or service not known
This seems to be a regular DNS lookup error, probably specific to your environment.
Obviously the way these errors reported is not so great. Sorry about that. workerd's error logging is awkward since the code was originally designed to log errors that we, the Cloudflare Workers team, needed to address, while explicitly not logging problems that the application should address (those are simply delivered to the application as thrown exceptions). We really need to go back and come up with a better story here.
Thanks for the response, I just tested it on a new Github Codespace as well and I get the same errors, even on the Cloudflare Pages deployment, which throws a silent "error code: 1016" in the logs, this is what wrangler logs say:
Connected to deployment <deployment-id>, waiting for logs...
GET https://xxxx.pages.dev/ - Ok @ 16/6/2024, 1:19:20 pm
(error) error code: 1016
GET https://xxxx.pages.dev/favicon.ico - Ok @ 16/6/2024, 1:19:22 pm
GET https://xxxx.pages.dev/student/08215602721?_rsc=1rft4 - Ok @ 16/6/2024, 1:19:31 pm
(error) error code: 1016
(error) error code: 1016
This only occurs on pages that are server side rendered. I have no idea why 'internal_suspense_cache_hostname.local' is not resolved. These are the errors, I have seen so far in the same log (ordered):
β [ERROR] workerd/jsg/util.c++:278: error: e = kj/async-io-unix.c++:1298: failed: DNS lookup failed.; params.host = internal_suspense_cache_hostname.local; params.service = ; gai_strerror(status) = Name or service not known
β [ERROR] Uncaught (async) Error: internal error
β [ERROR] 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.
β [ERROR] Uncaught (in response) Error: The script will never generate a response.
β [ERROR] workerd/server/server.c++:3346: error: Uncaught exception: workerd/io/io-context.c++:1167: failed: remote.jsg.Error: The script will never generate a response.
I wish I could debug this.
I am seeing similar (error) error code: 1016
in my logs. I am fetching a file from r2 with a regular fetch via a cloudflare configured custom domain. All of the DNS settings were setup with cloudflare. It's frustrating how little log information is available.
Is there anything new on this? I have the same error. And there is just the internal error without any other meaningful log. wrangler dev --remote
β [ERROR] workerd/server/server.c++:3314: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error
stack: /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa3f63
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa23ad
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a9b9f4
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6fab0
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f83180
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f83180
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f83180
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@27faf50
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2805070
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a8b98b
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6313f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a8ae90
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@27faf50
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2f18c10
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2f19044
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6313f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2da93e0
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@323e039
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2805070
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a8b98b
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6313f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a8ae90
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@27faf50
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2f18c10
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2f19044
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6313f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f634c3
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2daa67f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6313f
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6460c
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f64de1
/home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4f6b014
After removing .next , .vercel and .wrangler directories I was able to stop seeing this error. I had been without running the preview command for a while, so not sure what exactly caused the issue.
Is there anything new on this? I have the same error. And there is just the internal error without any other meaningful log.
wrangler dev --remote
β [ERROR] workerd/server/server.c++:3314: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error stack: /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa3f63 /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa23ad /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a9b9f4
I just had this issue and managed to resolve it by using 127.0.0.1 instead of localhost for wrangler. For example by adding the following to wrangler.toml
[dev]
ip = "127.0.0.1"
Seems to be some problem with DNS resolution.. which may explain why it worked for me on one machine and not the other..
Is there anything new on this? I have the same error. And there is just the internal error without any other meaningful log.
wrangler dev --remote
β [ERROR] workerd/server/server.c++:3314: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error stack: /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa3f63 /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4fa23ad /home/vladan/dev/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3a9b9f4
I just had this issue and managed to resolve it by using 127.0.0.1 instead of localhost for wrangler. For example by adding the following to wrangler.toml
[dev] ip = "127.0.0.1"
Seems to be some problem with DNS resolution.. which may explain why it worked for me on one machine and not the other..
Setting:
[dev]
ip = "127.0.0.1"
In wrangler.toml also worked for me! Thanks!
I also just ecountered seemingly the same error:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not han
β dled with .catch(). The promise rejected with the reason:
β TypeError: Cannot read properties of undefined (reading 'toLowerCase')
β at /home/kedom/Public/Git/viatro/node_modules/wrangler/wrangler-dist/cli.js:132318:25
β at PassThrough.handler (/home/kedom/Public/Git/viatro/node_modules/wrangler/wrangler-dist/cli.js:132284:7)
β at PassThrough.emit (node:events:519:28)
β at PassThrough.emit (node:domain:488:12)
β at emitKeys (node:internal/readline/utils:373:14)
β at emitKeys.next (<anonymous>)
β at PassThrough.onData (node:internal/readline/emitKeypressEvents:64:36)
β β [ERROR] workerd/server/server.c++:3613: error: Uncaught exception: kj/async-io-unix.c++:568: disconnected: ::read(fd, buffer, maxByte
β s): Connection reset by peer
β
β stack: /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@5ae39c2
β /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@5ae1925
β /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@414b0ee
β /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41677e0
β /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@41ac5ca
β /home/kedom/Public/Git/viatro/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4171f90
Which Cloudflare product(s) does this pertain to?
Wrangler or miniflare
What version(s) of the tool(s) are you using?
3.5.0
What version of Node are you using?
18.16.1
What operating system are you using?
Linux (Ubuntu 20.04)
Describe the Bug
In one of my handlers, after executing a select query with batch, I get the following exception:
workerd/server/server.c++:2533: error: Uncaught exception: kj/async-io-unix.c++:186: disconnected: remote.worker_do_not_log; Request failed due to internal error
It seems it's in some kind of destructor or finalizer or other thread / cleanup task, since execution continues after the query, because I can see console.log output from subsequent code. However, the server crashes before it is able to return the response (client doesn't get a response back.) I can reproduce this every single run. Commenting out that query makes the exception go away. No other queries are executed in that request.
I deleted, the database, deleted .wrangler dir, and recreated the database. Same issue.
I created a new hello world project (following the getting started guide), containing only the "hello world" response and got the same exception on the first run only. Subsequent runs were fine. That's interesting, what state could wrangler be keeping that's the same for the machine, but not in the directory/project/code which all changed?
I switched back to the original project, reproduced the exception again. Went back to the new hello world, but it's fine now, I can't reproduce the exception in the hello world project again. Odd.
I then added the same database, same migrations, same query to the hello world project. No issues. I don't know how to make a minimal repro for it.
edit: I tried again this morning, after rebooting overnight. The error is gone, the reboot fixed it. It wasn't the query at fault here, probably not d1 (directly anyway). There's something else going on, and somehow a reboot fixed it.
It's tough to debug a problem with so little to go on. Is there anything I can do to get more info? Is there a way to build a debug version of wrangler or miniflare? Enable logging?
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response