You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a minimal delay (or some work) is introduced, the server throws an error.
The log is the following:
✘ [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.
Expected behavior
I would expect the work to finish and to respond to the request.
Steps to reproduce
A minimal working subset of your worker code
use worker::{event,Env,Request,Response,Result};#[event(fetch)]pubasyncfnmain(_req:Request,_env:Env,_ctx: worker::Context) -> Result<Response>{
std::thread::sleep(Duration::from_micros(200));// Shorter delays/actual work also triggers this behaviorreturnResponse::from_html("<html></html>");}
I'm not sure exactly how the runtime detects that futures arent making progress, but I suspect the blocking sleep here is the issue. Can you use an async sleep such as tokio::time::sleep?
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
3.34.2 [Wrangler], 0.0.21 [workers-rs], 1.78.0-nightly [Rust]
What version of Node are you using?
21.7.1
What operating system and version are you using?
Linux (Fedora) (arm64)
Describe the Bug
Observed behavior
If a minimal delay (or some work) is introduced, the server throws an error.
The log is the following:
Expected behavior
I would expect the work to finish and to respond to the request.
Steps to reproduce
wrangler.toml
I also tried using wrangler beta, but to avail.
Nothing
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
This is a log of starting the local server, opening the page, and then closing the server:
The text was updated successfully, but these errors were encountered: