Open Bug 877113 Opened 7 years ago Updated 6 years ago

In Unified Sent folder, imap message when clicked on disappears [row invalidation?


(Thunderbird :: Folder and Message Lists, defect)

31 Branch
Not set


(Not tracked)



(Reporter: mustelator, Unassigned)



(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0 (Beta/Release)
Build ID: 20130429095635

Steps to reproduce:

Sending message via IMAP account.

Actual results:

When is sended and go to the unified Sent folder, it showed correctly. Well, I click for read it, and in 5-10 seconds more or less (without receive messages) the message dissapears, scrolling up one line the message board. Without change windows, I can return scroll down the message board this line and the message exist. I can re-read and now no dissapear. Only ocurrs 1 time when just I send new message by IMAP.

Using the Sent account directly without unify, NO ocurrs.

Expected results:

It would no dissapear.
Component: Mail Window Front End → Folder and Message Lists
Is the IMAP Sent folder Offline-Use=On folder?
(Folder Properties/Sychoronization)

If yes, it may be phenomeon like next.
1. After end of mail sending, sent mail copy is saved in Sent folder.
   In this process, following is executed.
1-1. Sent mail data is written in Offline-store file with faked-messageKey.
1-2. This local mail data is used by mail view.
1-3. This local data is passed to Gloda(Global Indexer) to index mail data as quick as possible.
1-4. After it, sent mail data is uploaded to server's Sent Mbox,
     and UID is assigned to the uploaded(append'ed) mail data by server.
1-5. Local mail data by step 1-1 is deleted, and mail data with correct UID is downloaded from server.
If messageKey used by step 1-1 is same as newly assigned UID, thread pane display is perhaps not affected.
If messageKey used by step 1-1 is different from newly assigned UID, thread pane display is perhaps affected, because of different messageKey.
1-6. After download of mail data to Offline-Store file by auto-sync, data is passed to Gloda(Global Indexer) again.
Gloda may skip indexing, because data is not changed from step 1-3.

And, after step 1-1, refresh of View at Unified Sent folder is perhaps invoked, to show newly added mail by step 1-1 as quick as posible.

If "messageKey used by step 1-1 is different from newly assigned UID" occurs at step 1-5, "disappears and re-appears" can be observed.
If this occurs while Unified Sent folder is displayed, "disappears and re-appears" may occur when some events such as click of mail happens, because View refresh of Unified Sent folder is perhaps not done immediately after step 1-5 and is perhaps postponed.

messageKey value is shown as "Order Received" column value, and the messageKey value==UID of mail when IMAP.

To bug opener:
What "Order Received" column value is shown for the mail?
The value is "317". Receiving the message to myself, the value of the Inbox message is "456". 20 seconds for dissapear the message and need to rescroll down. The values of all tests are consecutives.

Ah, more, if I open new window double-clicking on the message, this window is NO closed, but I see the Thunderbird message board that dissapear. Everytime on IMAP.
(In reply to Toni Ballesta from comment #2)
> The value is "317". Receiving the message to myself, 
> the value of the Inbox message is "456".

Oh, sorry for my ambiguous request.
UID of mail in IMAP, which is used as messageKey==Order Received column if IMAP folder, is assigned by IMAP server per "IMAP Mbox".
Please show "Account" column(account name of account definition in Tb), "Location" column(Mbox name. "Sent" in your case always. show if required), and "Order Received" column(messageKey. UID of mail in an Mbox if IMAP), please, to know shown mail is which mail in which Mbox of which account.
Bufff... sorry me because my english is limited. Account column is for example "", Location column is "Sent", Order received column (Orden de Recepción in spanish) is "317". ¿Is this the messageKey? ¿Isn't this column? Where is exactly that you say? For show columns I don't see more options, sorry.
I also think "Orden de Recepción in spanish" is "Order Received" in en-US build.

Following mail in Unified "Sent" is also shown with same messageKey value in each account's Sent folder(if folder View=Unified, folder under Unifiled "Sent". if folder View=All, Sent folder under
  Account        column =
  Location       column = Sent
  Order received column = 317 (messageKey. if IMAP, UID of mail)

When you see phenomenon of "disappers, and found by scroll", is UID of mail changed?

Because you look to use Yahoo! IMAP, "copy mail via Web Interface" is possible. Following may help your analysis of phenomenon.
(0) Disable IDLE command use for test. (Server Settings/Advanced)
    Open Unified Sent-> at a Tab of Tb.
    Keep showing Unified "Sent" at main Tab.
(1) When Tb knows newest(highest) UID=UID(N), next-UID=UID(N+1),
    copy mail to Sent via Web Interface. Call mail-A.
    => UID=(N+1) is used for the copied mail-A at server.
    (Note: other IMAP client can be used)
(2) Send mail by Tb.
    Copy of sent mail is saved in Sent folder locally. Call mail-B.
    Tb may show mail-B as messageKey=UID(N+1) at this stage.
(3) By "append" to Sent followed by mail data upload,
    UID=UID(N+2) is assigned to mail-B in Mbox named Sent at server.
(4) By re-synch with server, Tb knows mail-A=UID(N+1), mail-B=UID(N+2)
    => messageKey==UID-of-mail==UID(N+2) is shown for mail-B
       at Order Received column by Tb.
This is a text-based IMAP mail sended, before the message dissapears from the screen. I can use PGP and allways works the key, but for the test I'm deshabilited, for no complicating the solution.

In the next attachment, I put the message AFTER dissapears.
Information: the UID don't change with dis-reapearing.
And remember, if I select the Sent directly from account (no unified), NO dissapears.
What is your purpose to show mail content?
  Because mail data is not chaged at any step, it's always same
  at local offline-store file, after upload to server, after download
  from server...
Can you check with procedure I wrote in comment #5(messageKey used by Tb for mail-B is perhaps changed due to already added mail-A at server, in order to see detail of phenomena? Because I'm a Japanese, I usually don't force someone to do such test or explicitly request to do such test when I show a possible test procedure to some one ... :-) )
Sorry, I need help. I don't understand. Many messagekeys, many mail-A-B. I'm going mad...

And I'm not developer... can you tell me by examples?
(In reply to Toni Ballesta from comment #11)
> Many messagekeys,

As I already wrote, UID of mail is used for messageKey when IMAP, and UID is incremented by 1 when new mail is added to Mbox by IMAP server.
Sort by Order Received column, to know current highest UID which Tb already obtained.
After 4 more tests, now, the highest UID IMAP Mbox is 2194. From the unified folder, with some POP and IMAP accounts more, no: the highest is 38720527 (38,7 milions of messages?? jajajaja). I think restore all the Thunderbird, because the original configuration I think comes from Netscape 4.7!
(In reply to Toni Ballesta from comment #13)
> the highest is 38720527 (38,7 milions of messages?? jajajaja).

If local mail folder(POP3, Local Folders), messaeKey == Offset in file. So, if file size of Sent folder(Sent, not Sent.msf) is 38MB, such value is shown.
Do you show "Account" column to know which account's mail?

Another simple way to observe phenomenon of "messageKey value is changed".
(1) In Tb, go Work Offline.
  Copy a mail to Sent of Yahoo! IMAP account.
  Because Offline mode, used messageKey is not actual UID. Tb perhaps
  shows same value as Next-UID == Highest UID + 1 in Order Received.
(2) Via Web interface of Yahoo!, copy some mails to Sent.
  HighestUID+1, HighestUID+2, ... is consumed by the copied mails.
(3) In Tb, go Work Online.
    Open Unified Sent-> at a Tab of Tb.
    => Tb connects to server, and obtains actual UID of mails.
Well, all the message are UID+1, UID+2... consecutively. Latest is 2199.

I remarked one thing, is that via web is impossible copy message to Sent. The interface has changed (and before this I don't know if it was possible too). Then, I will redact 2 new tests.

But, the first messages that I copied to Sent IMAP folder manually on Tb, they UID has changed to UID later than the tests messages. Then, this has remained like that:

- Tb offline
- 3 messages copied Offline: 2195 to 2197.
- 2 new redacted messages via Webmail.
- Tb online
- The redacted messages appear on Sent unified (6-8 seconds lag, probably due for many accounts, or not)
- This new redacted mails has values 2195 and 2196.
- The manually copied messages from another account of Inbox has changed to 2197-2199.
Nice test.
      (Key = Order Received column value, UID = actulal UID at server)
         In Tb' Sent folder              actual UID in Sent at server
         Copy 3 mails while Offline
           mail data is held with temporary Key(Tb calls FakedKey)
                                         Redacted 2 messages  
         go back Work Online mode
         mail-1 to mail-3 is uploaded
         mail-1 to mail-3 with temporary key
           is removed from folder.
         mail-3, mail-4, mail-1, mail-2, mail-3
           are fetched(downloaded) from server.
         => After download(re-sync)

In actual case, "Redacted 2 message" in above test doesn't usually occur, because Tb works in Online mode always, and because newly arrived mail in server's Mbox is notified via IDLE and Tb immediately downloads the new mails. So, "UID change" like above doesn't happen in actual environment usually.
However, (a) write sent mail data to Sent folder locally with temporary key, (b) upload mail data to server, (c) delete mail data of temporary key, (d) download mail from server and add the mail to local Sent as new mail with actual UID, are always executed.
This is same as "delete some mails" and "add new mails", although it's confusing because same "Order Received" column value is shown.

Because "Unified Folder" is same as "Search Folder" except some special attributes in "Unified Folder", change at actual mail folder(Search target folder, each account's Sent folder in your case) is not immediately reflected to "Unified Folder"("View Refresh" of View is not always done by Tb automatically/immediately upon any change in actual mail folders).

See "Folder Properties" of "Unified Folder".
Can you find difference from "Search folder" except "Folder name is not changeable"?

The "View Refresh" is always done upon "other folder click at Folder Pane, then click Unified Folder".
You perhaps saw "status before View Refreah" and "status after View Refresh".

By te way, currently, there is no way to request "View Refresh" explicitly with single action. So, "Refresh button" is requested by other bug.
toni, can you reply please to comment 6?
Flags: needinfo?(mustelator)
Whiteboard: [closeme 2015-04-10]
Well, just today, 2 years later, the problem persist. I have now the TB 31.5 on FreeBSD amd64.

The matter is easy. Only using unified style. Writing a new message over "Sent" folder (based on, for example, two accounts), Thunderbird uses my default IMAP account. Then, when message is sended and received ok, I click over him for review. If I am on the same "Sent" folder, on few seconds, the message dissapear but reappers fast, obligating me to click on him again for read.

If I open the "Sent" folder, work directly on the account and I do the same process, the message doesn't dissapear nor reappears.

Only with ANY IMAP account.
Flags: needinfo?(mustelator)
OS: Linux → All
Hardware: x86_64 → All
Version: 17 → 31
Whiteboard: [closeme 2015-04-10]
Summary: Unified folders problem on IMAP sent → In Unified Sent folder, imap message when clicked on disappears [row invalidation?
You need to log in before you can comment on or make changes to this bug.