workerd icon indicating copy to clipboard operation
workerd copied to clipboard

🐛 Bug Report — Logging broken in hibernatable WebSocket event handlers

Open codefrau opened this issue 9 months ago • 9 comments

We have one DurableObject that uses the hibernation API. It implements webSocketMessage() in which we use console.log() to log stuff.

On miniflare (wrangler dev) that works perfectly fine, the logs appear in the terminal, as they should.

When deployed to Cloudflare though, nothing is logged from within the webSocketMessage() handler. The handler method with the log statement is executed and works fine.

This happens both with wrangler tail, as well as our log push job to an R2 bucket. All other log calls work fine.

I added a workaround where for that DO we additionally send every log message to another DO and log it there. That works.

codefrau avatar May 05 '24 02:05 codefrau