cleidigh / printing-tools-ng

PrintingTools NG Thunderbird Extension - Printing Utilities
Other
35 stars 17 forks source link

File Not Found Error for Help Pages #212

Closed Jayonas closed 10 months ago

Jayonas commented 1 year ago

Whenever Thunderbird tries to display a help page for this plugin it shows the "File not found" error page instead. Here are a couple example URLs showing this error for me:

Additionally, whenever the plugin automatically updates and tries to show the "just installed/updated" page, that also shows the same error.

This started probably 1-2 months ago and I've been ignoring it because I wasn't super interested in the contents of the "just updated" page, plus I figured such a fundamental thing would probably be quickly reported and fixed. But it hasn't been fixed yet (just updated again the other day) and I don't even see a report of it, so maybe I'm actually some strange corner case (en-CA locale, maybe?). And now I'm interested in a few of the new settings but can't access their help.

Hopefully the URLs and error message are enough to give you somewhere to start. I'm not sure what other information might be helpful.

cleidigh commented 1 year ago

@Jayonas I think my fallback logic that is supposed to use the en locale where the en-XX locale must not have moved when I updated things. Will check and report. @cleidigh

cleidigh commented 1 year ago

@Jayonas I identified a solution should post beta shortly. In the meantime if you have questions on new features, fire away. @cleidigh

cleidigh commented 1 year ago

@Jayonas Here is a beta fix for the help issue https://github.com/cleidigh/printing-tools-ng/blob/v2.2.3/xpi/Beta/printing-tools-ng-2.2.3-b1-tb.xpi @cleidigh

Jayonas commented 1 year ago

I can confirm that your beta version resolves the problem, thanks for the quick fix!

cleidigh commented 1 year ago

@Jayonas Excellent, now I don't want to call your case an "edge condition", I think that would be disrespectful of canada %-) It was my first issue with a locale that was en, but not en-US. The code was supposed to throw and default to en-US, but I had logic that didn't throw. Anyway I am scrambling to get ImportExportTools NG updated for 115, a major task. Are you an IETNG user? If so would you be interested in helping out with user feedback and or testing? The first thing I would like is educated opinions on a revamp of the menu structures, they are old and awkward. If you are not interested, no problem. ( I am inferring from your posts you are a developer) cheers @cleidigh

Jayonas commented 1 year ago

@cleidigh

Haha, thanks. 😊 🇨🇦

You're correct that I'm a developer, though I haven't worked on Thunderbird and am also not an IETNG user so I'm afraid that I won't be much help there. It looks like an impressive plugin though, and one that I'm glad to know about for potential use in the future. Good luck with the major update!

cleidigh commented 1 year ago

@Jayonas No problem, if you are not using IETNG, no reason to drag you into that. Glad you like the PDF auto save! @cleidigh

Jayonas commented 11 months ago

I'm sorry to report that this issue resurfaced for me when I was updated to Supernova. I'm getting a "file not found" page again -- at URL moz-extension://d6cb72cf-22e7-443c-a1ec-412ec5f38778/chrome/content/help/locale/en-CA/printingtoolsng-help.html -- when there's an update (which I now realize happens so often because of #233). At the moment this is more of an inconvenience than a real problem, but I figured I should let you know.

Maybe or maybe not related, the Autosave to PDF feature also stopped working for me when I was updated to Supernova. When I click the "Print NG" button I get the normal "OK to autosave or Cancel to preview" dialog, but when I click OK nothing happens, as best as I can tell; I no longer get a PDF file generated in the location specified in my settings (or anywhere else that I can find). The workaround is just to go through the preview dialog like I used to before the Autosave feature existed (which I can do either by clicking Cancel or by turning off Autosave), so this is also effectively just an inconvenience. If you think this is an unrelated problem then I can certainly make a new issue for it, but I thought I would mention it here first on the off chance that it's actually related to the locale thing (since they both started at the same time).

cleidigh commented 11 months ago

@Jayonas Good to hear from you. I think I must have crossed the patch for en other locales when I started v115 support. I verified the help failure, apologies that didn't get into v3.0.0

When I double checked the Auto save OK, that worked fine . I tested with en-US, en-CA and de locales. So I am surprised as this has been out for a while and I am sure I would have heard about it. You have a valid pdf output directory? Can you do a test and check and capture the error console? @cleidigh

Jayonas commented 11 months ago

@cleidigh

Ah, glad to hear the locale thing is easy, just crossed branches.

I double-checked my PDF output directory, and it's the same valid place that it has always been, which is "H:". To reduce complexity (since that's a network drive and what-not) I also tried changing it to "C:\Users\USERNAME\Documents". In both cases I got these two messages in the console:

XPCWrappedNative_NoHelper { flags: Getter & Setter, folder: Getter, mime2DecodedSubject: Getter, subject: Getter & Setter, getStringProperty: getStringProperty(), isFlagged: Getter, messageKey: Getter & Setter, getUint32Property: getUint32Property(), messageSize: Getter & Setter, accountKey: Getter & Setter, … }
printingtoolsng-pengine.js:97:13
Uncaught (in promise) ReferenceError: messenger is not defined
    PrintSelectedMessages chrome://printingtoolsng/content/printingtoolsng-pengine.js:424
    cmd_printng chrome://printingtoolsng/content/printingtoolsng-pengine.js:652
    oncommand about:message:1
printingtoolsng-pengine.js:424:17
    cmd_printng chrome://printingtoolsng/content/printingtoolsng-pengine.js:661
    AsyncFunctionThrow self-hosted:856
    (Async: async)
    oncommand about:message:1

Looks like a null reference error, basically? Something about the Supernova upgrade caused messenger to be null for me but not for most anyone else, I guess.

Let me know if there's other info that would be helpful for me to provide and I'll see what I can do. I'm unfortunately pretty far out of date on web-related stuff so I don't really know my way around these debugging facilities. I don't see an easy way to export my PrintNG settings (which I haven't changed from before the upgrade when things worked), and I'm not sure what else might be helpful.

Also let me know if/when it's time to move this to its own issue and I can do that.

cleidigh commented 10 months ago

@Jayonas Have not forgotten about you! Just took a break from IETNG and got things in order for ptng beta. Besides the English sublocales, there are a couple generic help items I want to bring over from IETNG.

Probably a couple days work.

Can you describe the exact steps to get the messenger error? Where were you, anything that can help me reproduce. @cleidigh

cleidigh commented 10 months ago

@Jayonas FYI I believe I found the messenger scope issue. It was reproduced if one was printing from a message window. Is that where you had the autosave issue? I presume printing from the message list was not a problem? Also have the help fixed. @cleidigh

Jayonas commented 10 months ago

Deleted a previous comment where I incorrectly indicated that the main app toolbar button and CTRL+P were showing the same bug/behavior for me, because it turns out they were actually working fine, both in the message list and the individual message view.

The new summary is that @cleidigh is correct that my bug only occurs when using the button near the headers in the message view, and they seem to have reproduced it.

cleidigh commented 10 months ago

@Jayonas Well everything makes sense except the OK not working in the message list, that I can't reproduce nor does it make sense. As soon as I push b2, probably tomorrow, we will see where we are. @cleidigh

cleidigh commented 10 months ago

@Jayonas Last messages crossed, I think we are now in agreement, good. I think b2 will hit everything. @cleidigh

cleidigh commented 10 months ago

@Jayonas Posted b2 It has the help and message window fixes. @cleidigh

Jayonas commented 10 months ago

@cleidigh Confirmed that b2 fixes both the help and the message window button for me. Thanks!