Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Startup: Windows opens many instances of Edge, each with "ERROR:file_io_win.cc(180)] CreateFile settings.dat: Access is denied. (0x5)"

Tags:

A few weeks ago I'd been testing websites using Selenium WebDriver in C# (Visual Studio). I've had a lot of fun testing multiple browers.

Since about a week ago, when I turn on/start up my PC, automatically 20 or so instances of Microsoft Edge appear on screen showing the error

[XXX76:XXX68:XXX8/XXXX20.442:ERROR:file_io_win.cc(180)] CreateFile settings.dat: Access is denied. (0x5)

in a window that looks like the console but is definitely Edge.

I get that it's something to do with not being permitted to create/read this file but it's getting quite nuisant.

Why could this be happening?

I've replaced the numbers with Xs in the error because it looks like an IP Address or something like that.

like image 1000
BrujoLupino Avatar asked Sep 08 '20 10:09

BrujoLupino


2 Answers

I ran into the same issue, and have no reason for why. However, I managed to deal with it by opening the Task Manager (CTRL+SHIFT+ESC), going to the Startup tab, then Disabling each of the multiple Microsoft Edge instances.

like image 159
Boone Avatar answered Sep 30 '22 14:09

Boone


I had the same issue in python - disabling Microsoft Edge instances in "Startup Apps" helped but new instances got created/turned on every time the program runs...

In python I added a driver option that seemed to fix the problem: driverOptions.add_experimental_option("excludeSwitches", ["enable-logging"]) (see https://stackoverflow.com/a/64146083/9825881)

For C# I haven't tested but the equivalent might be:

List<string> ls = new List<string>();
ls.Add("enable-logging");
ChromeOptions options = new ChromeOptions();
options.AddExcludedArguments(ls);

using (IWebDriver driver = new ChromeDriver("C:\\Program\\chromedriver", options)){
-----
like image 29
Adam D Avatar answered Sep 30 '22 14:09

Adam D