cloudflare / cloudflare/workers-rs
[BUG] Error not causing a stack trace, code appears to hang instead
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What version of `workers-rs` are you using?
0.5.0
### What version of `wrangler` are you using?
3.108.1
### Describe the bug
A legitimate error in my code shows no error and does not appear to run the statement after the error line (hanging?). It seems like a reasonable assumption that something in the worker environment is amiss, but it is hard to assert this without more information. I am of course running this locally at present in miniflare.
I have isolated the code so that I have 2 git repos:
* The [original repo](https://github.com/holderl5/service-monitor) hangs when running the service
* The [fail reproduction](https://github.com/holderl5/fail-repro.git) repo copies the code from the first repo so that we can see the error works as expected at least in some instances
I will keep working at this and post anything else I find.
### Steps To Reproduce
For the FAIL REPRODUCTION:
1. pull [the repo](https://github.com/holderl5/fail-repro.git)
2. run npx wrangler dev
3. in another terminal, run wget localhost:8787 to hit the cloudflare fetch
4. an ERROR will show in the terminal, see fail-repro-logs.txt
For the actual hang, do the following:
1. pull [service-monitor](https://github.com/holderl5/service-monitor)
2. run npx wrangler dev
3. in another terminal, run wget localhost:8787 to hit the cloudflare fetch
4. The same logs as from above will print, but no error will be shown. I included just the relevant portion in hang-relevant-logs.txt
5. Make sure you are on commit 0bf99aa95ec68c5edee787e4d3f24fb54fbc9470 for this test
[hang-relevant-logs.txt](https://github.com/user-attachments/files/18787577/hang-relevant-logs.txt)
[fail-repro-logs.txt](https://github.com/user-attachments/files/18787335/fail-repro-logs.txt)
Contributor guide
Assessment
This issue has not been assessed yet.