wrangler-legacy icon indicating copy to clipboard operation
wrangler-legacy copied to clipboard

[dev] Time out 522 errors

Open PierBover opened this issue 3 years ago • 9 comments

🐛 Bug report

wrangler dev only return 522 errors. Seems something is down on Cloudflare's network?

I've updated Wrangler to the latest version 1.19.3.

I've authenticated with wrangler login again.

I've created a new wrangler.toml using wrangler init.

name = "player-html"
type = "webpack"
route = '.../*'
zone_id = '...'
usage_model = ''
compatibility_flags = []
workers_dev = false
compatibility_date = "2021-09-17"

(I've obfuscated the domain path and zone id)

My worker is running fine when publishing or previewing.

Describe the bug

When starting wrangler dev and trying to access http://127.0.0.1:8787 only 522 errors are returned.

Reproduce the bug

Start wrangler dev try to access any url at http://127.0.0.1:8787.

PierBover avatar Sep 17 '21 16:09 PierBover

Not sure what's going on...

I've created a new worker with wrangler generate and it works fine.

It sucks I will need to do wrangler generate for all current worker projects and migrate the JS files though.

PierBover avatar Sep 17 '21 21:09 PierBover

This seems like something we should fix. Opening this back up and assigning this to myself, and I'ld be happy to have a look (either later this weekend, or early next week). Could you possibly share the a script that fails, or even a sample project? If not, I'll try with a simple script myself and see if I can reproduce this.

threepointone avatar Sep 24 '21 17:09 threepointone

The script really didn't matter as the request never reached it.

For some reason now it's working. Without changing anything on my part nor updating wrangler.

PierBover avatar Sep 24 '21 20:09 PierBover

Well that's frustrating, and I'm sorry you had to face that experience. I'll close the issue, but I'll keep an eye open for this, and you should feel free to either drop a line here, or file a fresh issue and cc me if it happens to you again. Sorry again!

threepointone avatar Sep 24 '21 20:09 threepointone

I've run into this issue today with wrangler dev but I haven't yet made much progress understanding what's going on.

I've had it work, before, but not since updating to Mac OS Big Sur (I can't think of anything else I've changed recently).

paulgibbs avatar Oct 06 '21 09:10 paulgibbs

Sigh, ok opening this back up. Sorry this happened to you :(

threepointone avatar Oct 06 '21 14:10 threepointone

I've had slightly different behaviour today! After waiting for my web browser request to time out (I'm doing this with a test project that just servers up a hello world from any GET request), I get Cloudflare's HTTP 522 error page. It's showing a timeout from The Cloud to the (production) server (not my local machine).

If it helps, Ray ID: 69aefad3b807071a • 2021-10-08 11:20:25 UTC

paulgibbs avatar Oct 08 '21 11:10 paulgibbs

I have just found I had the name in my wrangler.toml changed recently, and I had forgotten to update the route in the Cloudflare control panel to go to the new (renamed) Worker. This fixed wrangler log and it took me longer to realise this than I should have, but wrangler dev continues to be broken in the same way as described above.

It's not blocking me as miniflare is working out very well and I appreciate the work Cloudflare put into Workers - they are absolutely fantastic:)

paulgibbs avatar Oct 08 '21 12:10 paulgibbs

Thanks for the info, we should do a better job of surfacing that name/route mismatch.

threepointone avatar Oct 20 '21 12:10 threepointone

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.

jspspike avatar Feb 27 '23 16:02 jspspike