opened
IgorJorobus
username_0
Hi guys.

Problem
=====

```ruby
require 'selenium-webdriver'
profile = Selenium::WebDriver::Chrome::Profile.new('C:/Users/X/AppData/Local/Google/Chrome/User Data')
webdriver = Selenium::WebDriver.for(:chrome, profile: profile)
```

 Previous code fails in last line with next error message and backtrace:

C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1392:in 'initialize': Permission denied @ rb_sysopen - C:/Users/Rubygor/AppData/Local/Google/Chrome/User Data/Default/Cache/data_0 (Errno::EACCES)
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1392:in 'open'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1392:in 'copy_file'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1360:in 'copy'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:472:in 'block in copy_entry'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1498:in 'wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1501:in 'block in wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'each'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1501:in 'block in wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'each'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1501:in 'block in wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'each'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1500:in 'wrap_traverse'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:469:in 'copy_entry'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:444:in 'block in cp_r'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1571:in 'block in fu_each_src_dest'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1587:in 'fu_each_src_dest0'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:1569:in 'fu_each_src_dest'
	from C:/Ruby23/lib/ruby/2.3.0/fileutils.rb:443:in 'cp_r'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/profile_helper.rb:50:in 'create_tmp_copy'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/chrome/profile.rb:67:in 'layout_on_disk'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/chrome/profile.rb:82:in 'as_json'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/chrome/bridge.rb:81:in 'create_capabilities'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/chrome/bridge.rb:40:in 'initialize'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/driver.rb:61:in 'new'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/driver.rb:61:in 'for'
	from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver.rb:82:in 'for'

 I have tried to run the script with admin privileges, it neither work. I'm not sure if my Chrome version has something to do with the problem, but just in case, the version installed on my PC is "55.0.2883.87 m". I want to use the default profile, with extensions enabled, sadly I can't achieve this due to the error shown above. I'll be looking forward for some feedback. Thanks, regards.
___

System
=====
OS:  Windows 7 Proffesional x64
Programming Language: Ruby 2.3.1p112
Selenium Version:  3.0.5
Browser:  Chrome
ChromeDriver Version:  2.25.426923
[Ruby] Errno::EACCES when trying to use a Chrome default profile
issue
closed
AutomatedTester
username_1
issue
created
AutomatedTester
username_1
This is a question rather than an issue. Please send questions to the [selenium user group](https://groups.google.com/forum/#!forum/selenium-users)

*or*

Please log chromedriver issues with the chromedriver project.

https://sites.google.com/a/chromium.org/chromedriver/help

Please be sure to include a completely reproducible test script for them, without a way to reproduce the issue you are seeing there is no good way for them to fix the problem. A reproducible test script includes a WebDriver script and a link to the page in question. If you can not provide a link, create one using [jsfiddle.net](https://jsfiddle.net)
comment
created
IgorJorobus
username_0
It doesn't look like a question to me, failure is exactly here:

from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.0.5/lib/selenium/webdriver/common/profile_helper.rb:50:in 'create_tmp_copy'

 Selenium is trying to copy a file that apparently is in use, even if I have no Chrome instance running. I guess this has to be with chromedriver according to your point of view. By the way, all the code you need to reproduce the problem is there, that 3 lines, you need to replace the argument passed to Selenium::WebDriver::Chrome::Profile.new() for the corresponding according to your Chrome installation. In the meantime I'll try to make a fork of the project and see if there's another way to by-pass that copy causing conflict.
comment