iNPUTmice / Conversations

Conversations is an open source XMPP/Jabber client for Android

Home Page:https://conversations.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Message loss

trudnorx opened this issue · comments

Recently, I turned on the battery management features on my device and noticed I was losing some messages. I later found that Conversations states:

"Your device is employing heavy battery optimizations ... which may lead to delayed notifications or even message loss"

Ignore the delayed notifications, which are expected. The fact that the message loss part occurs seems to be improvable on Conversations' part:

  1. There are plenty of messaging apps where you can turn battery management on and you don't lose messages.
  2. Users that are OK with delayed notifications may desire such battery management features. Conversations may use little battery compared to some apps, but on my device it's among the top power hungry ones.
  3. If the app is shutdown by battery management, the XMPP server quickly sets you as offline (in my case, it did) and you should be able to get the messages later on just like you can when you receive messages while disconnected from the server (e.g., device shutdown) for other reasons. Yet, I was losing messages sent after I lost any connection to the server and my status on the server was set to offline.
  4. Server side archiving was on, so Conversations should be able to at least recover the messages from server history (just like it should without it due to reason 3), but it doesn't recover messages from the server archive automatically, nor did I find any option to manually re-check server history. These messages proved unrecoverable by Conversations.
  5. The architectural weaknesses these problems seem to reveal can pose problems with scenarios not related to battery management. Conversations should not experience message loss when the app was unexpectedly off or 'uncleanly' shut down for whatever reason, just like other XMPP clients don't.

Accounts, account, upper right menu, Archiving, is set to Always? You sure?

Server has Carbons?

Any logs from logcat?

You can repro this at will? Eg. Kill app, send message, no message arrives?

/PS: the actual repo is elsewhere, https://codeberg.org/iNPUTmice/Conversations as the Readme says...

Accounts, account, upper right menu, Archiving, is set to Always? You sure?

Yup.

Server has Carbons?

Yep.

Any logs from logcat?

Did not check logs, I expect they may have been deleted by now and I cannot test further due to see below.

You can repro this at will? Eg. Kill app, send message, no message arrives?

From all the testing I performed, the message loss seems to occur immediately when Conversations is unexpectedly shut down, in this case from battery management. It is something that consistently occurred, 100% of the time during the small period of time this circumstance was happening.

This doesn't seem to need further testing given that the Conversations documentation itself notes that this may happen -- a behavior that I consider improvable, given the reasons in my initial post.

I would expect it to also happen from other unexpected shutdown causes, but did not test that.

I don't want to bother with further testing bc I don't have a test device and do not want to interfere with my normal Conversations usage.

If this happens daily, surely logcat will have it, you can expand the log size in Developer options, iirc

The message loss text might be there since 2014 for all I care, these are rarely if ever an occurence.