bokuweb / karma-nightmare

⚡ A Karma plugin. Launcher for Nightmare
52 stars 5 forks source link

Hanging electron process after infinite loop #11

Open nicojs opened 7 years ago

nicojs commented 7 years ago

When killing karma if nightmare hangs in an infinite loop it does not seem to stop the electron process.

Reproduction steps:

  1. Create an infinite loop in a regular test
  2. Start karma the normal way
  3. Wait for this message (or simular)
    Electron 1.6.6 (Windows 10 0.0.0): Executed 0 of 3 SUCCESS (0 secs / 0 secs)
    Electron 1.6.6 (Windows 10 0.0.0) ERROR
    Disconnected, because no message in 10000 ms.
  4. Kill the process (ctrl+c)

Open your task manager. The electron process hangs.

Steps 1 and 2 can be done using

git clone https://github.com/nicojs/stryker-miniq-demo
cd stryker-miniq-demo
npm i
npm run karma

ENV: win 10 x64, node 7.9

Original issue reported here: https://github.com/stryker-mutator/stryker/issues/289#issuecomment-297485151 by @unlight

bokuweb commented 7 years ago

@nicojs Thanks for your report and reproduction steps. I'll do investigation.

Related? https://github.com/segmentio/nightmare/issues/688

bokuweb commented 7 years ago

@nicojs I've fixed process termination. Please try v0.4.10.

nicojs commented 7 years ago

I've just tried it but there still seems to be a hanging elektron process after killing karma with ctrl+c.

hanging-elektron-app


nicoj@NicoJ02 MINGW64 /c/z/github/nicojs/stryker-miniq-demo (master)
$ npm ls karma-nightmare
stryker-miniq-demo@0.0.0 C:\z\github\nicojs\stryker-miniq-demo
`-- karma-nightmare@0.4.10

nicoj@NicoJ02 MINGW64 /c/z/github/nicojs/stryker-miniq-demo (master)
$ ./node_modules/.bin/karma --version
Karma version: 1.6.0
bokuweb commented 7 years ago

@nicojs Ummmmm, Thanks, I'll continue to investigate.

simondel commented 6 years ago

Hi! Is there any update on this?