threema-ch / threema-web

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

Let the app reconnect to the server when not using FCM #482

Open ghost opened 6 years ago

ghost commented 6 years ago

Expected Behavior

Threema Web session restarting needs to work over polling / non-GCM, without me manually picking up my phone to restart the session. It loses the connection all the time (I don't have any such issue ever with any other IM, by the way), and on top of all things it tells me "well we can't do this for you without push, you gotta open up your phone".

Current Behavior

I need to manually fiddle with my phone to restart the session. Not acceptable for regular every day use.

Possible Solution

I might be wrong, but to me as a user the message sounds like "we were too lazy to implement this correctly without GCM". You poll for messages anyway, shouldn't it be trivial to automatically poll for this thing too? And before you say "but then we need to wait for the phone to poll before the session gets restarted", I suggest you add a longer timeout for the session to get thrown out and ask the phone earlier when a session looks about to become stale? If this is truly not possible with your current design, then maybe you should rethink your protocol design.

Steps to Reproduce (for bugs)

  1. Use threema web in combination with a phone without google services installed
  2. Get thrown out (happens all the time, just have some patience)
  3. Get upset because it's handled so poorly and requires manually picking up the phone all the time

Your Environment

dbrgn commented 6 years ago

There's some relevant discussion in #483.

ghost commented 6 years ago

What I don't understand, from my tests (of course I can't test this well as someone without developer insight into this app, so take this with a grain of salt) even a very short interruption of a few seconds won't be recovered from. E.g. wifi -> mobile data will often throw me out, or if there's some other small hiccup. Wouldn't this be trivial to implement, and without even requiring this to work over polling or anything? The phone app could just use a timer after a disconnect to retry automatically for 1-2 times before it gives up and requires me to manually press the button.

dbrgn commented 6 years ago

It wouldn't be trivial, but it would be doable without too much hassle. I'll try to have a look sometime, although the main priority right now is iOS.

ghost commented 6 years ago

Thanks! It would make a huge difference if at least those small hiccups wouldn't happen, those simply add up over time and it does become a bit exhausting.

I know microG would solve this, but since it requires a custom OS build (I'm on LineageOS where it doesn't seem to be supported on the standard builds) and it still appears to rely on google infrastructure stuff, it makes me wary :frowning: so it'd be cool if this worked better without it.

rugk commented 6 years ago

I know microG would solve this, but since it requires a custom OS build (I'm on LineageOS where it doesn't seem to be supported on the standard builds)

What about https://lineage.microg.org/? :smiley:

ghost commented 6 years ago

@rugk that's what I said, isn't it? It's a custom build, a fork of sorts if you will. Android is already splintered enough with LineageOS seemingly sometimes taking a while to get improvements to all devices (not that I'm complaining, that's just the reality of it), I'm not sure I want to move to an even more niche build...

Edit: sorry, realizing custom build sounds like self-built. I meant it's another unofficial build of LineageOS.

rugk commented 6 years ago

Indeed, but it is really only a small "fork". It's rather a automatic build system, which applies a small patch and compiles all LineageOS stuff. You usually get the same updates as with original LineageOS. Maybe 1 or 2 days later, but that's acceptable IMHO.