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

WSL logfire auth #824

Open
ScrimForever opened this issue Jan 29, 2025 · 3 comments
Open

WSL logfire auth #824

ScrimForever opened this issue Jan 29, 2025 · 3 comments

Comments

@ScrimForever
Copy link

Description

Im trying to use logfire auth, but my wsl did not open any browser to make login.

Image

Python, Logfire & OS Versions, related packages (not required)

Windows 11 - OS
@samuelcolvin
Copy link
Member

@davidhewitt I think you have WSL, could you take a look?

@ScrimForever
Copy link
Author

@samuelcolvin ,

I solved it with some caveats. Apparently, it looks like WSL tries to use the Linux text browser. I had to press "c" to continue, but luckily, the URL appeared, and I was able to proceed in my default browser. However, I think this could be improved.

@davidhewitt
Copy link
Contributor

It looks like we just use the webbrowser package from the standard library to do this, which will respect the default browser set inside of WSL. Upstream issue is at python/cpython#89752

We could potentially patch around this inside logfire, let's see what upstream say.

I think configuring your WSL browser to be wslview seems to be the recommended solution for now while upstream does not handle. Seems like might be installed by default on some distros?

github version https://github.com/wslutilities/wslu
looks like ubuntu maintains a fork in https://launchpad.net/ubuntu/+source/wslu

I found the version on my WSL installation to be broken so I installed the github version using the instructions at https://wslutiliti.es/wslu/install.html and now logfire auth works fine for me inside WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants