Closed jevakallio closed 10 months ago
Thanks for the report, we've known about this for some time https://github.com/cloudflare/workers-chat-demo/issues/34. @elithrar do you think we should add a note to the docs for now?
Closing as this is a known issue in upstream Durable Objects that is not actionable by the workers-sdk team and there is an update to the docs in flight.
Just following up here, this has been fixed for some time.
Which Cloudflare product(s) does this pertain to?
Workers Runtime
What version(s) of the tool(s) are you using?
3.7.0 [Wrangler] (observed in Wrangler 2)
What version of Node are you using?
20.3.1
What operating system are you using?
Mac
Describe the Bug
When using
wrangler tail
, we are not able to see console.log messages fromwebSocketMessage
,webSocketClose
andwebSocketError
callbacks.When NOT opting the WebSocket connection into hibernation (calling
socket.accept()
), we see the following tails (code below):When opting into hibernation (calling
state.acceptWebSocket(socket)
), we see the following tails:The
webSocketMessage
,webSocketClose
andwebSocketError
messages are not observed in the logs, but we've verified the callbacks do run correctly.Here's the code used to verify the behaviour. Connect with
?hibernate=true
to trigger the issue, and without to demonstrate that tailing works without hibernating: https://github.com/jevakallio/wrangler-raw/blob/tails-repro/src/index.mjsPlease provide a link to a minimal reproduction
https://github.com/jevakallio/wrangler-raw/tree/tails-repro
Please provide any relevant error logs
No response