7

Electron v1.8.2 Spectron v3.8.0

Adding spectron tests, but even an extremely basic test fails.

Attempting to run:

const { Application } = require('spectron');

const app = new Application({
  path: './dist/mac/ddev-ui.app/Contents/MacOS/ddev-ui',
});

app.start().then((myApp) => {
  console.log(myApp);
  console.log('Started');
});

Launches 10 instances of my application very quickly and fails out with message:

Client initialization failed after 10 attempts

I've tried downgrading to electron 1.7.9 with spectron 3.7.3 with the same results.

Strangely, setting connectionRetryTimeout to 3000000 does nothing. All app instances start one after each other immediately.

Andrew Tran
  • 274
  • 1
  • 7

1 Answers1

2

In my case this problem was caused by using electron 6.x with spectron 9.x> Switching to spectron 8.x fixed the problem.

Each version of electron should be used with a matching version of Spectron as described in the Spectron documentation here

Giorgio
  • 11,673
  • 12
  • 42
  • 72