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

Chrome binary cannot be located on Windows (JRuby) #130

Closed
joankaradimov opened this issue Jun 7, 2019 · 4 comments · Fixed by #131
Closed

Chrome binary cannot be located on Windows (JRuby) #130

joankaradimov opened this issue Jun 7, 2019 · 4 comments · Fixed by #131
Assignees
Labels

Comments

@joankaradimov
Copy link

Summary

The binary for Chrome cannot be found on Windows. It looks like it might be because of a whitespace in its path.

Debug Info

  • Operating system: Windows 10
  • Browser and version: Chrome 75
  • Ruby: JRuby 9.2.7.0

Expected Behavior

No exception is thrown.

Actual Behavior

This exception is thrown:

x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:37
+ (Get-ItemProperty C:\Program Files (x86)\\Google\Chrome\Application\c ...
+                                     ~~~
    + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


An error occurred in a `before(:suite)` hook.
Failure/Error: raise VersionError, 'Failed to find Chrome binary or its version.' if version.nil? || version.empty?

Webdrivers::VersionError:
  Failed to find Chrome binary or its version.
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chrome_finder.rb:10:in `version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chromedriver.rb:46:in `chrome_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chromedriver.rb:105:in `release_version'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chromedriver.rb:111:in `sufficient_binary?'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/common.rb:132:in `correct_binary?'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/common.rb:83:in `update'
# ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chromedriver.rb:118:in `block in <main>'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/common/service.rb:133:in `binary_path'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/common/service.rb:94:in `initialize'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/common/service.rb:41:in `chrome'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/common/driver.rb:299:in `service_url'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/chrome/driver.rb:40:in `initialize'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver/common/driver.rb:46:in `for'
# ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.142.3/lib/selenium/webdriver.rb:88:in `for'
# ./features/build/tmp/jrubyExec/gems/capybara-3.22.0/lib/capybara/selenium/driver.rb:48:in `browser'
# ./features/build/tmp/jrubyExec/gems/capybara-3.22.0/lib/capybara/selenium/driver.rb:167:in `current_window_handle'
# ./features/build/tmp/jrubyExec/gems/capybara-3.22.0/lib/capybara/session.rb:437:in `current_window'
# ./features/spec_helper.rb:89:in `block in <main>'
# ------------------
# --- Caused by: ---
# Webdrivers::VersionError:
#   Failed to find Chrome binary or its version.
#   ./features/build/tmp/jrubyExec/gems/webdrivers-4.0.0/lib/webdrivers/chrome_finder.rb:10:in `version'
@kapoorlakshya
Copy link
Collaborator

Possibly related to #41 and jruby/jruby#3725.

kapoorlakshya added a commit to kapoorlakshya/webdrivers that referenced this issue Jun 8, 2019
@kapoorlakshya kapoorlakshya self-assigned this Jun 8, 2019
@kapoorlakshya kapoorlakshya changed the title Chrome binary cannot be located on Windows Chrome binary cannot be located on Windows (JRuby) Jun 9, 2019
@kapoorlakshya
Copy link
Collaborator

Hi @joankaradimov, can you please test the fix from master in your project and confirm that it works for you? Thanks!

@kapoorlakshya
Copy link
Collaborator

Fix released in v4.0.1.

@joankaradimov
Copy link
Author

Sorry for the big delay. Yes, I can confirm it is fixed.

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

Successfully merging a pull request may close this issue.

2 participants