denoland / denoland/deploy_feedback
[Bug][Regression]: BroadcastChannel TypeError: expected i32
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
I have a deploy site that uses `BroadcastChannel` and noticed that with a new deploy I get this error:
```
{"type":"error","code":"deploymentFailed","ctx":"The deployment failed: UNCAUGHT_EXCEPTION\n\nTypeError: expected i32\n at ext:deno_broadcast_channel/01_broadcast_channel.js:127:9\n at ext:deno_web/02_timers.js:127:42\n at eventLoopTick (ext:core/01_core.js:168:7)"}
```
### Steps to reproduce
Setup a deploy playground and use this as a test
```
const channel = new BroadcastChannel("test")
setInterval(() => {
channel.postMessage({
value: 42
})
}, 1000)
Deno.serve(async (req: Request) => {
return new Response('foo')
});
```
You'll get an error on deploy:
```
TypeError: expected i32
at ext:deno_broadcast_channel/01_broadcast_channel.js:127:9
at ext:deno_web/02_timers.js:127:42
at eventLoopTick (ext:core/01_core.js:168:7)
```
### Expected behavior
Not to error out when using the broadcast channel
### Environment
_No response_
### Possible solution
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the deploy playground with the BroadcastChannel and setInterval example, then start from ext:deno_broadcast_channel/01_broadcast_channel.js:127 and the timer call in ext:deno_web/02_timers.js:127. Trace why the callback produces an unexpected i32 value and verify that the example deploys without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100