The Wayback Machine - https://web.archive.org/web/20230129113553/https://github.com/planetscale/cli/issues/449
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

pscale auth login only showing output after ctrl+c - not able to log in #449

Open
aleksanderbrymora opened this issue Jan 19, 2022 · 12 comments

Comments

@aleksanderbrymora
Copy link

When running pscale auth login on WSL2 - Ubuntu, there is no output, nor redirect to any new windows for authentication.
Output of the command only shows up after I cancel the execution of the command (by pressing ctrl + c) then it outputs (probably) the expected things:

pscale auth login
^CFailed to open a browser: signal: interrupt

Confirmation Code: YMHOSZCP

If something goes wrong, copy and paste this URL into your browser: https://auth.planetscale.com/oauth/device?user_code=YMHOSZCP

Error: error performing http request: Post "https://auth.planetscale.com/oauth/token": context canceled

When I do try the provided URL it does surprisingly redirect me to the confirmation page with the code, where I can accept it.
When I do, it does go through, but obviously this token is not active anymore so the auth in the pscale cli does not register me as logged in.

I did upgrade all the packages in ubuntu
I downloaded and installed the newest release of the cli
I gave it quite a long time to run

@iheanyi
Copy link
Member

iheanyi commented Jan 22, 2022

Thanks for reporting, we'll look into this!

@stephanlamoureux
Copy link

stephanlamoureux commented Feb 14, 2022

How did you get pscale CLI installed in WSL?

EDIT: ah never mind, I figured out to download the .deb file in windows from github, drag it over into my WSL directory and install using dpkg.

@aleksanderbrymora
Copy link
Author

Just to be thorough I used these instructions. I used wget to grab the latest release and followed the rest of the instructions.
And yeah, the issue is still present and behaves in the same way, as described above.
Let me know if I can be of any more help.

@ansh
Copy link

ansh commented May 14, 2022

Facing this as well.

@lelabo-m
Copy link

lelabo-m commented Aug 9, 2022

Me too, for more context :
I installed the CLI in WSL by downloading the deb from the releases with wget and using dpkg -i.

@lofsigma
Copy link

Hello, I tried this today and it worked no problem, unless there is any objection I think this can be closed.

@lelabo-m
Copy link

Tried it a week ago and it was still not working... Unless you changed anything, I doubted it's fixed.

@kettui
Copy link

kettui commented Oct 12, 2022

For me at least this seemed to be caused by xdg-open which would hang no matter what I tried to do with it. Figured I'd reinstall it to see if anything would change, but simply leaving xdg-utils uninstalled fixed the issue for me (I have no other use for it).

@callum-gander
Copy link

Still encountering this as well, any news on a fix?

@jihoon416
Copy link

It might be a different problem, but when I used on WSL I could only make it work when I used pscale with sudo. Without sudo, it was hanging for quite long and then showed that it was not able to write access tokens to the filesystem.

@RioChndr
Copy link

RioChndr commented Jan 3, 2023

I face this problem to. using WSL 2. it's not showing anything.

This is my machine, and I download pscale_0.126.0_linux_amd64.deb

Linux RioChndr-Lenovo-Legion 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
@blakecannell
Copy link

blakecannell commented Jan 27, 2023

I experience similar issues on WSL2 (Ubuntu):

I manually open the browser window, confirm, and I'm met with the following error. Can I get the output of the access-token so that I can atleast write this file manually?

Thanks in advance

ridds@DESKTOP-5PLDNPK:~$ sudo pscale auth login
[sudo] password for ridds:
Failed to open a browser: xdg-open resolves to executable in current directory (./xdg-open)

Confirmation Code: 97V4NKKI

If something goes wrong, copy and paste this URL into your browser: https://auth.planetscale.com/oauth/device?user_code=97V4NKKI

Error: error logging in: error writing token: open /root/.config/planetscale/access-token: no such file or directory```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet