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

SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Microsoft Edge failed to start: exited normally. #132

Open
Darshan77D opened this issue Dec 20, 2023 · 4 comments
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog

Comments

@Darshan77D
Copy link

Darshan77D commented Dec 20, 2023

Code

Map<String, Object> edgePrefs = new HashMap<String, Object>();
edgePrefs.put("profile.default_content_settings.popups", 0);
edgePrefs.put("profile.default_content_setting_values.notifications", 2);
edgePrefs.put("download.default_directory", file1);
edgePrefs.put("profile.default_content_setting_values.automatic_downloads", 1);
edgePrefs.put("download.prompt_for_download", false);
EdgeOptions options = new EdgeOptions();
options.setExperimentalOption("prefs", edgePrefs);
options.addArguments("start-maximized"); // open Browser in maximized mode
options.addArguments("disable-infobars"); // disabling infobars
options.addArguments("--disable-extensions"); // disabling extensions
options.addArguments("--disable-gpu"); // applicable to windows os only
options.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems
options.addArguments("--no-sandbox");
options.addArguments("--remote-debugging-port=5557");
options.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
WebDriverManager.edgedriver().setup();
driver =new EdgeDriver(options);

Error log:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Microsoft Edge failed to start: exited normally.
(chrome not reachable)
(The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.)

OS -Windows 11
Java -14
Selenium 4.11
Edge version 120

AB#undefined

@Darshan77D Darshan77D added the bug Something isn't working label Dec 20, 2023
@bwalderman bwalderman added the tracked This issue is now tracked on our internal backlog label Jan 2, 2024
@bwalderman
Copy link
Member

Thanks for reporting this. I've added it to our internal backlog for investigation.

@eshravani
Copy link

facing similar issue. Any update on this?

@nagamuppavarapu-rgare
Copy link

We are facing similar issue
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Microsoft Edge failed to start: crashed.
(chrome not reachable)
(The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.)
Host info: host: 'TESTHOST', ip: 'XX.XX.XX.XX'
Build info: version: '4.18.0', revision: 'b6bf9de7cc*'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.22'
Driver info: org.openqa.selenium.edge.EdgeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [--no-sandbox, --disable-dev-shm-usage, --remote-debugging-port=9222], extensions: []}}]}]
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:139)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:95)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:519)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:233)

@Kiran1975
Copy link

We are facing a similar issue when running the test scripts in Jenkins, but locally working fine. Please let me know if there is any update on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked This issue is now tracked on our internal backlog
Projects
None yet
Development

No branches or pull requests

5 participants