cloudflare / cloudflare/workerd

🐛 Bug Report — Logging broken in hibernatable WebSocket event handlers

Open
#2,089 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.