threema-ch / threema-web

The Threema Web application.
GNU Affero General Public License v3.0
1k stars 107 forks source link

Unclear "session closed" behaviour #694

Open tulssinep opened 5 years ago

tulssinep commented 5 years ago

I am logged into Threema Web on 2 different computers. For Whatsapp, when one computer starts a session, the other one gets kicked out and offers you to either reconnect (kick the other one out) or log out entirely. For Threema, this process seems to work differently.

Expected Behavior

Log into one session, have the other one closed.

Current Behavior

Sometimes I get the expected popup that says Session Closed This session was stopped because you started a Threema Web session in another browser window., often there is no popup, it stays on the "messaging" interface but my messages don't get sent. I noticed that the green header bar can turn red whereas the "newer" session shows green, what exactly does this indicate?

Steps to Reproduce (for bugs)

I could capture a video if you don't believe me but basically

  1. open 2 browsers (or chrome users/ inkognito whatever) and navigate to web.threema.ch
  2. enter a password on both devices
  3. scan the codes
  4. alternate between log ins You will soon enough see occurrences where both sessions coexist but only one can send and receive

Your Environment

dbrgn commented 5 years ago

This behavior can occur if the old session in the browser is not actively connected to the app. This can be seen by the orange dot in the "Threema." logo.

If the old session is connected, then it gets a "close" message from the app, telling it that a new session was started. But if it's not connected, the app would first have to connect to the old session to tell it to close, disconnect, and only then connect to the new session.

The current behavior is definitely not ideal. We'll think about a possible solution.