snowpark-python
snowpark-python copied to clipboard
SNOW-698642: ExternalBrowser authentication spins when launched via. WSL
Please answer these questions before submitting your issue. Thanks!
-
What version of Python are you using?
3.8.14
-
What operating system and processor architecture are you using?
Linux-5.15.74.2-microsoft-standard-WSL2-x86_64-with-glibc2.35
-
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
- 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.
- What did you expect to see?
To be authenticated as if I was running a Windows machine
- Can you set logging to DEBUG and collect the logs?
I don't suspect that it has to do with the code itself.
Thanks!
If this helps at all, whenever I click Enter on the webpage launched via snowpark, this pops up:
It seems to be getting stuck here:data = socket_client.recv(BUF_SIZE).decode("utf-8").split("\r\n")
@lawrence-vo this still happening?
@sfc-gh-achandrasekaran it is still failing.
Thanks!
@sfc-gh-hchaturvedi Do you happen to know anything about this?
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?
That's what I initially thought but other browser based authentication services (like AWS SSO authentication) work while I am on WSL.