Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers not showing in TB 115 #34

Open
lingfish opened this issue Oct 23, 2023 · 5 comments
Open

Headers not showing in TB 115 #34

lingfish opened this issue Oct 23, 2023 · 5 comments

Comments

@lingfish
Copy link

Hi, I'm not seeing spam headers in the message pane.

Preference is set right:

image

I'm seeing this in the error console:

TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:24:45](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:278:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
8 [spamHeaders.js:289:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:242:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
16 [spamHeaders.js:209:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:278:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
libExperiments.getDocumentByTabIndex is not a function [popup.js:69](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/popup.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:24:45](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:278:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
8 [spamHeaders.js:289:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
[spamHeaders.js:242:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function
16 [spamHeaders.js:209:53](jar:file:///home/user/.thunderbird/profile/extensions/rspamd-spamness@alexander.moisseev.xpi!/experiments/spamHeaders.js)
TypeError: libExperiments.getDocumentByTabIndex is not a function

@moisseev
Copy link
Owner

I cannot reproduce the issue. What is your add-on and exact Thunderbird versions?

@lingfish
Copy link
Author

Name Thunderbird
Version 115.3.1
Build ID 20230928194049

Addon:

Version
2.0.0a15
Last Updated
23 October 2023

This is what I see:

image

@moisseev
Copy link
Owner

Could it be something to do with OS specific package build particularities?

@lingfish
Copy link
Author

Not sure how to troubleshoot that for you. I'm on Debian bookworm. I actually just downgraded back to 102.15, 115 is quite the eyesore for me. Still want to try to fix the issue though.

The log referencing libExperiments.getDocumentByTabIndex doesn't help?

@moisseev
Copy link
Owner

It looks like the libExperiments.js library is missing or not loaded.

You can add some logging to see what's happening. Here:

};
libExperiments.getDocumentByTabIndex = function (windowId, tabIndex) {
const window = Services.wm.getOuterWindowWithId(windowId);
return libExperiments.getContentWindow(window, tabIndex).document;
};

diff --git a/experiments/libExperiments.js b/experiments/libExperiments.js
index 675b552..67fb77f 100644
--- a/experiments/libExperiments.js
+++ b/experiments/libExperiments.js
@@ -19,7 +19,9 @@ libExperiments.getContentWindow = function (window, tabIndex) {
     throw Error("Could not find the XUL <browser> object");
 };
 
+console.log("loading");
 libExperiments.getDocumentByTabIndex = function (windowId, tabIndex) {
+    console.log(windowId, tabIndex);
     const window = Services.wm.getOuterWindowWithId(windowId);
     return libExperiments.getContentWindow(window, tabIndex).document;
 };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants