question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NW2: nw.App.crashRenderer() doesn't kill nw like NW1 does

See original GitHub issue

Via issue #7339

NWJS Version : nw1 vs nw2 behaviour, seemingly independent of nw.js version Operating System : Ubuntu 16.4 LTS

Expected behavior

With nw1, when testing a renderer crash with nw.App.crashRenderer(), the whole nw process dies.

Actual behavior

With nw2, the nw process is not killed completely.

How to reproduce

  • Start the current nw.js version (0.44.2) with the chromium flag --disable-features=nw2.

  • Execute nw.App.crashRenderer(); -> nw completely dies

  • Start the current nw.js version (0.44.2) without the chromium flag --disable-features=nw2.

  • Execute nw.App.crashRenderer(); -> nw doesn’t die, but shows an “Oh Snap” error screen

Related (future) thoughts:

There are probably 2 use cases when a nw renderer dies:

  1. don’t let the user decide on anything, immediately just kill the whole process.
  2. let the user interact & decide and what to do, e.g. let him write some text and allow him to send debugging logs etc.

Maybe it makes sense to handle crashing differently in the future, maybe based on a manifest file parameter, e.g. if kiosk is set, or to make it more explicit, a new parameter? Another idea would be to just execute some “renderer died” middleware code, to let the developer decide what to do.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bodo22commented, Jan 10, 2022

Bumping.

Same behaviour still happening with current build nw.js Version: 0.60.0 tested OSes: ubuntu 16 LTS & ubuntu 20 LTS

1reaction
arudnevcommented, Feb 25, 2020

@rogerwang, I just checked it with the following build on macOS: http://dl.nwjs.io/live-build/nw44/20200225-162000/f721a1faf/v0.44.3/ It still shows “Aw, Snap!” with Close button.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found