Nw.js: Program doesn't fully quit when a webview's devtools are opened in a webview

Created on 12 Oct 2020  Â·  6Comments  Â·  Source: nwjs/nw.js

NWJS Version : 0.49.0
Operating System : Windows 10

Expected behavior

When all windows in the application are closed, the application closes and the .exe can be run again, deleted etc.

Actual behavior

When all windows are closed, some processes remaining running, preventing the .exe from being run again, deleted etc.

The following processes remain:

image

The bottom process needs to be forced closed for the app to stop running

How to reproduce

  1. Go to the folder with nwjs
  2. Set the package.json main key to index.html
  3. Create index.html with:
<button onclick="browser.showDevTools(true, devtools)">Open</button>
<webview id="browser" src="about:blank"></webview>
<webview id="devtools" src="about:blank"></webview>
  1. Click on the "Open" button
  2. Close the program
  3. Try deleting nw.exe

Note

This only occurs when the second parameter of browser.showDevTools is set.

test-todo

Most helpful comment

This is fixed in git and will be available in the next nightly build.

All 6 comments

The issue is present both on Linux and Windows.

A script to reproduce (works in any nw.js app):

const webviewPage = document.createElement('webview');
const webviewTools = document.createElement('webview');
document.body.appendChild(webviewPage);
document.body.appendChild(webviewTools);
webviewPage.src = webviewTools.src = `https://google.com/`; // init some page
setTimeout(() => { // wait 5s so both pages load
    webviewTools.showDevTools(true, webviewTools);
}, 5000);

After 5 seconds, once you see devTools, close the app. You will see several exe and nw processes in your process list, and won't be able to run the app again unless you kill these processes.

The issue appeared at 0.49.0-beta1 (why is it in downloads and not in git tags???). It is not present on 0.48.4.

@rogerwang, pardon pinging you directly, but this issue could slip out of your attention. And I suppose that the issue where an app cannot be re-launched by a user without proper technical skills, regardless of OS, is a critical one.

The issue is still present in v0.50.2.

Will see it soon. Thanks.

On Mon, Dec 14, 2020 at 6:02 AM Cosmo Myzrail Gorynych aka CoMiGo <
[email protected]> wrote:

@rogerwang https://github.com/rogerwang, pardon pinging you directly,
but this issue could slip out of your attention. And I suppose that the
issue where an app cannot be re-launched by a user without proper technical
skills, regardless of OS, is a critical one.

The issue is still present in v0.50.2.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/nwjs/nw.js/issues/7588#issuecomment-744075590, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABIMGOFVSCS7ACJ64OAN5LSUU2WXANCNFSM4SMHAE2A
.

This is fixed in git and will be available in the next nightly build.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adam-lynch picture adam-lynch  Â·  4Comments

xland picture xland  Â·  3Comments

nawazishali picture nawazishali  Â·  3Comments

bambooCZ picture bambooCZ  Â·  3Comments

Asp3ctus picture Asp3ctus  Â·  4Comments