Unhelpful error from `rails test:system`

There are a couple of problems with the error barf below, produced from running rails test:system for the first time:

  1. You have to scroll alllllll the way to the top to even see what is actually wrong.
  2. There’s nothing actionable in Webdrivers::BrowserNotFound: Failed to find Chrome binary.. Every single person who sees this for the first time is going to have to google it, so let’s give them the google results inline.
rails test:system
rails aborted!
Webdrivers::BrowserNotFound: Failed to find Chrome binary.
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chrome_finder.rb:21:in `location'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chrome_finder.rb:10:in `version'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chromedriver.rb:46:in `browser_version'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chromedriver.rb:106:in `release_version'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chromedriver.rb:32:in `latest_version'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/common.rb:135:in `correct_binary?'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/common.rb:91:in `update'
/devcache/gems/gems/webdrivers-4.3.0/lib/webdrivers/chromedriver.rb:119:in `block in <main>'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/core_ext/object/try.rb:15:in `public_send'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/core_ext/object/try.rb:15:in `try'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_testing/browser.rb:50:in `preload'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_testing/driver.rb:13:in `initialize'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_test_case.rb:169:in `new'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_test_case.rb:169:in `driven_by'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_test_case.rb:172:in `<class:SystemTestCase>'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_test_case.rb:113:in `<module:ActionDispatch>'
/devcache/gems/gems/actionpack-6.0.2.2/lib/action_dispatch/system_test_case.rb:15:in `<main>'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/devcache/gems/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
/workspaces/sixmilebridge/test/application_system_test_case.rb:3:in `<main>'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/devcache/gems/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
/workspaces/sixmilebridge/test/system/islanders_test.rb:1:in `<main>'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/devcache/gems/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `block in load_tests'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `each'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `load_tests'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:39:in `run'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:35:in `rake_run'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/test_unit/testing.rake:56:in `block (2 levels) in <main>'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/command.rb:48:in `invoke'
/devcache/gems/gems/railties-6.0.2.2/lib/rails/commands.rb:18:in `<main>'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/devcache/gems/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
/devcache/gems/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
bin/rails:9:in `<main>'
Tasks: TOP => test:system
(See full trace by running task with --trace)
3 Likes

P.S. The google results for this error suuuuuuuuck. All the better reason to provide a useful actionable error.