Skip to content

Webdrivers::NetworkError, probably due to new chromedriver naming #237

@ansonhoyt

Description

@ansonhoyt

Summary

It looks like Webdrivers' download_file gets a 404 because Google changed chromedriver's filename scheme with 106.0.5249.61.

Debug Info

  • Webdrivers version: 5.1.0
  • Ruby version: 3.0.4 (and 2.7.6 with another app. Both compiled for Apple's arm64, not x86_64 + Rosetta.)
  • Operating system / CI Environment: macOS 12.6 with an M1 Max
  • Browser and version: chromedriver 106.0.5249.61

Expected Behavior

download_file should download: https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac_arm64.zip

Actual Behavior

download_file tried to download: https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac64_m1.zip

/Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/network.rb:19:in `get': Net::HTTPServerException: 404 "Not Found" with https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac64_m1.zip (Webdrivers::NetworkError)
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/system.rb:74:in `block (2 levels) in download_file'
	from /Users/ahoyt/.rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/tempfile.rb:317:in `open'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/system.rb:73:in `block in download_file'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/system.rb:72:in `chdir'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/system.rb:72:in `download_file'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/system.rb:63:in `download'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/common.rb:98:in `update'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/webdrivers-5.1.0/lib/webdrivers/chromedriver.rb:149:in `block in <top (required)>'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/actionpack-7.0.4/lib/action_dispatch/system_testing/browser.rb:36:in `preload'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/actionpack-7.0.4/lib/action_dispatch/system_testing/driver.rb:27:in `initialize'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/actionpack-7.0.4/lib/action_dispatch/system_test_case.rb:159:in `new'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/actionpack-7.0.4/lib/action_dispatch/system_test_case.rb:159:in `driven_by'
	from /Users/ahoyt/code/eita/eita-activity/test/application_system_test_case.rb:10:in `<class:ApplicationSystemTestCase>'
	from /Users/ahoyt/code/eita/eita-activity/test/application_system_test_case.rb:5:in `<main>'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/ahoyt/code/eita/eita-activity/test/system/activities_test.rb:1:in `<main>'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/test_unit/runner.rb:47:in `block in load_tests'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/test_unit/runner.rb:47:in `each'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/test_unit/runner.rb:47:in `load_tests'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/test_unit/runner.rb:40:in `run'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/commands/test/test_command.rb:33:in `perform'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/ahoyt/.rvm/gems/ruby-3.0.4@eita-activity/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from bin/rails:4:in `<main>'

Looking through https://chromedriver.storage.googleapis.com/, the naming seems to change with chromedriver 106.0.5249.61.

It looks like driver_filename always returns "mac64_m1" but should start returning "mac_arm64" for new chromedriver releases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions