Edge driver -inprivate option doesn't work in application mode (--app==http*)
What happened? In edge v 133 I was able to start Edge in private mode and application mode at the same time. In version 134 it is not possible. Please check below screen to see how it works. (script in section how to reproduce)
How can we reproduce the issue? var edgeDriverService = EdgeDriverService.CreateDefaultService(driverFolder); var edgeOptions = new EdgeOptions(); var input = ""; while (true) { input = Console.ReadLine(); if (string.IsNullOrEmpty(input) || input.Equals("q")) { break; } edgeOptions.AddArgument(input); }
edgeOptions.AddArgument("-start-maximized");
var driver = new EdgeDriver(edgeDriverService, edgeOptions);
Relevant log output Unhandled Exception: System.InvalidOperationException: 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.) (SessionNotCreated) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.<ExecuteAsync>d__63.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities) at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities) at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options) at EdgeCurrentSelenium.Program.Main(String[] args) in C:\Dev\Sandbox\EdgeCurrentSelenium\EdgeCurrentSelenium\Program.cs:line 48
Unhandled Exception: System.InvalidOperationException: session not created: Microsoft Edge failed to start: crashed. (session not created: DevToolsActivePort file doesn't exist) (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.) (SessionNotCreated) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.<ExecuteAsync>d__63.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities) at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities) at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options) at EdgeCurrentSelenium.Program.Main(String[] args) in C:\Dev\Sandbox\EdgeCurrentSelenium\EdgeCurrentSelenium\Program.cs:line 67 Operating System win 2019
Selenium version c# Selenium.WebDriver" version="4.29.0
What are the browser(s) and version(s) where you see this issue? Edge 134,
What are the browser driver(s) and version(s) where you see this issue? Edge WebDriver 134.0.3124.51
I did some analysis and it turns out that below command works on ms edge 133 but does NOT work on ms edge 134 "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -inprivate -start-maximized --app=https://www.facebook.com This is how it looks in ms edge 133
Below command works on ms edge 133 and 134 (no --app) C:\Users\caadmin>"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -inprivate -start-maximized Below command works on ms edge 133 and 134 (no -inprivate) C:\Users\caadmin>"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -start-maximized --app=https://www.facebook.com
It looks that in ms edge 134 there was an issue introduced that prevent to have both -inprivate and --app defined
Confirming the same findings as above. For particular web-based programs in our environment, we have been using --inprivate and --app mode for over 2 years.
After Ver 134 auto update in our environment, using these same shortcuts either:
- Do not open a window (95% of the time) or
2, Shows a message that the browser is not responding (5%) of the time:
I am subscribed to BETA channel and have been keeping on top of release notes and I can't see any obvious / intentional reason for the change, and so this seems to be a bug or intended regression of behaviour.
I've confirmed in 135 (Dev stream) and 136 (Canary stream) that the same issue occurs, and it seems to be an access violation during start-up sequence.
BrowserMainParts-state=PreBrowserStart BrowserProcessImpl-shutdownstate=running IsOfficialBuild=1 KeepAliveCount=1 KeepAliveRestartCount=0 KeepAliveShuttingDown=0 KeepAlives=BROWSER (1) breadcrumbs=0:00:00 Microsoft.BrowserList.AddBrowser 0:00:00 Microsoft.NewBrowser_App 0:00:00 Microsoft.DeleteProfileHelper.CleanUpDeletedProfiles 0:00:00 Microsoft.DeleteProfileHelper.CleanUpEphemeralProfiles 0:00:00 Startup
browser_window_count=1 channel=canary chrome-trace-id=3787376215627518228 chromium-version=136.0.7053.0 exception_code=0xc0000005
The mini dump generated shows it is a memory access violation.
Unhandled exception at 0x00007FFAACA86B20 (msedge.dll) in 49182983-68ab-4935-8c9e-423db2d69161.dmp: 0xC0000005: Access violation reading location 0x0000000000000010.
Can't see more as don't have access to the symbols files
This issue has been fixed and deployed in Edge Canary (136.0.3195.0 or after). The fix will be ported to Edge 134 and 135 in next two weeks.
This issue has been fixed and deployed in Edge Canary (136.0.3195.0 or after). The fix will be ported to Edge 134 and 135 in next two weeks.
Thanks for the feedback! do you have PR or any official notice about this?
Thanks for the feedback! do you have PR or any official notice about this?
Hi @Shaun-Paine. At the moment, we don't have any public Edge-specific release notes.