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

SNOW-698642: ExternalBrowser authentication spins when launched via. WSL #622

Open
lawrence-vo opened this issue Nov 22, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@lawrence-vo
Copy link

lawrence-vo commented Nov 22, 2022

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    3.8.14

  2. What operating system and processor architecture are you using?

    Linux-5.15.74.2-microsoft-standard-WSL2-x86_64-with-glibc2.35

  3. What are the component versions in the environment (pip freeze)?

asn1crypto==1.5.1
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==2.1.1
cloudpickle==2.0.0
cryptography==38.0.3
filelock==3.8.0
idna==3.4
networkx==2.8.8
numpy==1.23.5
oscrypto==1.3.0
pandas==1.5.1
pycparser==2.21
pycryptodomex==3.15.0
PyJWT==2.6.0
pyOpenSSL==22.1.0
python-dateutil==2.8.2
pytz==2022.6
requests==2.28.1
scipy==1.9.3
six==1.16.0
snowflake-connector-python==2.8.2
snowflake-snowpark-python==1.0.0
sql-metadata==2.6.0
sqlparse==0.4.3
typing_extensions==4.4.0
urllib3==1.26.12

  1. What did you do?

Running WSL2 with Ubuntu 22.04.01 with Windows 11. I created a session and set authenticator to externalbrowser. I have installed wslu and set BROWSER=wslview. I have confirmed that I can launch Chrome (my default browser) via WSL. The webpage is launched in chrome but I am stuck with a webpage that stays on Redirecting to Snowflake client in 1 seconds.... I do see an error message that says tcgetpgrp failed: Not a tty. After a while, I get the error message: Failed to connect to DB: <my-account>.snowflakecomputing.com:443, Invalid HTTP request from web browser. Idp authentication could have failed.

  1. What did you expect to see?

To be authenticated as if I was running a Windows machine

  1. Can you set logging to DEBUG and collect the logs?

I don't suspect that it has to do with the code itself.

Thanks!

@lawrence-vo lawrence-vo added bug Something isn't working needs triage Initial RCA is required labels Nov 22, 2022
@github-actions github-actions bot changed the title ExternalBrowser authentication spins when launched via. WSL SNOW-698642: ExternalBrowser authentication spins when launched via. WSL Nov 22, 2022
@lawrence-vo
Copy link
Author

If this helps at all, whenever I click Enter on the webpage launched via snowpark, this pops up:

image

@lawrence-vo
Copy link
Author

It seems to be getting stuck here:data = socket_client.recv(BUF_SIZE).decode("utf-8").split("\r\n")

@sfc-gh-achandrasekaran
Copy link
Contributor

@lawrence-vo this still happening?

@lawrence-vo
Copy link
Author

@sfc-gh-achandrasekaran it is still failing.

Thanks!

@sfc-gh-yixie
Copy link
Collaborator

@sfc-gh-hchaturvedi Do you happen to know anything about this?

@sfc-gh-stan
Copy link
Collaborator

This looks like a general webbrowser/WSL issue. Could it be https://stackoverflow.com/questions/73480501/error-tcgetpgrp-failed-not-a-tty-using-python3-to-open-web-browser?

@sfc-gh-stan sfc-gh-stan removed the needs triage Initial RCA is required label Oct 2, 2023
@lawrence-vo
Copy link
Author

That's what I initially thought but other browser based authentication services (like AWS SSO authentication) work while I am on WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants