wrangler-legacy
wrangler-legacy copied to clipboard
wrangler dev Error: HTTP status client error (404 Not Found) for url
🐛 Bug Report
I try to run wrangler dev but I get this error "Error: HTTP status client error (404 Not Found) for url"
In my wrangler.toml I have route set (if that help)
Environment
- operating system: MacOS Catalina
- output of
node -v
: 13.14.0 - output of
wrangler -V
: 1.11.0 - contents of
wrangler.toml
name = "proxy" type = "webpack" account_id = "" route = "" zone_id = "" webpack_config = "webpack.config.js"
Steps to reproduce
What did you expect to see?
What did you see instead?
If you don't provide a route, workers_dev = true
must be in your wrangler.toml
@nataliescottdavidson I provided a route (I just removed it now, when I posted the config file). The worker is working as expected in production. I just can't use the dev command because I get that error.
Ok, if you have a route set you must have that route on Cloudflare and get the zone_id from your dash.cloudflare.com.
@nataliescottdavidson I have the config completed (I just removed some details from it when I posted it here). I also have the route on cloudflare. But when I run the dev command I get Error: HTTP status client error (404 Not Found) for url
What's your wrangler publish
output?
Guys, I also have the same problem.
The whole process to clone Github, create and adjust the project works perfectly, the problem occurs only when you define a route and publish the version in CloudFlare, it simply does not work accessing the route.
When trying to access the link inserted in the route, it simply falls directly on page 404. I can only access the project through the temporary link (dev).
Any solution for that?
- operating system: Windows 10 build 2004
- output of wrangler -V: 1.11.0
wrangler.toml : name = "guias" type = "webpack" account_id = "d740...." workers_dev = false route = "www.viaagenciadigital.com.br/teste1" zone_id = "3a2c..."
[site] bucket = "./public"
NOTE: I activated the debug, in the script, and is presenting this message: could not find teste1 / index.html in your content namespace
DEV URL: https://guias.viadigital.workers.dev/
In the default worker sites you get a worker with a try...catch
block in the handleEvent(). If you changed something in there, it's possible that your try
has an error and that is why you're getting those 404's.
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.
I have the same error: Error: HTTP status client error (404 Not Found) for url (https://DOMAIN.com/cdn-cgi/workers/preview/?s0=LONG_STRING)
My wrangler.toml:
name = "workername" type = "webpack" account_id = "ACCOUNT_ID" workers_dev = false route = "https://SUBDOMAIN.DOMAIN.com/*" zone_id = "ZONE_ID"
kv-namespaces = [ { binding = "KV_STORE_NAME", id = "KV_ID", preview_id = "KV_ID" } ]
[site] bucket = "./public"
Note that my error's URL doesn't have the subdomain as defined in the route.
macOS 11.6 Wrangler 1.19.3
wrangler preview
loads a browser preview as expected. Just wrangler dev
seems to be broken in this way. wrangler publish
works fine.
Issue still persist and wrangler preview
can't be used with modules
╰─ wrangler preview
Error: wrangler preview does not support previewing modules scripts. Please use wrangler dev instead.
I can confirm that wrangler dev
is indeed broken somehow. In my machine, it's broken too.
Honestly, wrangler2 is no better.
👋 Thanks for reporting this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this issue.
New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.
@medmin, is there a specific issue you're seeing with wrangler v2? Would you be able to open a GitHub issue on the workers-sdk
repo?