workers-sdk
workers-sdk copied to clipboard
🐛 BUG: wrangler tail does not work of worker is deployed with Custom domain routing
What version of Wrangler are you using?
2.0.22
What operating system are you using?
Mac
Describe the Bug
Wrangler tail does not work if it is deployed to custom domain route. I have console.log('message') statement in my workers code. Upon request it does not get printed to wrangler tail console. Neither it gets loged in Workers UI ) Workers -> Services-> Worker-> Logs-> real-time Logs).
My wrangler.toml cofig (scenarion 1):
routes = [{pattern="subdomain.domain.com", custom_domain=true}]
If only I change my wrangler.toml to (scenario 2):
routes = [{pattern = "domain.com/path/", zone_id = "<zoneid>"}]
# routes = [{pattern="subdomain.domain.com", custom_domain=true}]
Things go back to normal.
If I activate buth standard route and custom domain (scenario 3):
routes = [
{pattern="subdomain.domain.com", custom_domain=true},
{pattern = "domain.com/path/", zone_id = "<zoneid>"}
]
ant hit the custom domain, logs are streamed in UI and terminal correctly. Meaning only custom domain is used for routing (scenario 1) logging gets malfunctioned.
It obvious that it's not a wrangler bug, but a platform bug. But maybe you can escalate it from here.
Linked this issue to internal ticket, thank you for the additional context! 😄
Hm - we're having trouble reproducing this. Are you still seeing this / is there any more info to reproduce?
I can confirm I now see console.log() messages loged with routes = [{pattern="subdomain.domain.com", custom_domain=true}] routing configuration. Let's consider this resolved! :)
Thanks @toinbis.
I'm also seeing this issue. The logs also don't work in the Cloudflare console (I can see that a JS error is thrown on dash.cloudflare.com when I try to tail logs for my worker with a custom domain).
I'm seeing the same thing, except that the error in the console is slightly different:

@JacobMGEvans @jspspike can we re-open this issue to escalate it to the cloudflare team? we're also having problems with not being able to tail logs here (on custom domains), and looks like there's others in the recent comments as well. Thank you! 🙏
@JacobMGEvans @jspspike can we re-open this issue to escalate it to the Cloudflare team? we're also having problems with not being able to tail logs here (on custom domains), and looks like there are others in the recent comments as well. Thank you! 🙏
@kevjin
-
What Cloudflare team do you mean? (both of us are on the CF Workers DevProd team)
-
Are you on the latest version of Wrangler?
-
Can you provide a minimal reproduction (Wrangler configuration mostly)