Skip to content

Too many Windows after macOS restart #7516

Closed
@theDevelopper

Description

NWJS Version : 0.46.3
Operating System : macOS 10.15.5 (latest Catalina)

Expected behaviour

I have an NWJS App running and this App has one visible main window with id and a hidden one with new_instance: true and an id. When restarting the OS with the option to reopen current apps then I expect to have the App opened with one visible main window.

Actual behaviour

When restarting the OS with the option to reopen current apps then I actually see three windows. The main window is there twice (overlaying each other) and the initially hidden window is visible. I assume there is a fourth hidden one.

It looks like the "old" windows are recreated and a new main one started.

How to reproduce

Code:
mac-restart-issue-examle.zip

I have 2 html files. One for the visible window and one for the hidden one. The hidden one is created with JS like this:

nw.Window.open('hidden.html', {
	id: 'hidden',
	show: false,
	new_instance: true,
});

I then download the latest nwjs form the website and put the code inside the nw.app folder and start the app. I see one window as expected. I then restart macOS and I see three windows - how unexpected.

Last time I used this setup was version 0.41.3 and it worked as expected. So somewhere along the line it broke which prevents me form upgrading nwjs.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions