Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

lock file not removed, which breaks selenium-webdriver

  • 返信なし
  • 1 人がこの問題に困っています
  • 5 回表示
more options

It seems that as of 79.0 the `lock` file in profile dir is no longer removed at browser close. That doesn't play very nicely with selenium driver (ruby API) when I want to create a browser instance with existing profile name. It seems that profile directory is copied, but this fails for `lock` file, as it cannot be `stat`ed.

Is not removing `lock` file intended?

This can be reproduced with: ruby -r 'selenium-webdriver' -e 'Selenium::WebDriver.for :firefox, profile: "my_existing_profile_name"'

which gives the stacktrace: /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:409:in `stat': No such file or directory @ rb_file_s_stat - /mnt/work/webdriver-rb-profilecopy20200726-75146-9bn20t/lock (Errno::ENOENT) from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:409:in `file_stat' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:551:in `gather_fileinfo_from_srcpath' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/file.rb:303:in `add' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:92:in `add_zip_entry' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:55:in `block (2 levels) in zip' from /usr/local/lib/ruby/2.6/find.rb:49:in `block (2 levels) in find' from /usr/local/lib/ruby/2.6/find.rb:48:in `catch' from /usr/local/lib/ruby/2.6/find.rb:48:in `block in find' from /usr/local/lib/ruby/2.6/find.rb:43:in `each' from /usr/local/lib/ruby/2.6/find.rb:43:in `find' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:54:in `block in zip' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/file.rb:125:in `open' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:81:in `with_tmp_zip' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:53:in `zip' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/profile.rb:193:in `encoded' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/options.rb:136:in `as_json' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/marionette/driver.rb:81:in `create_capabilities' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/marionette/driver.rb:36:in `initialize' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/driver.rb:33:in `new' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/driver.rb:33:in `new' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver.rb:54:in `for' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver.rb:88:in `for' from -e:1:in `<main>' 2020-07-26 21:58:10 WARN Selenium [DEPRECATION] :profile is deprecated. Use Selenium::WebDriver::Firefox::Options#profile= instead.


  1. ruby --version

ruby 2.6.6p146 (2020-03-31 revision 67876) [amd64-freebsd11]

  1. gem list selenium-webdriver

selenium-webdriver (3.142.7)

It seems that as of 79.0 the `lock` file in profile dir is no longer removed at browser close. That doesn't play very nicely with selenium driver (ruby API) when I want to create a browser instance with existing profile name. It seems that profile directory is copied, but this fails for `lock` file, as it cannot be `stat`ed. '''Is not removing `lock` file intended?''' This can be reproduced with: ruby -r 'selenium-webdriver' -e 'Selenium::WebDriver.for :firefox, profile: "my_existing_profile_name"' which gives the stacktrace: /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:409:in `stat': No such file or directory @ rb_file_s_stat - /mnt/work/webdriver-rb-profilecopy20200726-75146-9bn20t/lock (Errno::ENOENT) from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:409:in `file_stat' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/entry.rb:551:in `gather_fileinfo_from_srcpath' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/file.rb:303:in `add' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:92:in `add_zip_entry' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:55:in `block (2 levels) in zip' from /usr/local/lib/ruby/2.6/find.rb:49:in `block (2 levels) in find' from /usr/local/lib/ruby/2.6/find.rb:48:in `catch' from /usr/local/lib/ruby/2.6/find.rb:48:in `block in find' from /usr/local/lib/ruby/2.6/find.rb:43:in `each' from /usr/local/lib/ruby/2.6/find.rb:43:in `find' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:54:in `block in zip' from /usr/local/lib/ruby/gems/2.6/gems/rubyzip-2.3.0/lib/zip/file.rb:125:in `open' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:81:in `with_tmp_zip' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/zipper.rb:53:in `zip' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/profile.rb:193:in `encoded' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/options.rb:136:in `as_json' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/marionette/driver.rb:81:in `create_capabilities' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/marionette/driver.rb:36:in `initialize' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/driver.rb:33:in `new' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox/driver.rb:33:in `new' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver.rb:54:in `for' from /usr/local/lib/ruby/gems/2.6/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver.rb:88:in `for' from -e:1:in `<main>' 2020-07-26 21:58:10 WARN Selenium [DEPRECATION] :profile is deprecated. Use Selenium::WebDriver::Firefox::Options#profile= instead. # ruby --version ruby 2.6.6p146 (2020-03-31 revision 67876) [amd64-freebsd11] # gem list selenium-webdriver selenium-webdriver (3.142.7)