Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: npx wrangler login does not work with VPNs (Tailscale and such). #7651

Open
Peru-S opened this issue Dec 31, 2024 · 1 comment
Open
Labels
bug Something that isn't working

Comments

@Peru-S
Copy link

Peru-S commented Dec 31, 2024

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions are you using?

3.95.0

What operating system and version are you using?

WSL/Windows

Please provide a link to a minimal reproduction

No response

Describe the Bug

Please see the error below. It's not just VPN related - for many reasons localhost ping back may not be possible - using that as the sole way to login seems really bad/broken.

Also, the localhost curl thing doesn't work because wrangler errors out (see below). Please help avoid complicated workflow like having to use another machine or use chrome dev tools to track the localhost url to curl.

Please just allow me to paste a code (you already have --browser=false, could you just avoid the localhost reflexoloy?).

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: fetch failed
    at fetch (/mnt/c/sites/cf/node_modules/wrangler/wrangler-dist/cli.js:17232:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchAuthToken (/mnt/c/sites/cf/node_modules/wrangler/wrangler-dist/cli.js:119915:10)
    at async exchangeAuthCodeForAccessToken (/mnt/c/sites/cf/node_modules/wrangler/wrangler-dist/cli.js:119540:20)
    at async Server.<anonymous> (/mnt/c/sites/cf/node_modules/wrangler/wrangler-dist/cli.js:119700:30)

✘ [ERROR] Timed out waiting for authorization code, please try again.

Logs:

 ⛅️ wrangler 3.95.0
-------------------

--
--- 2024-12-30T15:09:02.590Z log
Attempting to login via OAuth...
---

--- 2024-12-30T15:09:02.593Z log
Visit this link to authenticate: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=BLAH&code_challenge_method=S256
---

--- 2024-12-30T15:09:55.899Z debug
Checking if domain has Access enabled: dash.cloudflare.com
---

--- 2024-12-30T15:09:55.900Z debug
Access switch not cached for: dash.cloudflare.com
---

Please provide any relevant error logs

No response

@Peru-S Peru-S added the bug Something that isn't working label Dec 31, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Dec 31, 2024
@Peru-S
Copy link
Author

Peru-S commented Dec 31, 2024

Note this repros on WSL/Windows as well as Mac (as long as there is a VPN on that machine or poor connectivity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant