1

I'm running selenium webdriver on windows10 Python 3.8.6 using chrome. I'm not sure how to check but I think I'm using chrome driver version 88. In my script I'm using the following Chrome options:

options = Options()
options.add_argument("--allow-running-insecure-content")
options.add_argument("--start-maximized")
prefs = {
"profile.default_content_settings.popups": 0,
"download.default_directory": fr"{dwnld_dir}",
"directory_upgrade": True,
}
options.add_experimental_option("prefs", prefs)  # preferences set
options.add_argument("--ignore-certificate-errors")`:

where dwnld_dir is the directory to download to. The script runs fine but with 2 x error messages at the start:

:ERROR:dns_config_services_win.cc(785)] DNS config watch failed
:ERROR:device_event_log_impl.cc(211) [07:24:12.130] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

How can I resolve these errors?

UPDATE

Debanjanb provides a detailed solution to the USB Error here. This should be resolved soon in later updates.

For the DNS error, here is the link to source docs dns_config_service_winc.cc and below function producing the error:

void DnsConfigServiceWin::OnConfigChanged(bool succeeded) {
  InvalidateConfig();
  config_reader_->WorkNow();
  if (!succeeded) {
    LOG(ERROR) << "DNS config watch failed.";
    set_watch_failed(true);
    UMA_HISTOGRAM_ENUMERATION("AsyncDNS.WatchStatus",
                              DNS_CONFIG_WATCH_FAILED_CONFIG,
                              DNS_CONFIG_WATCH_MAX);
  }

Still not sure if DNS_CONFIG_WATCH_FAILED_CONFIG poses security risk though.

izzleee
  • 315
  • 3
  • 11
  • 2
    remove "--allow-running-insecure-content" to see if the error goes away. (It's probably about that and some fairly recent changes in Chrome regarding mixed content...http/https) – pcalkins Jan 07 '21 at 21:47
  • Thanks @pcalkins. Your solution worked. I just skimmed through some more docs and the USB messages mostly happen with Windows and won't show up from version 90. – izzleee Jan 08 '21 at 00:04

1 Answers1

1

pcalkins suggestion worked - remove options.add_argument("--allow-running-insecure-content") this resolves the DNS error message. Newer chrome versions are aiming to resolve the USB error message too.

izzleee
  • 315
  • 3
  • 11