cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 593 forks source link

🐛 BUG: #6171

Closed dancaldera closed 3 days ago

dancaldera commented 5 days ago

Which Cloudflare product(s) does this pertain to?

Wrangler core

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

3.62.0

What version of Node are you using?

20.12.2

What operating system and version are you using?

Mac Sonoma Versión 14.5 (23F79)

Describe the Bug

Observed behavior

Please describe.

I tryed to login using wrangler login global to auth or using command npm run deploy that gives login automatically, but gives error while authorizing on browser

Expected behavior

Please describe. Gives login properly, without the error.

Steps to reproduce

Please provide the following:

A git repo we can clone and run a test suite on, or which has a README with step-by-step instructions, is even better. In this case, please use the field below to provide a link to the minimal repro.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

wrangler login

⛅️ wrangler 3.62.0

Attempting to login via OAuth... Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=xxxxxxxxx-84e4-41aa-b438-e81xxxxxxxxx&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%20constellation%3Awrite%20ai%3Awrite%20queues%3Awrite%20offline_access&state=Y7z2zQrw~DfQyxxxxxxv8hv1_yzdkoNoE4&code_challenge=VI_wyVxmiSGChxxxxxxxxAuzfuZEIs6doty_o&code_challenge_method=S256 /Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:29747 throw a; ^

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse () at parseJSONFromBytes (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:5287:19) at successSteps (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:5258:27) at fullyReadBody (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:3755:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async specConsumeBody (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:5267:7) at async exchangeAuthCodeForAccessToken (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:154586:31) at async Server. (/Users/xx/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/wrangler/wrangler-dist/cli.js:154747:30)

Node.js v20.12.2

petebacondarwin commented 3 days ago

Duplicate of https://github.com/cloudflare/workers-sdk/issues/3672