Spectron launches 10 windows; hangs and fails with Client initialization failed after 10 attempts
Asked Answered
F

1

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.

Familiar answered 1/3, 2018 at 22:48 Comment(4)
Can you share your test file here.So,that it will be helpful for analysisRacine
I have faced the same problem. It's only happen on Windows 10.Ellis
happened to me on Ubuntu as wellJarvey
still happening to me on OSX electron 6.0.9 and spectron 8.0.0Aaron
A
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

Accession answered 27/10, 2019 at 14:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.