messenger.folders functions sometimes returns incorrect results
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(Not tracked)
People
(Reporter: G.Gersdorf, Unassigned)
References
Details
Steps to reproduce:
Every now and then TB starts creating a new folder structure on disk (INBOX-n). This is probably due to network timeouts or similar (i'm using internet via conventional satellite). When this happens, the .msf files of subfolders only contains minimal information.
Actual results:
Every query function from the messenger.folders API returns something like 'no messages in the folder', e.g. messenger.folders.getFolderInfo(folder) returns totalMessageCount=0
Expected results:
The API should trigger downloading the folder and return correct information
or
The API should return 'No information available' and provide a function to trigger a download of the folder
| Reporter | ||
Comment 1•1 year ago
|
||
(In reply to Günter Gersdorf from comment #0)
Forgot to mention: 'Keep messages in all folders for this account on this computer' is unchecked
Comment 2•1 year ago
|
||
Is the API NOT reporting the current data which is locally available and what a user looking at that folder at the same time is seing in Thunderbird?
The second part of your report is probably a dupe of Bug 1770970.
I have no idea why your Thunderbird is recreating its folder structure due to shacky internet. But it does not sound good.
| Reporter | ||
Comment 3•1 year ago
|
||
The correct information is returned from the API after the user has opened the folder in the GUI. Is that what you've asked?
Comment 4•1 year ago
|
||
Yes, this is what I assumed. The user opening the folder is triggering a server refresh.
The folders API by design is only returning the current local data. We started to implement server functionality, for example messages.query() has a an online flag in Thunderbird Beta [1], which currently only works for news servers.
I will close this bug as invalid, but link it to Bug 1770970, indicating that we need a function to work on a specific folder, not only on the Inbox.
[1] : https://webextension-api.thunderbird.net/en/beta-mv2/messages.html#query-queryinfo
Description
•