Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win11] Closing the launcher minimises to system tray then allows starting more than one instance #153

Open
ThetaSinner opened this issue Apr 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ThetaSinner
Copy link
Member

Describe the bug

When I close the launcher on Windows it actually minimises to the system tray. There is no indication that this is the intended behaviour of the close button and thinking its closed, when I then try to launch a new instance it will never load.

To Reproduce

Start the launcher
first-launch

Then close it using the close button on the main window
close-app

This leaves everything running, but not visible (it's inside the 'Show hidden icons' section of my system tray)
stays-running-in-system-tray

Now use the start menu or desktop icon to launch a second instance of the launcher. This results in two instances
launch-from-start-menu-two-copies

If you try to log into the second instance it will never load, it just stays on the loading screen
one-stays-loading

To get back to a good state, I have to either quit from the system tray (if I know it's there) or kill from the task manager to get back to a state where nothing is running
kill-from-task-manager

Then I can get back to a good state where only one instance is running
back-to-okay-after-kill

Expected behavior

  • When I try to launch a second instance, the already running launcher should be restored from the system tray rather than starting a new instance.
  • It would be nice to be notified the first time I try to close the window that it is going to the system tray and be given an explanation of why it wants to keep running.

Logs

The launchers share a log file, but this appears to be all that comes out of the second instance

[2023-04-03T10:16:24.345396800+01:00] INFO - Launch setup successful
[2023-04-03T10:16:27.031010+01:00] ERROR - [LAIR] {"error":"EIO"}
[2023-04-03T10:16:27.033965600+01:00] INFO - [LAIR] Terminated(TerminatedPayload { code: Some(0), signal: None })

Desktop (please complete the following information):

  • OS: Windows 11
  • Holochain Launcher Version: v0.9.4 with holochain beta v0.1.3 and lair keystore v0.2.3
@ThetaSinner ThetaSinner added the bug Something isn't working label Apr 3, 2023
@matthme
Copy link
Collaborator

matthme commented Apr 3, 2023

Yes this is indeed especially confusing on Windows since the system tray is not really visible. A note asking whether to keep the Launcher running in the background or quit it completely would probably be better.
It is however intended that multiple Launcher instances can run in parallel, potentially with different profiles. Maybe a dialog asking whether to open the running instance or a new one would be ideal. And obviously it should not fail on startup when trying to launch a second instance.

@matthme
Copy link
Collaborator

matthme commented Aug 10, 2023

The part where opening the launcher if there is already an instance running fails has been addressed by using tauri-plugin-single-instance (69372b2) and will be part of the next release.

@ThetaSinner
Copy link
Member Author

Awesome! Looking forward to having that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants