-
Notifications
You must be signed in to change notification settings - Fork 110
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
Does not use Chrome on Windows on WSLv2 #196
Conversation
This PR will also close #197 |
@fabioxgn Thank you for this PR! Just to confirm, this PR will:
Is that correct? @urubatan Have you already tested this PR to confirm #197 will get fixed? Would like to be sure before we close both #192 and #197 when this PR gets merged. |
Exactly 👍 |
I just tested and the PR do not fix the issue |
What |
cat /proc/version I found a resource (https://askubuntu.com/questions/1177729/wsl-am-i-running-version-1-or-version-2) |
But with that output, it should work with this PR. Did you test with the It should detect your system as Linux and not WSL as |
@fabioxgn and @titusfortner my bad, the PR works, I pointed my Gemfile to @fabioxgn master branch, not to his wsl2 branch. Sorry for the mistake, please merge this PR and ignore mine; PS.: @fabioxgn might be a good idea to include the "false WSL test" check in your PR line this one |
@urubatan There's a test for this: https://github.com/titusfortner/webdrivers/pull/196/files#diff-ac7f784131a2d9a0da98400f0909e0ab274625c5ca268516e24e98c4bcb46201R27 But my PR uses the word "Microsoft" to detect if is wsl1, as in wsl2 it is lowercase. |
Fixes #192
This PR #187 changed WSL detection to detect both WSLv1 and WSLv2 as running in WSL and use Chrome on Windows for both versions. But it doesn't work on WSLv2 out of the box.
WSL2 networking is different from WSL1 and you can't connect from the WSL2 Linux on Chromedriver running on Windows using
127.0.0.1:9515
, see: microsoft/WSL#4619This PR changes the wsl detection to be explicity about v1 and only uses Chromedriver on Windows if it is WSLv1, as it doesn't work on WSLv2.