cloudflare / cloudflare/workerd
🐛 Crash when trying to use connor4312/cockatiel
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
As described in [this issue](https://github.com/connor4312/cockatiel/issues/105), errors with the following error whenever trying to use the `retry` function from that library.
```
✘ [ERROR] service core:user:worker: Uncaught Error: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
at null. (core:user:worker:433:28)
at null. (core:user:worker:684:3)
✘ [ERROR] The Workers runtime failed to start. There is likely additional logging output above.
```
AFAIK the library does no unallowed operations, so this seems like a failure in detecting those.
Repro code:
```js
// repro.js
import { retry } from 'cockatiel'
retry()
```
Run with `npx wrangler dev repro.js`
Contributor guide
Assessment
This issue has not been assessed yet.