Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidOperationException: Failed to start browser C:\Program Files\Mozilla Firefox\firefox.exe: other os error (SessionNotCreated) #1624

Closed
johnny0618 opened this issue Sep 27, 2019 · 4 comments

Comments

@johnny0618
Copy link

johnny0618 commented Sep 27, 2019

It runs very well on other machine with same win 10,but it does occurs in this machine.

System

  • Version: geckodriver-v0.25.0-win64
  • Platform: Win 10
  • Firefox: 69.0.1 (64)
  • Selenium: 3.141

Testcase

    FirefoxOptions options = new FirefoxOptions();
    options.BrowserExecutableLocation="C:\\Program Files\\Mozilla Firefox\\firefox.exe"; 
    options.LogLevel = FirefoxDriverLogLevel.Trace;
    string driverPath = FileUtil.getFileAssetsPath() + "Core\\Tools";
    IWebDriver driver=null;

    driver = new FirefoxDriver(driverPath, options); //<-Add your path

Stacktrace

InvalidOperationException: Failed to start browser C:\Program Files\Mozilla Firefox\firefox.exe: other os error (SessionNotCreated)
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError (OpenQA.Selenium.Remote.Response errorResponse)
OpenQA.Selenium.Remote.RemoteWebDriver.Execute (System.String driverCommandToExecute, System.Collections.Generic.Dictionary`2 parameters)
OpenQA.Selenium.Remote.RemoteWebDriver.StartSession (ICapabilities desiredCapabilities)
OpenQA.Selenium.Remote.RemoteWebDriver..ctor (ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
OpenQA.Selenium.Firefox.FirefoxDriver..ctor (OpenQA.Selenium.Firefox.FirefoxDriverService service, OpenQA.Selenium.Firefox.FirefoxOptions options, TimeSpan commandTimeout)
OpenQA.Selenium.Firefox.FirefoxDriver..ctor (System.String geckoDriverDirectory, OpenQA.Selenium.Firefox.FirefoxOptions options, TimeSpan commandTimeout)
OpenQA.Selenium.Firefox.FirefoxDriver..ctor (System.String geckoDriverDirectory, OpenQA.Selenium.Firefox.FirefoxOptions options)

Trace-level log

See https://searchfox.org/mozilla-central/source/testing/geckodriver/doc/TraceLogs.md
for how to produce a trace-level log.

Sorry I have added options.LogLevel = FirefoxDriverLogLevel.Trace; but got no trace

@andreastt
Copy link
Contributor

I suspect this may be related to #1617. Could you try install the Visual Studio Redistributable Runtime and see if that makes a difference?

@johnny0618
Copy link
Author

It works!Thank you!

@whimboo
Copy link
Collaborator

whimboo commented Sep 28, 2019

Please note that this is a bug in geckodriver 0.25.0. The dependency on the MSVC runtime package will be removed again with the 0.26.0 release.

Marking as dupe of issue #1617

@lock
Copy link

lock bot commented Nov 12, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants