-
Notifications
You must be signed in to change notification settings - Fork 337
wrangler login just get stuck Waiting for API token...
#1703
Comments
This happens to me too. Can use |
I am experiencing the same issue. I wonder if it has to do with the fact that I have two cloudflare accounts. When I do |
I have the same issue, I have one cloudflare account. I'm using Ubuntu with Firefox as default browser and containers extension. |
I was able to get the login and auth callback from the browser to work just now. Not sure if this works for anyone else, but I ran the command |
Same issue here too. |
I just encountered the same issue, weirdly enough @nolandubeau's workaround worked for me too (thanks ❤️ ) |
It works! thanks |
I ran into the same issue: Thanks @nolandubeau , your workaround fixed the issue! |
Same issue on macos |
Sometimes if you already logged in and tried to log in again, you'll get stuck. In any case, that was what happen to me with I got stuck with the same message To find out whether you already logged in, do |
Same issue for freshly installed wrangler (using Cargo). Version 1.13.0. I'm using Archlinux (Kernel version 5.10.11) |
Same issue. I fixed it by fill API token manually.
|
Hi @xortive , I reach this page, but after clicking the authorize button, the cli is still stuck. name = "form-data-app"
type = "webpack"
account_id = "c4axxxxxxxxxx710"
workers_dev = false
route = "https://app.form-data.com/*"
zone_id = "f6bxxxxxxxxxxxxxxxxe15"
[site]
bucket = "./dist/pwa"
entry-point = "workers-site" Happens on Chrome 88 on Mac 10.15.5, but Also happened on previous versions of both mac and chrome. |
After clicking it got stuck, I was able to fix it by manually setting it a long time ago. On macos with homebrew. |
Have same issue, After calling Calling But when runing Note: temporary downgraded to 10.0.3 |
Managed to login , by whoami gives correct output then: running wrangler init: edited wrangler.toml with account id. └─$ wrangler dev 130 ⨯ However I managed to create a test worker with wrangler generate. |
Extra info - may be browser dependent? I attempted three times in Safari, both times I got stuck on "waiting for API token..." switched my default browser to Firefox, tried again, and it worked fine. May be due to other external factors and just so happened that it worked 1 / 4 times, but might be an avenue worth investigating. ran |
Was trying this from VSCode Integrated Terminal to Chrome and it was stuck for me. I tried it in OSX Terminal to Chrome and then it worked as expected |
same issue here |
Thanks, this worked |
@timhaak, re:
Did the CLI show any permission error indicating that it couldn't write to disk or create any files? And to confirm, you created that directory, and then re-executed |
@Yrlish - thank you!
😄 haha that seems to be the way these things work! So both devices are now able to use |
haha yes indeed, very annoying 😛 Yes, both environments logged in using |
@nilslice I am also facing this issue. Please find the requested details below.
First time.
Even the directory was not created. I tried creating the directory as @timhaak and retried
|
I still have this issue using wrangler 1.17.0 on a Mac. Nothing gets written to ~/.wrangler/config/. Terminal just stuck at "Waiting for API token..." forever while website says "Wrangler is now authorized with a new API Token. You can now close this page." |
I'm seeing this too. Tested with yarn, npm and cargo wrangler installs, and Safari, Chromium, and Firefox as the default browser on two different macs. MacOS Big Sur 11.4 (20F71). Wrangler 1.17.0. This is my first time logging in. Edit: this workaround worked for me. |
I had the same issue using Firefox as default browser. I copied the link into Chrome and then was able to login. |
I've run mkdir -p ~/.wrangler/config/ but I got stuck at "Waiting for API token...". |
My problem was that I tried running |
@khromov - thanks for reporting. did you also experience wrangler getting stuck at "Waiting for API token...", or did you get different output? |
@nilslice Yes, it was stuck at "Waiting for API token...". I was running the command from a VSCode prompt using Windows 10 and Ubuntu on WSL2. The browser did not open automatically, I had to paste the URL manually. (The browser did not open automatically when installed via |
Same problem under Windows 10. The window opens and the token is generated, but the |
My problem was that there were too many API tokens (or maybe the name was conflicting?). As soon as I removed all of my API tokens that I wasn't using with the same name, it cleared up. |
Same issue here. using chrome on osx. @nolandubeau workaround fixed the issue for me as well! |
This is my first time attempting to login via the CLI.
Wrangler is not actually opening the link in any browser I have been able to find, but if I click the link presented in the terminal I end up getting to the Edit: I upgraded using |
I faced the same issue in my laptop running windows 10. I found a simple workaround for this issue. We can create custom tokens in the Cloudflare account with the settings same as the generated token. Enter this token manually using the |
I solved this issue removing the |
I had to delete the two existing tokens in the Cloudflare Dashboard, in order to fix this. |
Using the latest version of Wrangler 1.19.2 in Zorin OS(Ubuntu distro) and |
Another user facing this issue: wrangler login does not work. Tested with wrangler 2.0.14... Checking from the cloudflare dashboard, it looks like wrangler login does not generate an api token at all! |
my wrangler on Ubuntu hangs no matter if its login or publish. login gets a token (writes to .wrangler/config) but then hangs. same thing when I run publish, just hangs. No way to kill it. |
The docs for using curl in Using wrangler login on a remote machine didn't work for me, what did was opening port forwarding to the remote server which lets me follow their OAuth in my desktop browser and successfully redirect back to wrangler login running on my remote server: ssh -L 8976:0.0.0.0:8976 -N name@server |
I had this problem in my devcontainer where I could not forward port
|
Thanks for creating this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this PR. New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it or create a new PR in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post. |
🐛 Bug Report
I found this closed issue #1514 has a number of people reporting this same issue with the tool hanging, but looking at that original issue which was closed in October it looks like was for a different problem.
Environment
Ubuntu 20.04.1 LTS
rustc -V
:rustc 1.47.0 (18bf6b4f0 2020-10-07)
node -v
:v10.19.0
wrangler -V
:wrangler 1.12.3
wrangler.toml
(Simply created via
wrangler generate test
)Steps to reproduce
run
wrangler login
What did you expect to see?
After authorizing Cloudflare via the opened web browser, after the token is created, I expected
wrangler login
to continue.What did you see instead?
I do see the browser open (Firefox) and I'm able to authorize the creation of a new token which does happen successfully but the
wrangler login
tool remains stuck forever withWaiting for API token...
Since it was suggested in #1514 that it might make a difference to delete existing tokens first I also tried deleting all tokens but that didn't seem to make a difference for me.
The text was updated successfully, but these errors were encountered: