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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Local Firefox driver generating rename error following upgrade to the 4.0.1 version of selenium-webdriver #9987

Closed
markstanley-nps opened this issue Oct 26, 2021 · 3 comments

Comments

@markstanley-nps
Copy link

What happened?

Follow the upgrade to 4.0.1 from 4.0.0 a local firefox driver no longer works where a profile is specified

The appears to be related to the changes to zipper.rb to "Remove tempfile compatibility for Ruby 1.8"

Snippet and stack trace below.

How can we reproduce the issue?

require 'selenium-webdriver'

profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.dir'] = '/tmp/webdriver-downloads'
# Including a profile generates the failure
opts = Selenium::WebDriver::Firefox::Options.new(profile: profile)
# The below line will work
# opts = Selenium::WebDriver::Firefox::Options.new

driver = Selenium::WebDriver.for :firefox, capabilities: opts

driver.navigate.to 'https://selenium.dev/'

puts "title is #{driver.title}"

driver.quit

Relevant log output

C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rubyzip-2.3.2/lib/zip/file.rb:455:in `rename': Permission denied @ rb_file_s_rename - (C:/Users/mstanley/AppData/Local/Temp/20211026-10936-2unukv20211026-10936-novllv, C:/Users/mstanley/AppData/Local/Temp/20211026-10936-2unukv) (Errno::EACCES)
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rubyzip-2.3.2/lib/zip/file.rb:455:in `block in on_success_replace'
        from C:/Ruby30-x64/lib/ruby/3.0.0/tmpdir.rb:144:in `create'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rubyzip-2.3.2/lib/zip/file.rb:453:in `on_success_replace'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rubyzip-2.3.2/lib/zip/file.rb:349:in `commit'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/zipper.rb:58:in `block in zip'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rubyzip-2.3.2/lib/zip/file.rb:125:in `open'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/zipper.rb:76:in `block in with_tmp_zip'
        from C:/Ruby30-x64/lib/ruby/3.0.0/tempfile.rb:358:in `create'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/zipper.rb:75:in `with_tmp_zip'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/zipper.rb:53:in `zip'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/profile_helper.rb:39:in `encoded'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:151:in `generate_as_json'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:167:in `block in process_json_hash'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `each_with_object'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `process_json_hash'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:149:in `generate_as_json'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:167:in `block in process_json_hash'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `each_with_object'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:162:in `process_json_hash'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:149:in `generate_as_json'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/options.rb:123:in `as_json'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:358:in `block in generate_capabilities'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:345:in `map'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:345:in `generate_capabilities'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:333:in `create_bridge'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:53:in `new'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver/common/driver.rb:53:in `for'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.0.3/lib/selenium/webdriver.rb:88:in `for'
        from selenium-test.rb:10:in `<main>'

Operating System

Windows 10

Selenium version

ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]

What are the browser(s) and version(s) where you see this issue?

Firefox 93.0 (64-bit)

What are the browser driver(s) and version(s) where you see this issue?

geckodriver 0.30.0 (d372710b98a6 2021-09-16 10:29 +0300)

Are you using Selenium Grid?

No response

@github-actions
Copy link

@markstanley-nps, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@markstanley-nps markstanley-nps changed the title [馃悰 Bug]: Local Firefox driver generating rename error follow in the 4.0.1 version of selenium-webdriver [馃悰 Bug]: Local Firefox driver generating rename error following upgrade to the 4.0.1 version of selenium-webdriver Oct 26, 2021
@p0deje p0deje closed this as completed in 1925185 Oct 27, 2021
@p0deje
Copy link
Member

p0deje commented Oct 27, 2021

Thank you for the report, this is now fixed and will be available in the next release.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2021
elgatov pushed a commit to elgatov/selenium that referenced this issue Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants