question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Electron 10.3.0 and Spectron 12.0.0 gives error "Failed to create session"

See original GitHub issue

Hello,

Im trying to run the electron-quick-start app using Electron 10.3.0 and Spectron 12.0.0 under node v12.18.3

Im getting the following error:

Application launch
    1) "before each" hook for "shows an initial window"


  0 passing (1s)
  1 failing

  1) Application launch
       "before each" hook for "shows an initial window":
     Error: Failed to create session.
unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /Users/albertf/Test/electron-spectron-failed-to-create-session-error/node_modules/spectron/lib/launcher.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
      at Object.startWebDriverSession (node_modules/webdriver/build/utils.js:34:15)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

I created a repo for reproducing same error https://github.com/alberto-f/electron-spectron-failed-to-create-session-error

Could someone help me spot what it is wrong in here ? AFAIK Im even using the right versions.

albertf@albertf-mac electron-quick-start % npm ls spectron electron                         
electron-quick-start@1.0.0 /Users/albertf/Test/electron-quick-start
├── electron@10.3.0 
└── spectron@12.0.0 

If you don’t have the time, Could you tell me what version of Spectron should work with the electron-quick-start repo?

Thanks.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

1reaction
dhanyn10commented, Apr 17, 2021

me too.

my package.json

  "devDependencies": {
    "electron": "^12.0.2",
    "electron-builder": "^22.10.4",
    "mocha": "^8.3.2"
  },
  "dependencies": {
    "bootbox": "^5.4.0",
    "bootstrap": "^3.3.7",
    "spectron": "^14.0.0"
  }

here’s the output from github actions

Run npm run test

> electron-with-bootbox@0.0.0 test /home/runner/work/electron-example/electron-example/bootbox
> mocha



  Application launch
    1) "before each" hook for "show an initial window"


  0 passing (6s)
  1 failing

  1) Application launch
       "before each" hook for "show an initial window":
     Error: Failed to create session.
unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /home/runner/work/electron-example/electron-example/bootbox/node_modules/spectron/lib/launcher.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
      at Object.startWebDriverSession (node_modules/webdriver/build/utils.js:34:15)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async Function.newSession (node_modules/webdriver/build/index.js:35:45)
      at async Object.exports.remote (node_modules/webdriverio/build/index.js:53:22)
1reaction
DWboutincommented, Jan 26, 2021

I got the same error, looks like a wrong version of Chrome browser in Spectron launcher https://github.com/electron-userland/spectron/issues/843

Read more comments on GitHub >

github_iconTop Results From Across the Web

unknown error: Chrome failed to start: exited abnormally when ...
i'm trying to test electron spectron testing. my project is very simple, just clone an electron quick start repo then write code to...
Read more >
Electron release notes
getDisplayMedia via a new session handler, ses.setDisplayMediaRequestHandler . #30702; Added support for serialPort.forget() as well as a new event ...
Read more >
Issues - spectron - Electron Userland - Geeks
DEPRECATED: Test Electron apps using ChromeDriver - Electron Userland. ... Electron 10.3.0 and Spectron 12.0.0 gives error "Failed to create session".
Read more >
「個サル」の参加方法
繧ー繝ォ繝シ繝舌 シ,ONE MAN BAND V 10.3.0 keygen,HD繧ェ繝ウ繝ゥ繧、繝ウ繝励Ξ繝シ繝、繝シ シ医ヲ ... ReadMe:Miracle Box Crack 2.82 | Start Button Not Working | Fix Error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found