electron-userland / electron-userland/spectron

Chromedriver still runs after app.close() on Windows

Open
#89 0 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

  • spectron 3.2.6
  • Windows 7 amd64
// test.js
var electronPath = require('electron-prebuilt')
var Application  = require('spectron').Application
var delay = require('timeout-as-promise')

let app = new Application({
    path: electronPath,
    args: ['.'],
});

app.start()
    .then(() => {
        console.log('wait 3 sec')
        return delay(3000)
    })
    .then(() => {
        console.log('ask to stop')
        return app.stop()
    })
    .then(() => {
        console.log('stopped')
    })

Output is

wait 3 sec
ask to stop
stopped

The electron app is correctly closed but the chromedriver.exe still runs, and the nodejs script test.js never quits.

This bug does not occurs under Linux (archlinux)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the issue's test.js reproduction on Windows 7 with spectron 3.2.6, then inspect the app.start() and app.stop() lifecycle involved in the example. Done means the Electron app closes, chromedriver.exe exits, and the Node.js process terminates as it does on Linux.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.