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: wrangler login is not working #6196

Open
swleungX opened this issue Jul 4, 2024 · 1 comment
Open

🐛 BUG: wrangler login is not working #6196

swleungX opened this issue Jul 4, 2024 · 1 comment
Labels
bug Something that isn't working needs reproduction Needs reproduction from OP

Comments

@swleungX
Copy link

swleungX commented Jul 4, 2024

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

wrangler 3.63.0

What version of Node are you using?

Node.js v22.0.0

What operating system and version are you using?

Windows 10

Describe the Bug

Observed behavior

  • I am using wrangler behind proxy
  • I have created a ".env" file with HTTPS_PROXY setting

Run npx wrangler login

  • it prompts browser page and let me click "Allow"
  • Redirect to localhost:8976 and failed to connect

D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:29765
throw a;
^

TypeError: fetch failed
at fetch (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:17227:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetchAuthToken (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:155281:10)
at async exchangeAuthCodeForAccessToken (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:154934:20)
at async Server. (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:155097:30) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6049:29)
at D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6005:51
at Immediate._onImmediate (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6035:37)
at process.processImmediate (node:internal/timers:478:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}

Node.js v22.0.0

Tried npx wrangler dev, localhost:8787 can be accessed with "Hello World!"

⛅️ wrangler 3.63.0

⎔ Starting local server...
[wrangler:wrn] Unable to fetch the Request.cf object! Falling back to a default placeholder...
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6049:29)
at D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6005:51
at Immediate._onImmediate (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6035:37)
at process.processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
[wrangler-UserWorker:wrn] Unable to fetch the Request.cf object! Falling back to a default placeholder...
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6049:29)
at D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6005:51
at Immediate._onImmediate (D:\Testfield\cloudflareTest\my-first-app\node_modules\wrangler\wrangler-dist\cli.js:6035:37)
at process.processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
[wrangler:inf] Ready on http://127.0.0.1:8787
[wrangler:inf] GET / 200 OK (8ms)
[wrangler:inf] GET /favicon.ico 200 OK (3ms)

Expected behavior

Don't know, never success before.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@swleungX swleungX added the bug Something that isn't working label Jul 4, 2024
@penalosa
Copy link
Contributor

penalosa commented Jul 5, 2024

I think this might be a duplicate of #5162? Wrangler is generally unable to function if you're unable to access the Cloudflare API.

Could you provide a minimal reproduction, including the proxy variables you're using?

@penalosa penalosa added the needs reproduction Needs reproduction from OP label Jul 5, 2024
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 needs reproduction Needs reproduction from OP
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants