Spectron Integration Test Failing on travis

While running Spectron test for my electron app it is failing with the following error.
The test is failing to run on Windows OS on travis but it running successfully on my windows laptop.

Error Message:

Client initialization failed after 10 attempts: RuntimeError Client initialization failed after 10 attempts: Error: unknown error: Chrome failed to start: exited normally
      (chrome not reachable)
      (The process started from chrome location C:\Users\travis\build\aws-dynamodb-workbench\DataModeler\node_modules\spectron\lib\launcher.bat is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
      (Driver info: chromedriver=69.0.3497.106 (857b284701ddf7bef0f14fa76416cf7ca786b411),platform=Windows NT 10.0.17134 x86_64)

      at new RuntimeError (node_modules/webdriverio/build/lib/utils/ErrorHandler.js:143:12)
      at Request._callback (node_modules/webdriverio/build/lib/utils/RequestHandler.js:318:39)
      at Request.self.callback (node_modules/request/request.js:185:22)
      at Request.<anonymous> (node_modules/request/request.js:1161:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1083:12)

This doesn’t happen on Mac build.

Hey @shubh13september,

Would you mind providing logs of your Mac OSX build, and your Windows OS build?


Hi Montana,

I have the same problem as OP, the Spectron Integration tests run successfully on Windows locally and with the Mac travis build, but not with the Windows Travis build. I have the same error message and was wondering if there was ever a solution found to this thread.

Here are my Mac build logs MacLogs and my Window build logs WindowLogs. I apologize for the warnings there’s quite a bit of scrolling to be done.

I’m also quite new to Travis CI and this codebase so it’s certainly possible I made some silly mistake. Here’s my .travis.yml and where I’m initializing the application and erroring when .start() is called:

I added the choco install lines to the travis.yml and the chromeDriverArgs to application as a hail marry so I have tried without them and no luck. I appreciate any advice you might have. Thanks

Is it possible that this is caused by Travis switching from Windows Server 1803 to 1809?

I have a build (master) for a branch that has not been updated since January. It runs just fine even if I “Restart” the build now. However, I created a new branch (build_test) on the exact same commit as master (so the code is identical). The only thing I can see different between the two builds is that master is running on windows 1803-containers and build_test is running on windows 1809-containers.

(Also worth noting that on both branches, the tests run just fine on the linux and osx containers.)

Looks like the change from 1803 > 1809 happened after the OP, so maybe this is not right. I still cannot think of any other different between my master build and my build_test build…