friedPotat0 / Spam-Scores

Thunderbird add-on to display spam scores according to mail headers. Supports spam/ham score headers of Rspamd and SpamAssassin. The add-on adds a column with the overall spam score to the mail list view and shows details of any matched spam/ham rule.
https://addons.thunderbird.net/de/thunderbird/addon/spam-scores/
Other
42 stars 6 forks source link

v1.4.0 not working with Thunderbird 78 #44

Closed popindavibe closed 2 years ago

popindavibe commented 2 years ago

Describe the bug Spam Score not working on latest release.

The Spam score button is here but only shows a 'green puzzle piece'. Clicking on it does not do anything.

Reproduction steps Install or update to version 1.4.0

Expected behavior The Spam score button should display the colored icon and the score.

Thunderbird (please complete the following information):

Spam Score add-on (please complete the following information):

friedPotat0 commented 2 years ago

Thank you for reporting. Sadly, the new version seems to be incompatible with the old Thunderbird 78. I have now marked the new version in the Thunderbird store that it will only work with Thunderbird 91.*. However, I don't know what effects this will have on the users' updates. I am trying to find a solution for Thunderbrid 78 as soon as possible.

popindavibe commented 2 years ago

Thank you for the quick reply. I can confirm that Thunderbird 78 is not attempting to update to 1.4.0 anymore.

friedPotat0 commented 2 years ago

The add-on throws the following exception in the Experiments API on startup:

addons.xpi  WARN    Exception running bootstrap method startup on spamscores@czaenker: ReferenceError: WebExtensionPolicy is not defined(file:///.../src/experiments/experiments.js:3:19) JS Stack trace: @experiments.js:3:19
asyncLoadModule/module.asyncLoaded<@ExtensionCommon.jsm:1668:14

@dlh2 Do you have any idea what the problem could be? I can't find any useful information for WebExtensionPolicy on the web. I've already tried to add a condition to check whether WebExtensionPolicy is undefined and otherwise load the old ExtensionParent (see commit https://github.com/friedPotat0/Spam-Scores/commit/7d9018121ab65ce386e6460c95b2caec1b802399), but Thunderbird 78 is still throwing the error. Thunderbird seems to check if the WebExtensionPolicy object is defined prior to the condition.

dlh2 commented 2 years ago

Weird, try to debug it with CTRL + SHIFT + U/I

About the useful information, I don't really have any idea, as most of the ChromeUtils.Import are from xpCOM services, which are supposed to be removed https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/57#changes_for_add-on_and_mozilla_developers as said in https://github.com/friedPotat0/Spam-Scores/issues/38#issuecomment-943413381

What I could understand WebExtensionPolicy was created at 2017-05-24 15:58, meanwhile the supposed XPCom Service was created at 2016-11-10 12:35

Therefore I think, on that day I just tried to search any solution on that part, so that's something we need to resolve as "WebExtensionPolicy" might not be indicated for that solution.

At the moment, my idea is to follow the guideline of MDN Extension.getURL() deprecated so we can use it with runtime, but for runtime we need to call it on background.js, so experiments.js can get it, therefore... We might have to ask the MDN developers itself

friedPotat0 commented 2 years ago

I think the effort to continue supporting Thunderbird 78 is just too high. Only about 2% of the users of the add-on use a Thunderbird version older than 91.x. I'm really sorry to have to say this, but the support for the older Thunderbird versions will unfortunately be discontinued at this point. All users who still use Thunderbird 78 can continue to use version 1.3.1 of the add-on.