RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Message size could not read > Error #236

Open V-H opened 1 year ago

V-H commented 1 year ago

Hi!

First of all: Thanks for that plugin!

TB 115.3.1 / Linux Mint 21.2 Victoria base: Ubuntu 22.04 jammy

When using the Search „Body Regulärer Ausdruck“ with „entspricht“ I found in debug-mode this in the console (see attachment), which appears for any mail in inbox when running the filter for the inbox. (All mails shown in plain text.)

Same when using „Betreff oder Inhalt (Regulärer Ausdruck)“.

Thanks!

DebugLog.txt

RealRaven2000 commented 1 year ago

I have some problems with the debug log it has zero width space characters between every line, I do not know how to remove them, which makes it hard to parse the file. image

Can you edit the log somehow differently or just paste the raw log into a comment? You can highlight it and mark as code, if you like:

image

Make sure you set your server settings to

RealRaven2000 commented 1 year ago

PS: To add / edit the code, please use the github web interface (don't reply with email) - I also fixed some typos in the previous comment. You will only see them on the website.

V-H commented 1 year ago

download full mail to your computer: checked, OK execute AFTER junk controls have run: checked; on test, I run the filter manually

Filter could not read message size for <any subject>! Offline = true 
XPCWrappedNative_NoHelper { folder: Getter, messageKey: Getter & Setter, offlineMessageSize: Getter & Setter, subject: Getter & Setter, QueryInterface: QueryInterface(), setStringProperty: setStringProperty(), getStringProperty: getStringProperty(), getUint32Property: getUint32Property(), setUint32Property: setUint32Property(), isRead: Getter, … }
QueryInterface: function QueryInterface()
accountKey: 
andFlags: function andFlags()
author: 
bccList: 
ccList: 
charset: 
date: 
dateInSeconds: 
effectiveCharset: 
flags: 
folder: 
getAuthorCollationKey: function getAuthorCollationKey()
getRecipientsCollationKey: function getRecipientsCollationKey()
getStringProperty: function getStringProperty()
getStringReference: function getStringReference()
getSubjectCollationKey: function getSubjectCollationKey()
getUint32Property: function getUint32Property()
isFlagged: 
isKilled: 
isRead: 
lineCount: 
markFlagged: function markFlagged()
markHasAttachments: function markHasAttachments()
markRead: function markRead()
messageId: 
messageKey: 
messageOffset: 
messageSize: 
mime2DecodedAuthor: 
mime2DecodedRecipients: 
mime2DecodedSubject: 
numReferences: 
offlineMessageSize: 
orFlags: function orFlags()
priority: 
properties: 
recipients: 
setReferences: function setReferences()
setStringProperty: function setStringProperty()
setUint32Property: function setUint32Property()
subject: 
threadId: 
threadParent: 
toSource: function toSource()
<get accountKey()>: function accountKey()
<set accountKey()>: function accountKey()
<get author()>: function author()
<set author()>: function author()
<get bccList()>: function bccList()
<set bccList()>: function bccList()
<get ccList()>: function ccList()
<set ccList()>: function ccList()
<get charset()>: function charset()
<set charset()>: function charset()
<get date()>: function date()
<set date()>: function date()
<get dateInSeconds()>: function dateInSeconds()
<get effectiveCharset()>: function effectiveCharset()
<get flags()>: function flags()
<set flags()>: function flags()
<get folder()>: function folder()
<get isFlagged()>: function isFlagged()
<get isKilled()>: function isKilled()
<get isRead()>: function isRead()
<get lineCount()>: function lineCount()
<set lineCount()>: function lineCount()
<get messageId()>: function messageId()
<set messageId()>: function messageId()
<get messageKey()>: function messageKey()
<set messageKey()>: function messageKey()
<get messageOffset()>: function messageOffset()
<set messageOffset()>: function messageOffset()
<get messageSize()>: function messageSize()
<set messageSize()>: function messageSize()
<get mime2DecodedAuthor()>: function mime2DecodedAuthor()
<get mime2DecodedRecipients()>: function mime2DecodedRecipients()
<get mime2DecodedSubject()>: function mime2DecodedSubject()
<get numReferences()>: function numReferences()
<get offlineMessageSize()>: function offlineMessageSize()
<set offlineMessageSize()>: function offlineMessageSize()
<get priority()>: function priority()
<set priority()>: function priority()
<get properties()>: function properties()
<get recipients()>: function recipients()
<set recipients()>: function recipients()
<get subject()>: function subject()
<set subject()>: function subject()
<get threadId()>: function threadId()
<set threadId()>: function threadId()
<get threadParent()>: function threadParent()
<set threadParent()>: function threadParent()
<prototype>: Object { … }
XPCWrappedNative_NoHelper { Init: Init(), QueryInterface: QueryInterface(), GetWeakReference: GetWeakReference(), biffState: Getter & Setter, clearNewMessages: clearNewMessages(), server: Getter, URI: Getter, sortOrder: Getter & Setter, prettyName: Getter & Setter, flags: Getter & Setter, … }
filtaquilla-util.js:502:17
FiltaQuilla 16:44:0.592  [10 ms]   
 NS_ERROR_ILLEGAL_VALUE: Non-zero amount of bytes must be specified
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:507
    subjectBodyRegex_match chrome://filtaquilla/content/filtaquilla.js:1692
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:282:13

I also attached the edited txt and the export from the console. console-export-2023-10-17_11-42-14-last_entry.txt DebugLog.txt

Hope this will help...

`

RealRaven2000 commented 1 year ago

Ok, it just seems that the message database is either broken or not read when Thunderbird executes the filter. The structure of a filter action expects a working message header as a parameter. This would include having members such as messageKey and messageId - these are all empty in your case. I don't have much of an idea what might cause this - can you try "repair folder" on your inbox?

note that all the code that happens beforehand happens in the compiled parts of Thunderbird (written in C++ and converted to machine code), where Add-ons (JavaScript, interpreted at runtime) have no access.

V-H commented 1 year ago

I called "repair folder", run the filter again and still there is the error.

Next step, I think, is to deactivate other Addons? Does an Addon exist, which I can use to deactivate Addons all at once and enable one after the other, just like Wordpress troubleshot-mode?

RealRaven2000 commented 1 year ago

I don[t think deactivating other Add-ons will help much, unless they are

The filter stuff is hidden deep in the code, it's not accessible via APIs currently so I wouldn't think pure (permissions based) Add-ons can have any influence here.

Does an Addon exist, which I can use to deactivate Addons all at once and enable one after the other, just like Wordpress troubleshot-mode?

not that I know. do you have that many? you can probably ignore all mail extensions that aren't experimental. Maybe you can start Thunderbird in safe mode and then just activate FiltaQuilla...

V-H commented 1 year ago

OK, thank you. If I find time, I will test it in safe mode.

Experimental Addons I don't have and just one or two who could work with filters...

RealRaven2000 commented 1 year ago

Maybe take a look at any special accounts (such as OWL / Exchange) which may not synchronize the email in expected ways...

V-H commented 1 year ago

I don’t use special accounts and load my mails by POP from my hosted email server, where the mails are not stored. There are IMAP accounts too, just to handle mails from different devices than my laptop.

Just for fun, I've tested it with ".*" as regex term, where I get no error. This shows the console log:

FiltaQuilla [logTime init]
 fq_FilterEditor.js - start... filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.207  [1 ms]   
 fq_FilterEditor.js - Finished. filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.249  [42 ms]   
 Mutation observer (childList), check for patching: [object XULElement] filtaquilla-util.js:282:13
mutation observer patched: [object XULElement] fq_FilterEditor.js:784:25
FiltaQuilla 15:8:19.252  [3 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.252  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.252  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.253  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.253  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.253  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.254  [1 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.254  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.255  [1 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.255  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.257  [2 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.257  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.257  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:19.258  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 15:8:25.192  [5934 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 15:8:25.193  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13

Does this help?

RealRaven2000 commented 1 year ago

These log outputs are just from you editing the filter, it's not related to execution of the filter. If you don't get errors with "." you will still see the output of empty message headers when the filter executes, but `.` matches always and thus will return true on an empty string.

I would not expect "Filter could not read message size" if you run the filter manually on a message? I would assume this happens on incoming emails only?

V-H commented 1 year ago

Checked: Filter could not read message size occurs when I run the filter manually on the inbox as well as when a mail comes in.

RealRaven2000 commented 1 year ago

Right, so there is something wrog with the message database. Thunderbird is planning to completely rewrite this... but apart from repair folder or deleting the index file (.msf) I cannot think of any way to address this.

V-H commented 1 year ago

OK, that’s bad... was so happy to found something to work with regex in filters...

Thanks for support, so far!

V-H commented 1 year ago

OK, I just deleted all my *.msi-files and that seems to have an effect. On one mail the filter had worked. So I tried it again, run the filter manually and get this:

FiltaQuilla [logTime init]
 fq_FilterEditor.js - start... filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.740  [1 ms]   
 fq_FilterEditor.js - Finished. filtaquilla-util.js:282:13
Uncaught Error: Component returned failure code: 0x80550005 [nsIMsgFolder.msgDatabase]
    findTemplates chrome://messenger/content/searchWidgets.js:1401
    hideInvalidActions chrome://messenger/content/searchWidgets.js:1290
    connectedCallback chrome://messenger/content/searchWidgets.js:1230
    connectedCallback chrome://messenger/content/searchWidgets.js:1454
    initializeDialog chrome://messenger/content/FilterEditor.js:382
    filterEditorOnLoad chrome://messenger/content/FilterEditor.js:90
    onEditFilter chrome://messenger/content/FilterListDialog.js:419
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
2 searchWidgets.js:1401
FiltaQuilla 10:13:23.825  [85 ms]   
 Mutation observer (childList), check for patching: [object XULElement] filtaquilla-util.js:282:13
mutation observer patched: [object XULElement] fq_FilterEditor.js:784:25
FiltaQuilla 10:13:23.828  [3 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.828  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.829  [1 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.829  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.829  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.830  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.830  [0 ms]   
 Mutation observer (childList), check for patching: [object XULElement] filtaquilla-util.js:282:13
mutation observer patched: [object XULElement] fq_FilterEditor.js:784:25
FiltaQuilla 10:13:23.832  [2 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.832  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.832  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.832  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.832  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.833  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.833  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.833  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.833  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.834  [1 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.834  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.834  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.834  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.834  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.837  [3 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.837  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.837  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.837  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.838  [1 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.838  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.838  [0 ms]   
 attribute changed: filtaquilla@mesquilla.com#subjectBodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:23.838  [0 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
Element.releaseCapture() sollte nicht mehr verwendet werden. Verwenden Sie Element.releasePointerCapture() stattdessen. Weitere Informationen unter https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture menupopup.js:160:13
FiltaQuilla 10:13:41.491  [17653 ms]   
 attribute changed: filtaquilla@mesquilla.com#bodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:41.493  [2 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
FiltaQuilla 10:13:45.317  [3824 ms]   
 attribute changed: filtaquilla@mesquilla.com#bodyRegex filtaquilla-util.js:282:13
FiltaQuilla 10:13:45.319  [2 ms]   
 Mutation observer (attribute), check for patching: [object XULElement] filtaquilla-util.js:282:13
Filter could not read message size for =?UTF-8?B?RlJJVFohQm94LUluZm86IE51dHp1bmdzLSB1bmQgVmVyYmluZHVuZ3NkYXRlbiB2b20gMTguMTAuMjAyMw==?=! Offline = true 
XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), setStringProperty: setStringProperty(), getStringProperty: getStringProperty(), getUint32Property: getUint32Property(), setUint32Property: setUint32Property(), isRead: Getter, isFlagged: Getter, isKilled: Getter, markRead: markRead(), markFlagged: markFlagged(), … }

XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), URI: Getter, name: Getter & Setter, prettyName: Getter & Setter, abbreviatedName: Getter, setPrettyNameFromOriginal: setPrettyNameFromOriginal(), parent: Getter & Setter, messages: Getter, Init: Init(), startFolderLoading: startFolderLoading(), … }
filtaquilla-util.js:502:17
FiltaQuilla 10:14:0.607  [93581 ms]   
 NS_ERROR_ILLEGAL_VALUE: Non-zero amount of bytes must be specified
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:507
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1644
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:282:13
Filter could not read message size for =?UTF-8?B?RlJJVFohQm94LUluZm86IE51dHp1bmdzLSB1bmQgVmVyYmluZHVuZ3NkYXRlbiB2b20gMTguMTAuMjAyMw==?=! Offline = true 
XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), setStringProperty: setStringProperty(), getStringProperty: getStringProperty(), getUint32Property: getUint32Property(), setUint32Property: setUint32Property(), isRead: Getter, isFlagged: Getter, isKilled: Getter, markRead: markRead(), markFlagged: markFlagged(), … }

XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), URI: Getter, name: Getter & Setter, prettyName: Getter & Setter, abbreviatedName: Getter, setPrettyNameFromOriginal: setPrettyNameFromOriginal(), parent: Getter & Setter, messages: Getter, Init: Init(), startFolderLoading: startFolderLoading(), … }
filtaquilla-util.js:502:17
FiltaQuilla 10:14:0.613  [6 ms]   
 NS_ERROR_ILLEGAL_VALUE: Non-zero amount of bytes must be specified
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:507
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1644
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:282:13

This uncaught error have anything to do with your plugin?

Thanks, again!

(On the fly: In my case it would be nice, to see in the debug log which mail is actually processed, as I can see it in Filter could not read message size...)

RealRaven2000 commented 1 year ago

So there still are 2 exceptions thrown by Thunderbird - the first one seems to do with editing the filter in the editor. (Can you export the filter with quickFilters?) Not 100% what is happening, but can you make sure that FilatQuilla has the option for whatever pattern you are using enabled, e.g. body regex:

image

Secondly, the "Filter could not read message size..." still points to something not coming back correctly from the message database., I was able to mime decode the title of the message using this online decoder.

FRITZ!Box-Info: Nutzungs- und Verbindungsdaten vom 18.10.2023!

This is the code that doesn't return a message size:

    let hasOffline = folder.hasMsgOffline(aMsgHdr.messageKey);
    let messageSize = hasOffline
      ? aMsgHdr.offlineMessageSize
      : aMsgHdr.messageSize;
    var data;
    if (!messageSize) {
      if (FiltaQuilla.Util.isDebug) {
        console.log(`Filter could not read message size for ${aMsgHdr.subject}! Offline = ${hasOffline}`, aMsgHdr, folder);
      }
    }

I would say the best way forward would be if you could export the email (as file.eml format) and the filter and send them to me. If you like you can do that off list to the support email, just reference [Filtaquilla] issue 236, then I can test that here.

Here is a test version that shows the decoded subject line, with all the latest patches included: filtaquilla-4.0pre20.zip


To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 commented 1 year ago

PS: to export the filter, install quickFilters, select the filter and the Hold CTRL and click on the backup button:

image

If you need a quickFilters Pro license, give me a shout off list!

V-H commented 1 year ago

OK, thank you for support!

Before I send the mail and filter I want to notice, that the Mail twiced — I checked it with a file comparer, they are really identical.

So, the question is: Could it be, that there's a duplicate-problem when retrieving the database?

mjpatric commented 1 year ago

I'm getting essentially the same behavior with my pop account where I fully download every message (in fact, I remove it from the server immediately after retrieval).

Anyway...this part of bodyMimeMatch:

/*** READ body ***/
let hasOffline = folder.hasMsgOffline(aMsgHdr.messageKey);
let messageSize = hasOffline
  ? aMsgHdr.offlineMessageSize
  : aMsgHdr.messageSize;

(see attached txt files for the aMsgHdr and the aMsgHdr.folder objects from the debug console)

But, to get to the point, in my case, aMsgHdr.messageSize = 11300 and aMsgHdr.offlineMessageSize = 0 and, in the other object logged in the console entry, the "Inbox" folder object I think...supportsOffline = false.

I've tried toggling offline & online status, as well as selecting "download" messages when setting tbird to explicitly offline/online in general settings (see attached screenshot).

aMsgHdr.txt aMsgHdr-folder.txt Ws204_1697719676

RealRaven2000 commented 1 year ago

But, to get to the point, in my case, aMsgHdr.messageSize = 11300 and aMsgHdr.offlineMessageSize = 0 and, in the other object logged in the console entry, the "Inbox" folder object I think...supportsOffline = false.

We could try and add a fallback to test this case?

RealRaven2000 commented 1 year ago

But, to get to the point, in my case, aMsgHdr.messageSize = 11300 and aMsgHdr.offlineMessageSize = 0 and, in the other object logged in the console entry, the "Inbox" folder object I think...supportsOffline = false.

We could try and add a fallback to test this case?

let's try it!

filtaquilla-4.0pre21.zip

this will fall back to the other message size (!hasOffline) - after all reading the size is the only place where the parameter is actually used - all the other code is the same.


To install the version above, download the zip file and then drag the file into Thunderbird Add-ons Manager. Do not extract contents, it will not install that way. (Github does not allow xpi files in comments but technically a zip file is the same)

mjpatric commented 1 year ago

Did the drag & drop (after unblocking in win explorer), and looked like it worked initially but, the settings are looking a little raw (see screenshot), and despite being able to check the appropriate boxes, the changes aren't retained; going back into settings has everything unchecked again. Ws204_1697738859

Edit - here's the full console export for the 4.0pre21 after installing & relaunching:

console-export-2023-10-19_14-15-44.txt

RealRaven2000 commented 1 year ago

Sorry about that, Syntax error! I forgot a closing bracket and never test installed. Fixed version below:

filtaquilla-4.0pre22.zip


To install the version above, download the zip file and then drag the file into Thunderbird Add-ons Manager. Do not extract contents, it will not install that way. (Github does not allow xpi files in comments but technically a zip file is the same)

mjpatric commented 1 year ago

That works. Body Regexp match is now working for me.

Edit - I guess here's the console export for posterity: console-export-2023-10-19_14-49-34.txt

RealRaven2000 commented 1 year ago

thanks for sending the eml. I can actually reproduce an error when reading: image

from the imported mail I am getting a readout size of 107808 bytes: image

the error it throws when it is the generig NS_ERROR_FAILURE - apparently if the number is too high for the data. Might be something that was triggered by me importing the edited email (?) image

V-H commented 1 year ago

So, I've installed pre22 and when I call the filter manually, it works.

Tomorrow I'll see if it also works on incoming mails — but I think it will run.

Thanks for support!

RealRaven2000 commented 1 year ago

Great! I think I will include this in patch the next version, provided you don't get any major hiccups over the next few days.

V-H commented 1 year ago

I've checked it and well, it also works on incoming mails!

So, thank you again for that useful plugin and for the great support!