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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: #3712

Closed
prjwl16 opened this issue Aug 7, 2023 · 2 comments
Closed

馃悰 BUG: #3712

prjwl16 opened this issue Aug 7, 2023 · 2 comments
Labels
auth Relating to auth bug Something that isn't working

Comments

@prjwl16
Copy link

prjwl16 commented Aug 7, 2023

Which Cloudflare product(s) does this pertain to?

Workers for Platforms, Workers Runtime, Wrangler core

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

3.1.1 [Wrangler]

What version of Node are you using?

18.17.0

What operating system are you using?

Linux

Describe the Bug

Title: JSON Parse Error when Using cURL/Wget for Wrangler Login Callback URL on Mac and Remote Linux

Description:

I am using a Mac as my local machine and a Linux Ubuntu as my remote machine. I am trying to log in to Wrangler, a tool for managing Cloudflare Workers, using the command npx wrangler login. This command generates a URL for authentication.

Steps I followed:

  1. I executed npx wrangler login on my local Mac machine, which generated an authentication URL.
  2. I copied the URL and pasted it into my browser on the Mac machine. The browser redirected me to a callback URL starting with localhost:8976.

However, since I need to log in from my remote Linux machine, I followed the documentation, which suggested copying the callback URL and opening a new session on the remote machine using cURL or any equivalent request library.

On the remote Linux machine, I attempted to use cURL and wget to log in. However, I encountered a JSON parse error when trying to use these commands to access the callback URL.

Steps to Reproduce:

  1. Execute npx wrangler login on the local Mac machine.
  2. Copy the generated authentication URL and paste it into the browser on the Mac machine.
  3. Note the callback URL, which starts with localhost:8976.
  4. Open a new session on the remote Linux machine.
  5. Attempt to access the callback URL using cURL or wget.

Expected Behavior:

The cURL or wget request should be successful, and the authentication process should be completed without any JSON parse errors.

Actual Behavior:

When using cURL or wget to access the callback URL on the remote Linux machine, a JSON parse error is encountered.

Error Message:

Please find the attached screenshot of the JSON parse error received while using cURL or wget.

Environment:

  • Local Machine: Mac
  • Remote Machine: Linux Ubuntu

Additional Notes:

I have checked the Cloudflare Workers documentation and community forums but haven't found a solution for this issue. I believe this may be a bug or misconfiguration that requires attention from the developers.

Thank you for looking into this issue and providing a resolution to this problem. If any additional information is needed, please let me know.

npx Wrangler login

Screenshot 2023-08-08 at 00 08 46

cURL Response:

Screenshot 2023-08-08 at 00 08 58

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@prjwl16 prjwl16 added the bug Something that isn't working label Aug 7, 2023
@smartworkEC
Copy link

It occurs the same in my Windows development virtual machines.

@admah admah added the auth Relating to auth label Sep 8, 2023
@petebacondarwin
Copy link
Contributor

Basically a duplicate of #2874.
We recommend using Cloudflare Access Tokens for remote machine development.

@petebacondarwin petebacondarwin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Relating to auth bug Something that isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants