theANDYM
theANDYM7d ago

Issues with a Rust panic running workers and attempting to use `otel`

I'm having issues in an app that heavily relies on web workers; I am greeted by an almost instant issue:
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 2.3.1
Args: ["/Users/andy/.deno/bin/deno", "run", "--allow-env", "--allow-ffi", "--allow-net", "--allow-read", "--allow-run", "--allow-sys=osRelease", "--allow-write", "--unstable-otel", "--cached-only", "--watch", "./main.ts"]

View stack trace at:
https://panic.deno.com/v2.3.1/aarch64-apple-darwin/gqvgKg-ykqB4stxqB4jtxqBw_5xqBgok5Lw4phPozigQg5pkgBg8okgB

thread 'worker-1' panicked at /Users/admin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deno_unsync-0.4.2/src/tokio/task.rs:62:13:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 2.3.1
Args: ["/Users/andy/.deno/bin/deno", "run", "--allow-env", "--allow-ffi", "--allow-net", "--allow-read", "--allow-run", "--allow-sys=osRelease", "--allow-write", "--unstable-otel", "--cached-only", "--watch", "./main.ts"]

View stack trace at:
https://panic.deno.com/v2.3.1/aarch64-apple-darwin/gqvgKg-ykqB4stxqB4jtxqBw_5xqBgok5Lw4phPozigQg5pkgBg8okgB

thread 'worker-1' panicked at /Users/admin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deno_unsync-0.4.2/src/tokio/task.rs:62:13:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Are there any known workarounds? I've been searching for a solution but haven't been able to locate one.
2 Replies
marvinh.
marvinh.7d ago
Can you file an issue for that here https://github.com/denoland/deno/issues ? The discord is more of a users helping users kind of thing and I doubt JS users can help you much with Rust panics. Deno should never panic so this is a valid bug. The CLI team hangs out on the issue tracker, that's where stuff like this is posted so that it can be resolved
theANDYM
theANDYMOP7d ago
ok, will do @marvinh.

Did you find this page helpful?