Closed Bug 1072322 Opened 10 years ago Closed 9 years ago

[Email] Sometime mail is not deleted

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1116694

People

(Reporter: sharaf.tir, Unassigned)

References

Details

(Whiteboard: [LibGLA, TD-96620, WW, B])

Attachments

(1 file)

STR

1) Configure a gmail account.
2) After syncing, select any mail and delete.
3) Immediately after the message is removed from list, press HOME button
4) Open email app, again
5) Do refresh/sync

Actual behavior:
Deleted email re appears.

Expected behavior
Deleted mail should not be shown.
Whiteboard: [LibGLA, TD-96620, WW, B]
Please identify the exact version of Firefox OS/the email app in use and provide a logcat from a session where you reproduce this.  See https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo for information on how to do that.  Please also make sure to identify the type of account and domain in use so we can identify the server implementation.

The email app is an offline mail client so deletion is actually transformed into two separate stages:
- local: performing the local database modification and updating the UI
- server: performing the operation on the server

We currently don't force the sync process to wait for all of the server operations to be replayed against the folder, so it's possible what you're seeing is:
1) local op runs, message moved/deleted locally
2) refresh runs, messsage re-created because the server claims it exists
3) server op runs, message moved/deleted on server

and then if you were to hit refresh/sync again what would happen is:
4) refresh runs, message removed because it's no longer on the server.


It's also possible something bad is happening to the server op and breaking the deletion, which is much more serious and could happen for any number of reasons (missing trash folder, etc.).  The log will help us distinguish what is happening.
Flags: needinfo?(sharaf.tir)
I used a gmail account for testing. (auto configured)

I am able to reproduce this issue very frequently on v2.0 branch. (original email app, without any modification)

master branch till now I am unable to reproduce it.

Also from your 4 steps, even after I do refresh after say 10 minutes, the message exists.

I am attaching the log for v2.0, please check and let me know if you need any more information.
Flags: needinfo?(sharaf.tir)
Attached file Email delete log
I tested on a Nexus device with Gmail account.

ni? to asuth.
Flags: needinfo?(bugmail)
Thank you for the log, it indeed seems to indicate some type of problem since the server operation did complete operation.  Unfortunately, there is no obvious error and without a protocol trace it's not clear what the problem would be.  I am unable to reproduce locally on a v2.0 flame device with a gmail account after multiple attempts and so will need your assistance.  (I am of course able to temporarily reproduce if I hit refresh before the server operation happens and then the message disappears if I refresh again.  But that's expected and that is definitely not the situation your log shows.)

If you can reproduce and provide me with a protocol trace, that would be ideal.  We have support in v2.0 for doing this via the secret debug mode and our support for circular logging which we dump to the sdcard.  Please see the instructions at https://wiki.mozilla.org/Gaia/Email/SecretDebugMode#Enabling_logging_that_DOES_ENTRAIN_USER_DATA_.28test_mode.29 (and the section on getting to secret debug mode above that and how to get the data off below it).  Once you reproduce the problem you would dump the log to the (internal) storage, extract it, and send it to me at asuth@mozilla.com.  I am suggesting my private email address because the log may contain account passwords and potentially some message data.  Ideally the account you are reproducing on is a test account; if this is a personal account, it's probably preferable to try and reproduce on a test account instead (and not have any personal accounts configured in the email app at the time.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bugmail) → needinfo?(sharaf.tir)
After enabling the logs, the issue is not reproducing easily.
I am checking again, once I am able to reproduce, I will send you the logs
Same for me, I can't delete messages using iCloud (andre.fiedler@me.com) on Firefox OS 2.2 / Nexus 4 (build from master on 2015-01-02). After enabling the secret debug mode all works fine. :/
Same bug for me on zte openc with the last 
2.0 flame dowloaded on mozilla nightly-build repos.
I'm going to dupe this bug over to bug 1116694 since I think we figured out and fixed the likely problems there (and some other potentially correlated complicated situations are now fixed as well).

Specifically, it appears UIDPLUS caused the breakage in the log provided bug 1117479 and this would also explain failures on iCloud (which supports UIDPLUS).  The reason it may seem hard to reproduce is that the UIDPLUS problem should only reproduce in the case where batch deletion is happening; individually deleting messages should work.

The fix is already present on trunk/v3.0 and was landed on v2.2 today and so should be in v2.2 builds starting tomorrow.

André and Sharaf, in the event you are able to reproduce in a build with the fix, please reopen this bug, especially if you are able to provide a logcat!

François, v2.0 is likely to be a different problem, and unfortunately we are unable to provide v2.0 fixes.  My best advice is to remove the account experiencing the problem and to re-add it and that should address the problem.  If the problem reoccurs, please do feel free to capture a logcat and file a new bug and I'll see if there's any type of workarounds I can suggest.  Another possibility is to upgrade the FxOS; I believe it's possible to do this for the ZTE Open C.  http://paulrouget.com/e/openc/ is one page that might be useful, but I must caution you there may be risks!
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(sharaf.tir)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: