Selenium ChromeDriver unknown error unable to discover open pages
<p>I need help with setting up ChromeDriver in Selenium WebDriver.</p>
<p>I have downloaded the latest version of ChromeDriver and added the path to the exe to my PATH environment variable.</p>
<p>However, when I try to run any scripts they fail on the line</p>
<pre><code>driver = new ChromeDriver();
</code></pre>
<p>An instance of Chrome opens with a black screen and the address set as &quot;data;,&quot; and I get a popup stating:</p>
<blockquote>
<p>&quot;Chrome Automation Extension has crashed&quot;.</p>
</blockquote>
<p>Continuing from that point, I get the following exception details:</p>
<blockquote>
<p>unknown error: unable to discover open pages</p>
<p>(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)</p>
<p>Command duration or timeout: 61.19 seconds</p>
<p>Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:03:33'</p>
</blockquote>
<p>As I say, I've got the latest version of ChromeDriver and I have checked that Chrome is currently running the latest version so I know it isn't an issue with outdated versions of either.</p>
<p>I'm sure it must be something simple which I'm overlooking, but I just can't think what. Does anyone have any ideas?</p>
<p><strong>Edit</strong></p>
<p>Here's the log for the case, where Capability is not passed as a variable:</p>
<pre><code>[0.885][INFO]: COMMAND InitSession {
   &quot;desiredCapabilities&quot;: {
      &quot;browserName&quot;: &quot;chrome&quot;,
      &quot;chromeOptions&quot;: {
         &quot;args&quot;: [  ],
         &quot;extensions&quot;: [  ]
      },
      &quot;platform&quot;: &quot;ANY&quot;,
      &quot;version&quot;: &quot;&quot;
   }
}
[0.886][INFO]: Populating Preferences file: {
   &quot;alternate_error_pages&quot;: {
      &quot;enabled&quot;: false
   },
   &quot;autofill&quot;: {
      &quot;enabled&quot;: false
   },
   &quot;browser&quot;: {
      &quot;check_default_browser&quot;: false
   },
   &quot;distribution&quot;: {
      &quot;import_bookmarks&quot;: false,
      &quot;import_history&quot;: false,
      &quot;import_search_engine&quot;: false,
      &quot;make_chrome_default_for_user&quot;: false,
      &quot;show_welcome_page&quot;: false,
      &quot;skip_first_run_ui&quot;: true
   },
   &quot;dns_prefetching&quot;: {
      &quot;enabled&quot;: false
   },
   &quot;profile&quot;: {
      &quot;content_settings&quot;: {
         &quot;pattern_pairs&quot;: {
            &quot;https://*,*&quot;: {
               &quot;media-stream&quot;: {
                  &quot;audio&quot;: &quot;Default&quot;,
                  &quot;video&quot;: &quot;Default&quot;
               }
            }
         }
      },
      &quot;default_content_setting_values&quot;: {
         &quot;geolocation&quot;: 1
      },
      &quot;default_content_settings&quot;: {
         &quot;geolocation&quot;: 1,
         &quot;mouselock&quot;: 1,
         &quot;notifications&quot;: 1,
         &quot;popups&quot;: 1,
         &quot;ppapi-broker&quot;: 1
      },
      &quot;password_manager_enabled&quot;: false
   },
   &quot;safebrowsing&quot;: {
      &quot;enabled&quot;: false
   },
   &quot;search&quot;: {
      &quot;suggest_enabled&quot;: false
   },
   &quot;translate&quot;: {
      &quot;enabled&quot;: false
   }
}
[0.889][INFO]: Populating Local State file: {
   &quot;background_mode&quot;: {
      &quot;enabled&quot;: false
   },
   &quot;ssl&quot;: {
      &quot;rev_checking&quot;: {   
         &quot;enabled&quot;: false
      }
   }
}
[0.936][INFO]: Launching chrome: &quot;C:\Program Files    (x86)\Google\Chrome\Application\chrome.exe&quot; --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors --load-extension=&quot;C:\Users\Rory\AppData\Local\Temp\scoped_dir10152_5411\internal&quot; --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12607 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --test-type=webdriver --use-mock-keychain --user-data-dir=&quot;C:\Users\Rory\AppData\Local\Temp\scoped_dir10152_31299&quot; data:,
[61.070][INFO]: RESPONSE InitSession unknown error: unable to discover open pages
</code></pre>