We’re using KRE in Azure pipeline. vmImage: 'windows-latest'
Lately, I have been seeing logs that look like Edge Chromium crashed and did not start.
The strange thing is that I have not changed the code and the crashes are not every time.
I ran a test using Edge in a Windows VM and Katalon Studio to try it out, and still sometimes the browser would not launch with the following logs.
Has anyone else had a similar experience?
Katalon Runtime Engine version: 8.6.6
Katalon Studio version: 8.6.8
Log: session not created: Microsoft Edge failed to start: exited normally. (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.)
“edge failed to start: exited normally” with no crash is almost always edge exiting on first launch because of something in the profile or an update, and it is random because it depends on what the hosted runner image is doing at that second. three things that stopped it for us on windows-latest:
give edge a clean private profile per run so the first run wizard and sync prompts never trigger: args --user-data-dir=%TEMP%\edge-%BUILD_BUILDID%, --no-first-run, --disable-features=msEdgeFirstRunExperience (the last one is my read of the flag name, check edge://version on the image).
kill the updater before the tests. windows-latest ships edge with MicrosoftEdgeUpdate scheduled tasks that can replace the binary mid session. a powershell step with Stop-Process -Name MicrosoftEdgeUpdate -Force -ErrorAction SilentlyContinue plus Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\EdgeUpdate -Name UpdateDefault -Value 0 right before katalonc keeps the version stable for the job.
run headless (--headless=new) on the agent, there is no interactive desktop in that session and edge occasionally refuses to create a window there.
if it still happens, add --enable-logging --v=1 to the args and read the edge_debug.log in the user data dir, it says why it exited.