Fixed websocket URL to work with windows google-chrome browser on WSL v1 #327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On WSLv1 when you set the "executable_path" to a windows browser the websocket url has a carriage return in it and it breaks the code.
'`/usr/lib/ruby/3.0.0/uri/rfc3986_parser.rb:67:in
split': bad URI(is not URI?): "ws://127.0.0.1:59359/devtools/browser/7be24a1d-1c2e-4839-a3a9-2516e01e1d20\r" (URI::InvalidURIError)from /usr/lib/ruby/3.0.0/uri/rfc3986_parser.rb:72:in
parse' from /usr/lib/ruby/3.0.0/uri/common.rb:171:in
parse'from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/web_socket.rb:24:in
initialize' from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/web_socket.rb:60:in
new'from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/web_socket.rb:60:in
initialize' from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/web_socket_transport.rb:5:in
new'from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/web_socket_transport.rb:5:in
create' from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/browser_runner.rb:167:in
setup_connection'from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/launcher/chrome.rb:76:in
launch' from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer/puppeteer.rb:78:in
launch'from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer.rb:86:in
public_send' from /var/lib/gems/3.0.0/gems/puppeteer-ruby-0.45.3/lib/puppeteer.rb:86:in
block (3 levels) in module:Puppeteer'from get-pin.rb:5:in
get_browser' from get-pin.rb:34:in
my change fixes that