electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

Spectron Broken by Electron v1.5.0 #160

Closed colinskow closed 7 years ago

colinskow commented 7 years ago

After upgrading to Electron v1.5.0 Spectron tests are broken. The selenium driver fails to connect and Spectron launches 10 Electron windows.

Using: MacOS, Node 6.9.4, Spectron 3.4.1

It works as expected again after downgrading to Electron v1.4.15.

https://github.com/electron/electron/issues/8516

(node:2490) UnhandledPromiseRejectionWarning: 
Unhandled promise rejection (rejection id: 1): 
Error: Client initialization failed after 10 attempts: 
RuntimeError Client initialization failed after 10 attempts:
MarshallOfSound commented 7 years ago

From the README

This minor version of this library tracks the minor version of the Electron versions released. So if you are using Electron 1.0.x you would want to use a spectron dependency of ~3.0.0 in your package.json file.

I.e. In order for Spectron to use the correct chromedriver for Electron 1.5.x we need a 3.5.x series of Spectron

/cc @kevinsawicki Can we publish the required minor bump here even through 1.5 is still in beta?

kevinsawicki commented 7 years ago

Can we publish the required minor bump here even through 1.5 is still in beta?

Sure can, will open a pull request now and see if it builds.

kevinsawicki commented 7 years ago

Spectron 3.5.0 has been published, can you give it a try?

colinskow commented 7 years ago

Different error this time... At least it doesn't open 10 electron instances.

(Electron 1.5.0 and Spectron 3.5.0)

(node:10362) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): 
Error: ChromeDriver did not start within 5000ms
colinskow commented 7 years ago

Never mind, it works now. I had to rm -rf node_modules and reinstall to get Electron to get them to upgrade correctly.

zeke commented 7 years ago

I also just ran into ChromeDriver did not start within 5000ms error.

Like @colinskow said rm -rf node_modules && npm i fixed it.

cganpule commented 7 years ago

Still getting same error "Unhandled promise rejection (rejection id: 1): Error: ChromeDriver did not start within 5000ms" using MacOS Capitan electron: 1.6.2 spectron: 3.6.0 Can someone pls. advise