You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is nothing stopping you from opening multiple instances of the spa/web-app, which in turn may lead to data corruption issues such as in #2948.
❔ Possible Solution
It should be possible to query if there are any running instances via a BroadcastChannel message. We should be able to ping for any other running instances on startup and abort if we get a response from one.
Flow:
Instance A starts up and pings "existingInstance" message and receives no reply.
Instance A sets up a listener for "existingInstance" that just echos "pong" or something.
Instance B starts up and pings for "existingInstance", and receives "pong" from instance A.
Instance B warns the user there is already a running instance and shuts down.
⤴️ Describe alternatives you've considered
There are some other inter-window/tab communication techniques/apis but BroadcastChannel seems to be the most flexible. it would be possible for example set a cookie or local storage flag but that has issues such as a bad shutdown could leave it in a bad state.
Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!
Problem Statement
Possible solution for #2942
There is nothing stopping you from opening multiple instances of the spa/web-app, which in turn may lead to data corruption issues such as in #2948.
❔ Possible Solution
It should be possible to query if there are any running instances via a BroadcastChannel message. We should be able to ping for any other running instances on startup and abort if we get a response from one.
Flow:
There are some other inter-window/tab communication techniques/apis but BroadcastChannel seems to be the most flexible. it would be possible for example set a cookie or local storage flag but that has issues such as a bad shutdown could leave it in a bad state.
➕ Additional context
Related: #2942
Related: #2948
The text was updated successfully, but these errors were encountered: