Open w4hnsinn opened 7 months ago
I transferred this to FiltaQuilla, because the functionality comes from there.
Uncaught TypeError: that.window is null
This is initialized when FIltaQuilla starts, and should have a reference to the main window:
var { ToneQuillaPlay } = ChromeUtils.import("resource://filtaquilla/ToneQuillaPlay.jsm");
try {
await ToneQuillaPlay.init();
ToneQuillaPlay.window = window;
} catch (ex) {
FiltaQuilla.Util.logException("ToneQuillaPlay.init failed.", ex);
}
in the jsm module for the sound player the variable that
is set to the object itself:
// shorthand notation for the current module
var that = ToneQuillaPlay;
that.name = "ToneQuillaPlay";
Do you get a message "ToneQuillaPlay.init failed" when you start Thunderbird?
I put some code to reinitialise the window when the sound plays, can you test this version please?
In the function that plays the sound, I also added some console output which (only in that case) also displays details on the window and the that
variable (which can be clicked on for deeper trouble shooting):
if (!that.window) { // [issue 258]
console.log("ToneQuillaPlay.play() - window instance not initialized!;");
that.window = Services.wm.getMostRecentWindow("mail:3pane");
console.log("initialized 'that.window' with Servies", {window: that.window, that: that});
}
you will see something like this (ignore the yellow lines they are caused by me debugging it to force the error)
to get additional console output, also enable the "debug mode" switch on the FiltaQuilla (About filtaquialla/help) settings page:
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)
NotFoundError: Could not stat file(F:\Thunderbird Portable\Data\profile\extensions\filtaquilla\applause.ogg) because it does not exist 2 FilterListDialog.js:488:10
And looking at the directory in question, it's not just a missing file, there is no \filtaquilla\ folder at all. So it is not generated when I install, nor is it generated later. I have checked this is true for both the current release version available through addons.thunderbird.net (i.e. filtaquilla-4.0-tb.xpi) as well as for this test version (filtaquilla-4.1pre2.zip) you've provided here. In both cases I installed "from file". I'm assuming this is to do with the "portable" mod of TB.
2. However, the test version does play back sound correctly when triggered from a message filter:
FiltaQuilla 13:19:9.286 [603542 ms]
ToneQuillaPlay.queueToPlay F:\mailboxnotify.wav filtaquilla-util.js:222:13 FiltaQuilla (toneQuillaPlay module) _queueToPlay(F:\mailboxnotify.wav) FiltaQuilla (toneQuillaPlay module) queueing sound, status = 0 FiltaQuilla (toneQuillaPlay module) starting next sound... FiltaQuilla (toneQuillaPlay module) nextSound() FiltaQuilla (toneQuillaPlay module) play() ... FiltaQuilla (toneQuillaPlay module) determined mimeType = audio/wav FiltaQuilla (toneQuillaPlay module) nextSound() FiltaQuilla (toneQuillaPlay module) _clearIgnore()
Maybe there is a utility function that unpacks an archive with sounds which may fail on linux... I didn't get a chance to test this maybe I will after 4.1 was published on 16/07/2024
I've been trying to get a sound, any sound, to play when certain emails are caught by a message filter, but to no avail.
I have tried simply adding the "Play Sound" action to an existing filter I had - the filter keeps working [it moves the message to a folder], but no sound is played.
I have found that mp3s are unsupported, tried with both wav and ogg files, no success.
I have tried changing the order of the two actions [move + play sound], no change.
I have tried creating a brand-new filter, setting up a custom test case (subject is: testingmoo), with only the Play Sound action and nothing else, no joy.
I then found out how to open the error console thing and found the following error was being triggered whenever a sound was supposed to be played:
Uncaught TypeError: that.window is null See:
Note, I am using ThunderbirdPortable, currently v115.9.0 (32-bit), this may well cause interference sometimes, I found in the past, but I'm not sure.
Please let me know if there's something else that can be done besides using the non-portable version of TB.. thanks! <3