Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

DevToolsActivePort file doesn't exist

125 views
Skip to first unread message

上杉祐介

unread,
May 10, 2025, 2:30:57 AMMay 10
to ChromeDriver Users
Hello, folks.

I suddenly got this error at .Start method from yesterday.

============================
SessionNotCreatedError 
session not created: DevToolsActivePort file doesn't exist (Driver info: chromedriver=135.0.7049.114 (63fd8a7d9d09e41ba37b84386c85d5f249f848f7-refs/branch-heads/7049@{#21 NT 10.0.26100 x86_64) )  
============================

I use chromedirver with VBA and a part of the code is like this:
============================
with driver
        orgPt = "C:\Users\" & Environ("username")  & "\AppData\Local\Google\Chrome\User Data"
           
        .AddArgument "--user-data-dir=" & orgPt            
        .AddArgument "--profile-directory=Default"
        .AddArgument "--start-maximized"
        .AddArgument "--no-sandbox"
        .AddArgument "--lang=ja-JP"
        .Start
end with
============================

Didn't work:
- Install an old version Chrome [135-0-7049-96] and use an old chromedriver (got the same error) 
- Copy the "Default" folder and paste it right under "Chrome" folder, and designate as  "--user-data-dir".
 --> this looked to work but the browser didn't have any cookies.

Anyone has information or ideas on this?

上杉祐介

unread,
May 10, 2025, 11:28:48 AMMay 10
to ChromeDriver Users

Didn't work:

  • .AddArgument "--disable-dev-shm-usage" didn't work.
  • tried to add .AddArgument "--headless" just in case, but didn't work
  • .AddArgument "--remote-debugging-pipe" and .AddArgument "--remote-debugging-port=9222" didn't work, but the error message was different as "Timeout"
  • Stopped security software(MS Defender) , but didn't work.

2025年5月10日土曜日 15:30:57 UTC+9 上杉祐介:

岡崎善基

unread,
May 11, 2025, 4:53:57 AMMay 11
to ChromeDriver Users

Nice to meet you. Please be aware that I am not an expert.

I am facing the exact same issue. I am using Python 3.9.6, Selenium 4.17.2, and webdriver-manager 4.0.2.

In conclusion, I believe this problem is part of Google's security enhancements and is unlikely to be resolved.


My reasoning for this is as follows:

(1) The release notes for Chrome 136 mentioned security improvements to prevent account hijacking. 

・Please forgive me for not providing a source, as I have forgotten where I saw this.

(2) The "DevToolsActivePort" file appears to be deleted by ChromeDriver. 

・On a PC where automation tools have never been used, the "DevToolsActivePort" file does not exist under the "User Data" folder. 

・On a PC where automation tools were used in the past but not recently, the "DevToolsActivePort" file existed directly under the "User Data" folder. 

・On a PC where automation tools were running until recently, the "DevToolsActivePort" file existed directly under the "User Data" > "Default" folder. 

・Based on the above three points, I thought that moving the "DevToolsActivePort" file directly under the "User Data" folder might solve the problem. When I tried this, the "DevToolsActivePort" file was deleted from directly under the "User Data" folder as soon as ChromeDriver started. It's worth noting that other files copied directly under the "User Data" folder are not deleted. Also, if I place the "DevToolsActivePort" file directly under the "User Data" folder and manually launch Chrome, the file is not deleted. 

・From the above, I believe that ChromeDriver intentionally deletes the "DevToolsActivePort" file from directly under the "User Data" folder.


Therefore, I think the options are either to switch to another browser like Firefox, or to copy the "default" folder and then figure out how to inherit the cookies.


As I am not an expert, I apologize if I have said anything incorrect.

This issue is causing my work to stagnate, and I'm hoping for a more intelligent solution to emerge.  


2025年5月11日日曜日 0:28:48 UTC+9 上杉祐介:

上杉祐介

unread,
May 11, 2025, 10:03:05 AMMay 11
to ChromeDriver Users
thank you for the information.

I found a post telling the same issue on Chromiun group
https://issues.chromium.org/issues/416971599
(I posted there as well) 

Maybe, we have to wait some announcement from the dev team of chromedriver, or hope someone has a good workaround.

ありがとうございます!

2025年5月11日日曜日 17:53:57 UTC+9 岡崎善基:

上杉祐介

unread,
May 16, 2025, 2:29:28 AMMay 16
to ChromeDriver Users
confirmed that the error doesn't happen with the Beta Chrome and chromedriver(both 137.0.7151.27).
Hope never happen with the next 137.

2025年5月11日日曜日 23:03:05 UTC+9 上杉祐介:
Reply all
Reply to author
Forward
0 new messages