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: Unable to login on vm (remote machine) #6869

Open
xcaeser opened this issue Oct 1, 2024 · 1 comment
Open

🐛 BUG: Unable to login on vm (remote machine) #6869

xcaeser opened this issue Oct 1, 2024 · 1 comment
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working

Comments

@xcaeser
Copy link

xcaeser commented Oct 1, 2024

Which Cloudflare product(s) does this pertain to?

Wrangler

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

3.78.12

What version of Node are you using?

22.8.0

What operating system and version are you using?

Linux Ubuntu, no gui

Describe the Bug

Login issues on a hetzner machine. Ray ID: 8cbbe31a290a9b5b

used wrangler login, npx wrangler login, pnpm wrangler login..
used inside VS Code terminal.

Also tried wrangler login --browser false. nothing.

wrangler 3.78.12
--------------------

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%20offline_access&state=j1mrQozsr4Az08Phs9Lht8yZXgqIA7mp&code_challenge=L5qKz2fuT3PBn6WPWRJ8G8pwrmfld4gPN0xlVhY7KaE&code_challenge_method=S256
▲ [WARNING] Failed to open


✘ [ERROR] The body of the response was HTML rather than JSON. Check the debug logs to see the full body of the response.


✘ [ERROR] It looks like you might have hit a bot challenge page. This may be transient but if not, please contact Cloudflare to find out what can be done. When you contact Cloudflare, please provide your Ray ID: 8cbbe31a290a9b5b-FRA


/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:29768
            throw a;
            ^

Error: Invalid JSON in response: status: 403 Forbidden
    at getJSONFromResponse (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159527:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async exchangeAuthCodeForAccessToken (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159145:31)
    at async Server.<anonymous> (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159313:30) {
  [cause]: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
      at JSON.parse (<anonymous>)
      at getJSONFromResponse (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159514:17)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async exchangeAuthCodeForAccessToken (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159145:31)
      at async Server.<anonymous> (/tmp/bunx-1000-wrangler@latest/node_modules/wrangler/wrangler-dist/cli.js:159313:30)
}

Node.js v22.8.0

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@xcaeser xcaeser added the bug Something that isn't working label Oct 1, 2024
@emily-shen
Copy link
Contributor

Hi, have you tried passing in your API token and account id with wrangler login? Something like
CLOUDFLARE_ACCOUNT_ID=your-account-id CLOUDFLARE_API_TOKEN =your-api-token pnpm wrangler login

There are instructions at the start of this page for how to get those bits of info.

@emily-shen emily-shen added the awaiting reporter response Needs clarification or followup from OP label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reporter response Needs clarification or followup from OP bug Something that isn't working
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants