[imap-js] wrongly stores invalid message in cache
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(thunderbird_esr115- wontfix)
People
(Reporter: john, Assigned: john)
References
Details
Attachments
(2 files)
While debugging Bug 1851074 I also checked how the js version of our IMAP implementation is handling the situation and found a strange behavior in ImapChannel.jsm:onCacheEntryAvailable (link)
STR
-
setup the sync settings of an IMAP account as shown in the attached image
-
set a breakpoint in
onCacheEntryAvailable -
send yourself a couple of test messages which have an attachment to make sure they are larger than 1KB and hit the no-download-criteria
-
cycle through the messages and observe the
newandstatusparameters ofonCacheEntryAvailable -
statuswill always be 0 andnewwill be true the first time we view a message -
once
newis false, the message will be pulled from_readFromCacheStreamin the last line ofonCacheEntryAvailable -
restarting Thunderbird will make
newtrue again when opening a message for the first time -
make sure all messages have been viewed at least once and disconnect your network
-
the messages are still pulled from the cache
-
keep the network disabled and restart TB
-
again cycle through the messages
-
when accessing a message for the first time, parameter
newwill be true and the function tries to read the message from the server and fails (there is a connection error) but it looks like it saves an empty msgHdr in the cache -
any follow up access will not trigger a connection error, because it pulls the empty header from the cache and returns the entire operation as a success
-
enable your network connection again
-
the messages will still not show up, because it continues to pull the empty msgHdr from the cache.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
•
|
||
We should not store empty message headers in case of connection errors and keep reporting the connection errors on all follow-up read requests, until the connection comes back again.
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
•
|
||
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/a51fb7ea975c
Remove invalid cache, if message could not be fetched from server. r=mkmelin
Updated•2 years ago
|
Updated•2 years ago
|
Description
•