0

Im getting the following exceptions randomly when launching chromedriver 90 for selenium automation.

                - failed to wait for extension background 
                - time out exception
                - DevToolsActivePort file doesn't exist 

Browser : chrome 90

Selenium : 3.141.59

OS : Windows10

Steps to reproduce :

Try to Launch browsers again and again with multiple times parallelly with the following chromeoptions: (Same options works well with previous versions of chrome and chromedriver)

      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
      chromeOptions.addArguments("--no-sandbox");
      chromeOptions.addArguments("enable-automation");
      chromeOptions.addArguments("--ignore-certificate-errors'");
      chromeOptions.addArguments("disable-infobars");
      chromeOptions.addArguments("--disable-popup-blocking");
      chromeOptions.addArguments("--disable-dev-shm-usage");
      chromeOptions.addArguments("--disable-backgrounding-occluded-windows");
      chromeOptions.addArguments("use-fake-ui-for-media-stream");

The same was working fine before this chrome90 update. And the same works fine in chrome 86 with chromedirver 86.

Kindly help me to overcome this issue, Thanks in advance.

PrakashFrancis
  • 171
  • 2
  • 12
  • Any time you are running multiple threaded instances of chromedriver you can have issues... especially if you don't leave time for cleanup between quitting one driver and beginning another. "DevToolsActivePort file doesn't exist" means it can't find the file the browser dropped when launched in dev mode. This file will have the sessionID which the webdriver uses to communicate with the browser. The first error, "failed to wait for extension background" is a separate issue methinks... it would indicate that you're using a browser extension of some kind. – pcalkins May 26 '21 at 19:15
  • also see this thread: https://stackoverflow.com/questions/67143883/conflicting-solutions-for-different-errors-with-python-selenium-chrome/67494008#comment119297533_67494008 – pcalkins May 26 '21 at 19:19
  • Thanks @pcalkins. But I have been running in the same way for years, These issues happens in recent chromedriver90 update in specific windows machine alone. And also I have tried with multiple driver instances for every testNG XML suite, but no luck. Could you please give me any solutions for this else any work around or any other approach to have multiple instances in parallel. – PrakashFrancis May 27 '21 at 19:21
  • the thread I linked to has multiple possible solutions. Unfortunately it looks like this can be caused by various things. The first thing to check is webdriver version = browser version. You may have missed that Chrome updated to v91, for instance. The other main issue would be orphaned webdriver processes. This can happen when something crashes during one of your runs. (It never cleans up and the always running webdriver process causes issues...) – pcalkins May 27 '21 at 19:57
  • Thanks @pcalkins. Chromedriver91 will support on chrome91 browsers only. Will check with the new update. And yes the crashed driver causing the issue and stopping the parallel automation too., Im just looking for to solve this since it is happening randomly without any specific reason. – PrakashFrancis May 28 '21 at 07:09
  • try/catch your driver.quit() calls... see if there's an exception thrown there. – pcalkins May 28 '21 at 16:07
  • Exception handling is already done for all driver actions . But that doesn't help to fix the given issues. I have tried it with new chromedriver91 and chrome91 without any issues yesterday. Hope it is fixed in the new version. Thanks for the timely replies @pcalkins – PrakashFrancis Jun 09 '21 at 11:35

0 Answers0