Closed Bug 1529791 Opened 6 years ago Closed 1 year ago

folders have no type "virtual" in messages API and such folders can not be listed

Categories

(Thunderbird :: Add-Ons: Extensions API, defect, P2)

Tracking

(thunderbird_esr115 wontfix)

RESOLVED FIXED
121 Branch
Tracking Status
thunderbird_esr115 --- wontfix

People

(Reporter: brummolix, Assigned: TbSync)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

The MailFolder.type (https://thunderbird-webextensions.readthedocs.io/en/latest/accounts.html#accounts-mailfolder) does not have the "virtual" type as it was in legacy plugins.

For example in GMail accounts there are virtual folders that contains some kind of links to other mails.

Additionally, if you call "list" on such a folder you get an error:
folder is null ext-messages.js:95
list chrome://messenger/content/parent/ext-messages.js:95
next self-hosted:1210
list self-hosted:974
result resource://gre/modules/ExtensionParent.jsm:950
withPendingBrowser resource://gre/modules/ExtensionParent.jsm:604
InterpretGeneratorResume self-hosted:1255
next self-hosted:1210
result resource://gre/modules/ExtensionParent.jsm:949
withTiming resource://gre/modules/ExtensionParent.jsm:916
InterpretGeneratorResume self-hosted:1255
next self-hosted:1210
call resource://gre/modules/ExtensionParent.jsm:948
InterpretGeneratorResume self-hosted:1255
next self-hosted:1210

Error: An unexpected error occurred undefined

Expected results:

There should be a type "virtual" and the list function should work.
Or the virtual folders should be at least hidden from the messges API.

Flags: needinfo?(geoff)

Are you referring to the [GMail] folder, or something different? I can reproduce the error (at least I think it's the same error) by calling browser.messages.list on that folder.

I'm not sure hiding virtual folders is the answer as it's probably necessary for things such as the parent folder argument of browser.folders.create but we probably should handle them better for some operations that are inappropriate.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(geoff) → needinfo?(brummolix)

Yes I refer to the [GMail] folder and also the subfolders of [GMail]
In the API I used before web extensions there was a flag Ci.nsMsgFolderFlags.Virtual
I also get the error when calling browser.messages.list(folder)

Flags: needinfo?(brummolix)
Priority: -- → P2
Severity: normal → S3
Duplicate of this bug: 1859038

In current Daily 121 I do not see a GMAIL folder anymore. Is it correct, that virtual folders are only used for searches now?

Flags: needinfo?(brummolix)

The Gmail folder isn't a virtual folder. It's a special type of IMAP folder and we don't display it in the main UI any more, but it should still exist for other purposes. So yes, that is correct, but it's always been correct.

Assignee: nobody → john
Status: NEW → ASSIGNED
Target Milestone: --- → 121 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9b0c9d2e5ab7
Add support for virtual search folders. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

search bugmail for "addons1234" to delete these messages

Flags: needinfo?(brummolix)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: