denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug][Regression]: BroadcastChannel TypeError: expected i32 #676

Open rracariu opened 2 months ago

rracariu commented 2 months ago

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

rracariu commented 2 months ago

Interesting that I get this error on gcp-us-east4 but when the playground deploys to gcp-europe-west3 there is no error.