Skip to content

Wrangler login failed without specific reason #9417

Closed
@baibinghere

Description

@baibinghere

What versions & operating system are you using?

Wrangler 4.16.1

Please provide a link to a minimal reproduction

No response

Describe the Bug

PS C:\Users\BingBai\Desktop\Personal\code\workers-getting-started>  wrangler login

 ⛅️ wrangler 4.16.1
-------------------

Attempting to login via OAuth...
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20offline_access&state=ySSaIxJEI3WZRGWTCEjhudYt3WRCTqk-&code_challenge=QYPGskcFIi7J5AZ1kR7m9zvljxy1JIMVI4RbQzHbdcQ&code_challenge_method=S256
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 (C:\Users\BingBai\Desktop\Personal\code\workers-getting-started\node_modules\wrangler\wrangler-dist\cli.js:19156:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async fetchAuthToken (C:\Users\BingBai\Desktop\Personal\code\workers-getting-started\node_modules\wrangler\wrangler-dist\cli.js:42723:10)
    at async exchangeAuthCodeForAccessToken (C:\Users\BingBai\Desktop\Personal\code\workers-getting-started\node_modules\wrangler\wrangler-dist\cli.js:42351:20)
    at async Server.<anonymous> (C:\Users\BingBai\Desktop\Personal\code\workers-getting-started\node_modules\wrangler\wrangler-dist\cli.js:42509:30)

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions