question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: Error using user-data-dir= in Chrome 103.0.5060.53

See original GitHub issue

What happened?

When using chrome_options.add_argument(‘user-data-dir=’ in Chrome 103 the error occurs:

Selenium.common.exceptions.WebDriverException: Message: unknown error: unexpected command response (Session info: chrome=103.0.5060.53)

if I remove this parameter, it works.

How can we reproduce the issue?

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('user-data-dir=C:\\Perfil')

driver_path = 'chromedriver.exe'
service = Service(driver_path)
driver = webdriver.Chrome(service=service,options=chrome_options)

driver.get("https://google.com")

Relevant log output

elenium.common.exceptions.WebDriverException: Message: unknown error: unexpected command response
  (Session info: chrome=103.0.5060.53)
Stacktrace:
Backtrace:
	Ordinal0 [0x007E6463+2188387]
	Ordinal0 [0x0077E461+1762401]
	Ordinal0 [0x00693D78+802168]
	Ordinal0 [0x00687210+750096]
	Ordinal0 [0x0068675A+747354]
	Ordinal0 [0x00685D3F+744767]
	Ordinal0 [0x0068557C+742780]
	Ordinal0 [0x00699BF3+826355]
	Ordinal0 [0x006ECF6D+1167213]
	Ordinal0 [0x006DC5F6+1099254]
	Ordinal0 [0x006B6BE0+945120]
	Ordinal0 [0x006B7AD6+948950]
	GetHandleVerifier [0x00A871F2+2712546]
	GetHandleVerifier [0x00A7886D+2652765]
	GetHandleVerifier [0x0087002A+520730]
	GetHandleVerifier [0x0086EE06+516086]
	Ordinal0 [0x0078468B+1787531]
	Ordinal0 [0x00788E88+1805960]
	Ordinal0 [0x00788F75+1806197]
	Ordinal0 [0x00791DF1+1842673]
	BaseThreadInitThunk [0x75F7FA29+25]
	RtlGetAppContainerNamedObjectPath [0x77987A9E+286]
	RtlGetAppContainerNamedObjectPath [0x77987A6E+238]

Operating System

Windows 10 and Manjaro

Selenium version

Python (Selenium 4)

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

Chrome 103

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

ChromeDriver 103.0.5060.53

Are you using Selenium Grid?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:12
  • Comments:32 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
dianis55commented, Jun 23, 2022

image + Having a same problem now

9reactions
diemolcommented, Jun 23, 2022

Folks, posting “I have the same issue” does not help much, we cannot do anything because this is a Chrome issue. Please add yourself as a watcher to https://bugs.chromium.org/p/chromedriver/issues/detail?id=4121

Read more comments on GitHub >

github_iconTop Results From Across the Web

ChromeDriver 99.0.4844.51 Update : error: target frame ...
After update of chrome to ChromeDriver 99.0.4844.51 the problem with iframe happens, gets detached after some time of interacting with it.
Read more >
Message: session not created: This version of ChromeDriver ...
The code that I ran was okay in 2 days ago, but now, the code have been showed this error. Please say how...
Read more >
748949 - Chrome is crashing if UserDataDir contains variable ...
Issue 748949: Chrome is crashing if UserDataDir contains variable ${client_name} ... Steps to reproduce the problem: ... Is it a problem with a...
Read more >
Getting error while uploading file even thought upload button ...
ElementNotInteractableException: element not interactable (Session info: chrome=103.0.5060.53) Build info: version: '3.141.59', ...
Read more >
Fix the ChromeDriver 103 bug with ChromeDriver 104
Message: unknown error: cannot determine loading status from unknown error: unexpected command response (Session info: chrome=103.0.5060.53) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found