threema-ch / threema-web

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

New incoming message not shown #753

Open andyggg opened 5 years ago

andyggg commented 5 years ago

Expected Behavior

New incoming messages should appear in a chat in Threema web.

Current Behavior

Sometimes, after some idle time, new incoming messages don't appear in the chat. However, in most cases it works.

Possible Solution

Work-around: disconnect and re-connect to Threema.

Steps to Reproduce (for bugs)

  1. Run Threema web in a tab In Firefox 65 (64 Bit)
  2. Switch to another tab leaving the chat open
  3. Surf the web in said other tab for 5(?) Minutes
  4. receive a Threema message in the chat
  5. Switch back to Threema-Tab
  6. new message not shown in chat (sometimes! Most times it works)
  7. Switching between chats doesn't help - chat does not properly refresh...

Your Environment

lgrahl commented 5 years ago

Confirmed due to multiple users affected but we are still unable to reproduce it so far.

xan-a-a commented 5 years ago

Just in case any of the Threema devs live in Berlin. I live like an hour away and experience this almost daily. I could call you as soon as it happens again so you could come over and have a look at it while I'm in this "useful state" of being connected yet not connected.

Or if there is anything I could do on my side to help you out, don't hesitate to tell me.

Version 72.0.3626.119 (Official Build) (64-bit) macOS 10.14.3 iOS 12.1.2

dbrgn commented 5 years ago

Are all affected users on iOS?

xan-a-a commented 5 years ago

At least in my group chats, yes. I don't know how you keep the app active on Android, probably a service which is something that iOS doesn't offer. With Whatsapp Web I also get a lot of "Connection lost" messages especially on 2.4ghz Wifis - but at least it's telling me about it so I can hit the home button on my iPhone and connect normally again. It doesn't have to be a popup, WA Web just makes a yellow banner appear on top of the chat list telling you to stay connected. It then tries to reconnect after a couple of seconds - does Threema Web even try that? Or can it not do that because it's not noticing the connection loss? I've noticed the "." behind "Threema" turning yellow or red sometimes but I haven't been able to make something out of it, seems rather random.

It's the same with the case when another session starts, the previous Threema Web session doesn't get notified that it's lost the connection now and you are messaging the void as those messages never make it. Would it be possible to send a broadcast to the old sessions that a new one has been launched?

lgrahl commented 5 years ago

Threema Web for iOS reconnects on demand.

Let's please not get distracted from the core issue which is the loss of incoming messages. :slightly_smiling_face:


We were able to reproduce this once but, unfortunately, Safari discarded the console logs after a while, so we weren't able to look into anything.

For anyone affected that has sufficient knowledge to self-host, please activate the DEBUG as well as MSG_DEBUGGING in config.ts and, once the bug happens, send the browser's console log to *SUPPORT (with timestamps and a rough estimate on when the issue occurred).

lgrahl commented 5 years ago

Status: This unfortunately takes quite a while but we're slowly getting somewhere by improving our debugging facilities.

lgrahl commented 5 years ago

There's a problem in the ARP (https://github.com/threema-ch/app-remote-protocol/pull/5) related to this issue. I will update the web client to implement the new behaviour as specified in this pull request and we'll see if it partially fixes the issue. However, to fully resolve the problem, an iOS app update is required.