threema-web
threema-web copied to clipboard
Persistent session across multiple connections
We have and we always will have issues with Threema Web losing the connection to the app for several reasons:
- The app is being suspended,
- the network of the browser side changes,
- the network of the app side changes, or
- (buggy implementations).
While 3. and 4. could potentially be improved by supporting ICE restarts, making the session persistent across multiple connections would be a solution for all four items. It would also allow for dropping the permanent background connection after a period of inactivity without much of an impact which I think is a vital feature Threema Web should have. The only downside is that this will require a major protocol update along with some clever synchronisation.
Improves #60 and #184. Would also greatly benefit from the early data extension plans @dbrgn and I have forged for SaltyRTC.
Only Android left.
Getting excessively high battery drain on Android 9.0 stable release. Over 20% if I leave it running for most of a workday.
@LtPatterson We are aware of general connectivity issues and the associated battery drain. If you want your individual case investigated, please contact the Threema support directly.
Note for us: We should add statistics (number of received chunks, last received chunk timestamps, number of sent chunks, last sent chunk, rx total, tx total, ...) when resolving this for Android.
Any news?
Not yet but be assured this is on my top N list of things to resolve.
Another note for us: Make sure to push several times (with some backoff mechanism) in order to improve issues mentioned in #106.
I'm not sure this is the right issue for this comment, but it was the best I could find.
tl;dr: Having an active and an inactive session on the phone (sometimes?) draws insane levels of power. phone gets hot and battery dies in 1h. Also: would be nice if you would consider google-free phones in your fix.
Steps to reproduce: I use threema-web on an AOSP device without google play services, i.e. push notifications not available. This makes session resumption with password cumbersome, its easier to just scan a new barcode than typing the password and starting the session manually. This means, I don't use saved sessions but fairly often start one session, "terminate" it by just closing the browser window/PC going to sleep/whatever. Opening a new session, leads to two sessions in the list on the phone, one of them active. In this state, power consumption (sometimes) is so high that my phone gets hot. I think the abandonned session has an orange wifi-like indicator during these times. It would be awesome, if you could solve all this with something that does not rely on push notifications. Or even better: could you just use a push notification server on your own, which is used if google services are not found? That would also fix the regular app, and replace the polling option.
When this is implemented, it would be interesting to see how much this helps with battery drain. Perhaps Threema can do some analysis and statistics on this. :)
@lbort Improving non-FCM is on our list. However, I suggest checking out microG.
@ovalseven8 That cannot really be measured since it means moving from a persistent connection to on-demand... which depends on your demand. :slightly_smiling_face:
Hey @lgrahl,
just wanted to ask cautionly if there is any news about this issue :)
A group of 10 switched from Whatsapp to Threema and four of us just noticed the heavy battery drain when Using Threema Web all day 😅
We're working on something new that will replace Threema Web.
In the meantime, what helps is a stable WiFi connection (less connectivity checks), using Firefox (way less aggressive keep-alive timers) and keeping the phone connected to the PC (or a slow charger) because Android and iOS are less restrictive on background activity when the phone is charging.
Thank you very much for the fast reply!
Okay, I was using it in Franz ... Then I'll switch to Firefox for that, no problem. I already had an stable WiFi Connection. Well, then I have to change my charging behavior 😃
Is there any ETA already when it will be replaced or where I'm able to subscribe for updates?
I can't provide an ETA but you can subscribe to the Threema Channel where any news would certainly be announced.
Hi @lgrahl I noticed what causes the high battery drain, that was not Threema Web alone. As soon as I'm at work and using it the service mdnsd is using quadruble the battery then Threema Web. At Home I don't have this. I guess it's because at work I'm on a different network (Guest WiFi) then my PC using it. 🤔
What are you referring to here? Battery drain on the smartphone or the PC running Threema Web? What kind of system does it run (and what browser, if relevant)?
On the Smartphone and the battery drain.
This high drain from mdnsd is only in my office with the different networks. At home it's not nearly as 5% drain.
Very interesting. Can you reproduce this behaviour when WiFi is off?
Very interesting, I just switched to used mAh and see whats happening with WiFi Disabled:
While beeing WiFi enabled this happens:
Super weird 😅
I have a hunch what this might be. mDNS is used by WebRTC as a privacy measure. I'll see if I can investigate this at some point.
@Hornochs The question now would be: Does the mdns daemon also go berserk when you're not using Threema Web in that network?
@Hornochs The question now would be: Does the mdns daemon also go berserk when you're not using Threema Web in that network?
Thats true, While not using Threema Web mdnsd stays silent.
How's progress going here? There's the new Desktop App which appears to be causing the same battery drain on my Android phone.
Threema Web is in maintenance mode while we are working on a new solution that should resolve some of the long-standing issues we were having with Threema Web, including this one. Threema Desktop 1.x is based on Threema Web, so the same applies to Threema Desktop 1.x.
so what is the state here? It's been two years and with my new Pixel 7a I can't get through the day on my battery charge when using Threema web vs. having 60% left at the end of the day when I don't use it.
I like Threema and pushed my whole family to use it, but this has been a problem for many, many years now and seems to only get worse. If there's no solution for this we'll likely move to Signal
The solution is Multi-Device and Threema Desktop 2.0. Development for Android is currently ongoing.