Franz: Suppress opening multiple instances of Franz

Created on 19 Oct 2017  路  6Comments  路  Source: meetfranz/franz

Feature Description

When attempting to open an instance of Franz, check to see if Franz is already running to prevent opening additional copies.

Motivation and Context

  • Unable to think of a use case where multiple instances of Franz being open is desired or beneficial
  • Most prevalent when "Minimize Franz to system tray" is toggled on - easy to accidentally open multiple instances
  • Additional open copies consume more resources, etc.
  • Can cause multiple session issues with some online providers (ala YouTube/Google Play)
bug help wanted

All 6 comments

I assume you are on Windows?
Also, this happens when you have the app minimized to system tray and click on the taskbar/desktop/start menu icon?

Correct on both counts. Admittedly it's mostly user error there :)

That might be true but it shouldn't happen anyway! But I'm ok with you taking the blame 馃槃

This happens to me more often because I have the icon pinned to the task bar, for convenience -- but I still want the minimize to tray feature so it keeps the app running even if close with the X so there's no delay next time having to reload from scratch.

Thanks!

The beta.11 has indeed fixed the issue of opening multiple windows, but Franz is not opened when running in the background and a shortcut is clicked. It seems to simply suppress instantiating a new instance but not opens the current instance's window.

@adlk Reporting that on Ubuntu Linux I have to comment out this line in /src/index.js for the application to start (I have no other instances running):

if (isSecondInstance) {
  console.log("An instance of Franz is already running. Exiting...")
  // app.exit()
}

which was added in this commit: https://github.com/meetfranz/franz/pull/78/commits/2ae409e1f2622b509703ed814d3aa8f4e136d09a

It looks like it is related to this issue: https://github.com/electron/electron/issues/9880

And it seems like it should have been fixed in electron v1.7.8.

Please let me know if you need any other info to help resolve this.

Was this page helpful?
0 / 5 - 0 ratings