🐛 BUG: wrangler tail crashes when encountering a log from a Durable Object alarm invocation
See original GitHub issueWhat version of Wrangler
are you using?
2.0.22
What operating system are you using?
Linux (also happens on Mac)
Describe the Bug
Wrangler tail crashes if it gets sent a log from a DO alarm invocation. To repro:
- Deploy a DO that uses alarms, such as the example from https://blog.cloudflare.com/durable-objects-alarms/
- Start a wrangler tail session on that script
- Send a request to a DO that will cause an alarm to be run in the near future
- When the alarm finally runs, wrangler tail will print an error and exit.
The error I’ve been getting is:
/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:16907
throw ex;
^
TypeError: Cannot read properties of undefined (reading 'method')
at WebSocket3.prettyPrintLogs (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:127428:54)
at WebSocket3.emit (node:events:527:28)
at Receiver2.receiverOnMessage (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:85301:24)
at Receiver2.emit (node:events:527:28)
at Receiver2.dataMessage (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:84002:18)
at Receiver2.getData (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:83965:21)
at Receiver2.startLoop (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:83820:27)
at Receiver2._write (/home/arobinson/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:83777:14)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
@xortive has pointed out that https://github.com/cloudflare/wrangler2/blob/main/packages/wrangler/src/tail/printing.ts “seems to assume all non-scheduled events are http and pukes when trying to pull the request method out”
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
`wrangler tail` doesn't work when using Durable Objects
It seems that wrangler tail doesn't work in projects that also use Durable Objects. ... There is no error visible, just no logs...
Read more >Wrangler gives confusing error when trying to use workers ...
Bug report Describe the bug When first publishing a worker, and subsequently using wrangler dev or wrangler publish fails - something ...
Read more >Cloudflare Workers | Noise | Page 2
We configure Wrangler to upload these assets to Cloudflare and serve them from our ... Workers, Durable Objects, and Alarms are actually a...
Read more >Untitled
Sueldo animador deportivo, Mthombeni primary school, John sitton talksport, Kino millstatt programm, Insect repellent for dogs, Mxon tv schedule, ...
Read more >Untitled
Superbike crashes karak, Wciv live 5, Video beep effect, Baixar jogos de ps2 formato iso! Ducote designs! Clown furgone bianco torino, Connects auto...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It does not fail when using
--json
. Here’s an example:Perfect, works great!