thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Message inadvertently sent twice

Open stefanangrick opened this issue 7 years ago • 7 comments

When sending emails through K-9 on a Xiaomi Mi Mix2, occasionally the same email is sent twice. This happens both on Wi-Fi and mobile data connections. It is unclear what triggers the issue, but it appears specific to K-9 running on a Xiaomi Mi Mix2, so either the application or the phone, or the combination of the two, may be a cause. The problem does not occur when sending emails through Xiaomi's native email client using the same account, or when using K-9 with the same account on a Xiaomi Mi4 and Xiaomi Mi Max2.

Steps to reproduce

  1. Send email from within K-9.
  2. Check "Sent" folder of account where the message is sent from.
  3. Check inbox of recipient account.

Expected behaviour

One email is sent. The "Sent" folder should contain one copy of the message. The recipient should have received one copy of the message.

Actual behaviour

When the issue occurs, two emails are sent. The "Sent" folder shows two messages with identical subject and body text but with different IDs and different time stamps. The recipient has received the same message twice.

Environment

K-9 Mail version:

K-9 Mail Version 5.600 Installed via F-Droid Note: K-9 is given full permissions and battery management is set to "unrestricted".

Android version:

Xiaomi Mi Mix2 (Chinese version) MIUI 10.2.2.0 Android 8.0.0 Security patch level 2018-12-01 Kernel version 4.4.78-perf-g7ac6a25

Account type:

IMAP account at FastMail

Log

A log illustrating the issue is attached. The problem occurs at timestamp "03-02 11:23" (two emails are sent), but it does not occur at "03-02 11:34" (only one email is sent).

k9-log-subset.txt

stefanangrick avatar Mar 02 '19 04:03 stefanangrick

They are two different messages. Maybe two clicks are registered and two emails are generated.

cketti avatar Mar 08 '19 05:03 cketti

An interesting thought! If there is anything I could try or do to confirm if that is the case, please let me know.

stefanangrick avatar Mar 09 '19 02:03 stefanangrick

When sending mail, K9 always creates a double sended message in the sended mailbox. This happens with a outlook account, I'm using imap in K9

Samsung Galaxy S9 Android 9

rmamail avatar Apr 06 '19 17:04 rmamail

This happens also depending on server account. For example, outlook/hotmail will also produce duplicates sent messages because outlook/hotmail server changes message ids for sent messages. https://github.com/k9mail/k-9/issues/2736

https://github.com/k9mail/k-9/issues/2736#issuecomment-420888838

rancidfrog avatar Apr 06 '19 17:04 rancidfrog

This is not clear: https://github.com/k9mail/k-9/pull/3598#issue-213032549 So, for outlook accounts we need to remove sent folders?

rancidfrog avatar Apr 06 '19 17:04 rancidfrog

I came across these bug reports as well, but I think my issue may be different, since it only occurs on my Xiaomi Mi Mix 2, but not on any other devices.

I noticed that I tend to press the Send button twice in quick succession, a subconscious habit acquired from overriding the empty subject warning ('Subject is empty, click again to send anyway'), but I do it even when it's not actually necessary. Experimenting with this just now it seems that this is indeed what triggers the duplicate email to be sent. Why this only happens on the Mi Mix 2 is unclear though.

stefanangrick avatar Apr 09 '19 22:04 stefanangrick

I've had this issue occur to be both ways (as the sender and recipient), with a Samsung Note 8, and Samsung Galaxy S9, on either side.

I think the problem is caused by tapping the send button twice. The reason this is possible in the first place is because when tapping the send button, nothing happens, so the user is tempted to tap it again and that causes the email to be sent twice. A solution would be to disable the send button once it's been tapped once.

NilsIrl avatar Oct 07 '21 06:10 NilsIrl