RealRaven2000 / FiltaQuilla

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

New bug - body (regex) match throws an error #260

Open RealRaven2000 opened 4 months ago

RealRaven2000 commented 4 months ago

It looks like reading the body (during regular expression matching of body) of IMAP mails, throws an error in 115.10.1, this is caused by a call to

NetUtil.readInputStreamToString()

filtaQuilla [logTime init]
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 11:0:22.277  [0 ms]   
 NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIScriptableInputStream.readBytes]
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:510
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1671
    cmd_applyFiltersToSelection chrome://messenger/content/mailCommon.js:387
    doCommand chrome://messenger/content/mailCommon.js:732
    goDoCommand chrome://messenger/content/globalOverlay.js:99
    onApplyFiltersToSelection chrome://quickfilters/content/quickFilters.js:1065
    doCommand jar:file:///I:/Thunderbird_Profiles/Thunderbird-78-daily/extensions/quickFilters@axelg.com.xpi!/chrome/content/scripts/qFi-messenger.js:121
    oncommand about:3pane:1
filtaquilla-util.js:222:13

relevant code:

bodyMimeMatch: function(aMsgHdr, searchValue, searchFlags) {

...
    let stream = folder.getMsgInputStream(aMsgHdr, {});
    let isError = false;
    try {
      FiltaQuilla.Util.logDebug("Calling NetUtil.readInputStreamToString ...");
      data = NetUtil.readInputStreamToString(stream, messageSize);
    } catch (ex) {
      FiltaQuilla.Util.logDebug(ex);
      isError=true;

      return false; // shit shit shit - reading the message fails.
    } finally {
      stream.close();
    }

therefore regular expression match cannot happen at all.

RealRaven2000 commented 4 months ago

I tested regular expression matching in the latest beta 126.0b1, and it works there. Output:

FiltaQuilla [logTime init]
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 9:49:17.586  [3 ms]   
 testing part [0] ct =  ? filtaquilla-util.js:222:13
FiltaQuilla 9:49:17.587  [1 ms]   
 Found pattern (?!(www\.)?w3\.org)(\b([w]{3}2?\.[a-z0-9]{1,32}\.[a-z]{2,3})\b)|(((https?(:\/\/|%3A%2F%2F))(www\.)|(https?(:\/\/|%3A%2F%2F)))(?!(www\.)?w3\.org)([^\/\?\s]+)[^\s])|(\b([a-z0-9]{2,32}\.info\b))|(\b([a-z0-9]{2,8}\.[a-z]{2}\/[a-z0-9?]{3,32}\b))|(\b([w]{2,3}2\.[a-z0-9]{3,23}\.[a-z]{2,3})\b) with content type: ? filtaquilla-util.js:222:13
FiltaQuilla 9:49:17.588  [1 ms]   
 body matches:  true filtaquilla-util.js:222:13
FiltaQuilla 9:49:17.588  [0 ms]   
 Matches:  mozilla.info filtaquilla-util.js:222:13
xlovinglyx commented 4 months ago

That's a no fix for me.. . looks like my playgrounds with filtaquilla ends here for having used an extension without knowing some regular expressions weren't transmitted to the extension with normal behavior & a normal effective result.

I'm on win8 x64 & for a thousand reasons, & i''ll never toss my customized win8 x64 version for a win10.. . the required os to run TB V126.0b1 & above.

RealRaven2000 commented 4 months ago

That's a no fix for me.. . looks like my playgrounds with filtaquilla ends here for having used an extension without knowing some regular expressions weren't transmitted to the extension with normal behavior & a normal effective result.

I'm on win8 x64 & for a thousand reasons, & i''ll never toss my customized win8 x64 version for a win10.. . the required os to run TB V126.0b1 & above.

Yeah no, actually it also works on Thunderbird 115 - it turned out that just this single folder was broken, the filter worked on other folders with IMAP; not quite sure what broke it thoug and how to repair that. On other profiles I was able to read body without any problems - go figure.

I think one thing we do have is that Thunderbird profiles or even just single folders may "break" (at least from the perspective of filters) from time to time which is really not a good look for Thunderbird. They do work on replacing the GLODA (global data store for all mails) completely but this is going to take a while because they have 20 year old architectural "debt" to Netscape, and they are NOT going to monkey patch but rewrite it from the ground up.

xlovinglyx commented 4 months ago

ok, i'm not a coder, so i understood this: nothing.

nevertheless, u say it could work on 115 ? how ? do u have an update of ur addon ? do i have to do something on the latest stable release ? is there a sort of esr version of thunderbird that could work in win8 x64 ?

u dont provide any fix u just say: it works in 115.

while i gave u error codes & told u it doesnt work..

u also talk a lot about IMAP

& concerning imap: I don't want imap, i never wanted imap, ill never play with imap, & i never think nor dream of imap.

RealRaven2000 commented 4 months ago

This bug (New bug - body (regex) match throws an error) was opened because I could reproduce an exception in one folder on one of my profiles. I thought it was a fundamental problem at first but it was only on one (IMAP) folder. also it is not the same error that you have provided, if this below your error codes dump.

I could not reproduce (= create, generate, manifest into existence) your error on my POP accounts, that's what makes it hard to fix.

(as regards long logs, normally you can first reset the error log, then run your single filter and then capture the error codes, then it won't be super long) just leaving this here in case you sent it to me off list.

image

FiltaQuilla 12:33:29.953 [1 ms] body matches: true filtaquilla-util.js:286:13
Uncaught TypeError: results is null
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:613
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1671
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:613:11
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5063 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.961 [8 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.962 [1 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13

Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5060 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.968 [6 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.968 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.968 [0 ms] Found pattern (?!(www\.)?w3\.org)(\b([w]{3}2?\.[a-z0-9]{1,32}\.[a-z]{2,3})\b)|(((https?(:\/\/|%3A%2F%2F))(www\.)|(https?(:\/\/|%3A%2F%2F)))(?!(www\.)?w3\.org)([^\/\?\s]+)[^\s])|(\b([a-z0-9]{2,32}\.info\b))|(\b([a-z0-9]{2,8}\.[a-z]{2}\/[a-z0-9?]{3,32}\b))|(\b([w]{2,3}2\.[a-z0-9]{3,23}\.[a-z]{2,3})\b) with content type: text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.968 [0 ms] body matches: true filtaquilla-util.js:286:13
Uncaught TypeError: results is null
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:613
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1671
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:613:11
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5163 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.973 [5 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.974 [1 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5120 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.979 [5 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.979 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5192 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.984 [5 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.984 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5250 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.988 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.989 [1 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5246 filtaquilla-util.js:513:19
FiltaQuilla 12:33:29.993 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:29.993 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for [FiltaQuilla] Re: & possible future feature..! 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:508:17
trying to fallback to messageSize: 22476 filtaquilla-util.js:513:19
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5077 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.406 [1413 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.406 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.407 [1 ms] Found pattern (?!(www\.)?w3\.org)(\b([w]{3}2?\.[a-z0-9]{1,32}\.[a-z]{2,3})\b)|(((https?(:\/\/|%3A%2F%2F))(www\.)|(https?(:\/\/|%3A%2F%2F)))(?!(www\.)?w3\.org)([^\/\?\s]+)[^\s])|(\b([a-z0-9]{2,32}\.info\b))|(\b([a-z0-9]{2,8}\.[a-z]{2}\/[a-z0-9?]{3,32}\b))|(\b([w]{2,3}2\.[a-z0-9]{3,23}\.[a-z]{2,3})\b) with content type: text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.408 [1 ms] body matches: true filtaquilla-util.js:286:13
Uncaught TypeError: results is null
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:613
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1671
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:613:11
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5063 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.412 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.412 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5060 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.416 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.416 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.416 [0 ms] Found pattern (?!(www\.)?w3\.org)(\b([w]{3}2?\.[a-z0-9]{1,32}\.[a-z]{2,3})\b)|(((https?(:\/\/|%3A%2F%2F))(www\.)|(https?(:\/\/|%3A%2F%2F)))(?!(www\.)?w3\.org)([^\/\?\s]+)[^\s])|(\b([a-z0-9]{2,32}\.info\b))|(\b([a-z0-9]{2,8}\.[a-z]{2}\/[a-z0-9?]{3,32}\b))|(\b([w]{2,3}2\.[a-z0-9]{3,23}\.[a-z]{2,3})\b) with content type: text/html filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.416 [0 ms] body matches: true filtaquilla-util.js:286:13
Uncaught TypeError: results is null
    bodyMimeMatch chrome://filtaquilla/content/filtaquilla-util.js:613
    bodyRegEx_match chrome://filtaquilla/content/filtaquilla.js:1671
    runSelectedFilters chrome://messenger/content/FilterListDialog.js:758
    oncommand chrome://messenger/content/FilterListDialog.xhtml:1
filtaquilla-util.js:613:11
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5163 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.420 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.421 [1 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5120 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.425 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.425 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5192 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.430 [5 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.430 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5250 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.434 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.434 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for ddd! 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:508:17
trying to fallback to messageSize: 5246 filtaquilla-util.js:513:19
FiltaQuilla 12:33:31.438 [4 ms] found body element in parts[0] filtaquilla-util.js:286:13
FiltaQuilla 12:33:31.438 [0 ms] testing part [0] ct = text/html filtaquilla-util.js:286:13
Filter could not read message size for [FiltaQuilla] Re: & possible future feature..! 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:508:17
trying to fallback to messageSize: 22476

and a few minutes later:

Security Error: Content at moz-nullprincipal:{467b331c-a04c-46de-8f6b-03347728b9ee} may not load or link to mailbox:///C:/Users/Administrator/AppData/Roaming/Thunderbird/Profiles/su7pmwuk.default/Mail/pop.yandex.com/Inbox?number=140&header=quotebody&part=1.2.2&filename=gwwUcscOrsVRDXA9.png. 2
Security Error: Content at moz-nullprincipal:{467b331c-a04c-46de-8f6b-03347728b9ee} may not load or link to mailbox:///C:/Users/Administrator/AppData/Roaming/Thunderbird/Profiles/su7pmwuk.default/Mail/pop.yandex.com/Inbox?number=140&header=quotebody&part=1.2.3&filename=Nuh10iWmnq5PgtKT.png. 2
Uncaught TypeError: messenger.messageServiceFromURI is not a function
    loadOriginalMsgSSHeader chrome://subjects_prefix_switch/content/subjects_prefix_switch.js:345
    delayedInit chrome://subjects_prefix_switch/content/subjects_prefix_switch.js:265
    init chrome://subjects_prefix_switch/content/subjects_prefix_switch.js:47
subjects_prefix_switch.js:345:36
Security Error: Content at moz-nullprincipal:{3fa2dafb-2e47-4e36-ba85-209a9f05621e} may not load or link to chrome://filtaquilla/content/filtaquilla-util.js.
Security Error: Content at moz-nullprincipal:{3fa2dafb-2e47-4e36-ba85-209a9f05621e} may not load or link to chrome://subjects_prefix_switch/content/subjects_prefix_switch.js.
Uncaught TypeError: subMain.rdi_curr is null
    onSend chrome://subjects_prefix_switch/content/subjects_prefix_switch.js:515
    CompleteGenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6346
    GenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6308
    AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:10739
subjects_prefix_switch.js:515:9

it is good to attach error logs to the bugs that they deal with, very much superiour to sending many emails back and forth.

it will be helpful to run a single test by running a non-working filter on a single message and only capture the errors for that. The version below uses another method for determining message size, maybe you can go ahead and test it with that:

filtaquilla-4.1pre9.zip


To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)

xlovinglyx commented 4 months ago

Again.. not working, check your email..

RealRaven2000 commented 4 months ago

There was an inaccuracy in the logging code for body, don't know if it may have caused issues, here is a new version below:

filtaquilla-4.1pre14.zip

For testing and seeing in error log what's happening don't forget these two steps:

1 - enable debug mode on the last FQ Settings page

image

2 - in Error console (Ctrl+Shift+J) enable the three options: Errors + Warnings + logs

image

this should give a full picture of what is happening when you run the filter. Don't forget to Clear the Web output just before you run the filter, this will give the most useful, concise error log.

filtaquilla-4.1pre14.zip


thanks in advance for testing.

Example expected output for a filter with 4 regular expression search terms: body regex match + body regex doesn't match + body regex match + subject regex match

FiltaQuilla 10:37:42.918  [543273 ms]   
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.921  [3 ms]   
 found body element in parts[0] filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.922  [1 ms]   
 testing part [0] ct =  text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.922  [0 ms]   
 Found pattern (Hi(,|...|!|;))|(hello(,|.|!|;)) with content type: text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.922  [0 ms]   
 found 1 matches 
 ------------ 
 Match[0]: Hi   
 filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.923  [1 ms]   
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.924  [1 ms]   
 found body element in parts[0] filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.924  [0 ms]   
 testing part [0] ct =  text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.925  [1 ms]   
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.926  [1 ms]   
 found body element in parts[0] filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.927  [1 ms]   
 testing part [0] ct =  text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.928  [1 ms]   
 Found pattern (i)(' ... urs) with content type: text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.928  [0 ms]   
 found 1 matches 
 ------------ 
 Match[0]: lol
 filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.928  [0 ms]   
 Subject doesn't match undefined : true filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.929  [1 ms]   
 Calling NetUtil.readInputStreamToString ... filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.930  [1 ms]   
 found body element in parts[0] filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.930  [0 ms]   
 testing part [0] ct =  text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.931  [1 ms]   
 Found pattern (?!( .... )(\s) with content type: text/html filtaquilla-util.js:222:13
FiltaQuilla 10:37:42.932  [1 ms]   
 found 1 matches 
 ------------ 
 Match[0]: lolita.info
 filtaquilla-util.js:222:13
RealRaven2000 commented 4 months ago

Adding another version, this adds the result of each condition to the error log:

filtaquilla-4.1pre16.zip

example from the log ( I filtered it for the work "match")

FiltaQuilla 14:31:56.505  [0 ms]   
 Body matches (Hi(,|...|!|;))|( ... ) : true [filtaquilla-util.js:222:13](chrome://filtaquilla/content/filtaquilla-util.js)
FiltaQuilla 14:31:56.509  [1 ms]   
 Body doesn't match ([a-zA-Z]{2,9}:\ )?( .... )(\[|:) : false [filtaquilla-util.js:222:13](chrome://filtaquilla/content/filtaquilla-util.js)
FiltaQuilla 14:31:56.512  [0 ms]   
 found 1 matches 
 ------------ 
 Match[0]: lol
 [filtaquilla-util.js:222:13](chrome://filtaquilla/content/filtaquilla-util.js)
FiltaQuilla 14:31:56.512  [0 ms]   
 Body matches (i)('ll|'?d|'?... ) : true [filtaquilla-util.js:222:13](chrome://filtaquilla/content/filtaquilla-util.js)
FiltaQuilla 14:31:56.513  [1 ms]   
 Subject doesn't match (i)('ll|'?d ... ) : true
RealRaven2000 commented 4 months ago

New version, streamlined the debug output to be less. (for additional body testing I added a debug switch extensions.filtaquilla.debug.mimeBody which is disabled by default. To test - you have to restart Thunderbird because it is too stupid to replace search terms when a new version of FQ is installed.

filtaquilla-4.1pre22.zip


To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that). Restart Tb. Question should I highlight the condition result (true / false) with a color in the debug log? Might be nicer/...

RealRaven2000 commented 4 months ago

One more version - I made a mistake when using regex subject "doesn't match" it still printed "matches", this is fixed. also added the color highlight for easier reading:

filtaquilla-4.1pre24.zip

image

it shows the important stuff (final regex search term result) in green. regex patterns were redacted upon request.