aureliendavid / rsspreview

WebExtension to preview RSS feeds in the browser
MIT License
104 stars 6 forks source link

Broken in Firefox 126.0 #85

Open matthewkogan opened 6 months ago

matthewkogan commented 6 months ago

Since updating to Firefox 126.0 only the first item in the feed is visible.

aureliendavid commented 6 months ago

Hello,

Do you have an example feed where the problem occurs?

I'm using both firefox 126.0 and 127.0b2 and I don't have this issue.

thanks

matthewkogan commented 6 months ago

It's strange, it seems to load a new feed successfully, or partly successfully, but then fails when I press F5. I've tested with the links from https://www.bbc.co.uk/news/10628494.

matthewkogan commented 6 months ago

When it fails it says:

TypeError: feed_desc is null
    formatsubtitle moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:69
    main moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:301
    onload moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:43
    xhrdoc moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:39
    main moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:290
    onOptions moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:327
    promise callback* moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:342
    <anonymous> moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:447
rsspreview.js:78:15

ReferenceError: feed_desc is not defined rsspreview.js:79:19
    formatsubtitle moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:79
    main moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:301
    onload moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:43
    (Async: EventHandlerNonNull)
    xhrdoc moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:39
    main moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:290
    onOptions moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:327
    (Async: promise callback)
    <anonymous> moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:342
    <anonymous> moz-extension://dd0b4b2e-37c5-4cbb-ab2c-172c4e634a5a/rsspreview.js:447
    inject resource://gre/modules/ExtensionContent.sys.mjs:573
    AsyncFunctionNext self-hosted:799
aureliendavid commented 6 months ago

thanks for the info

I can't reproduce the issue on any of the bbc feeds

can you maybe try to uninstall and reinstall the addon?

I also pushed a tiny update (v3.32.1) based on the error message you posted that may help

matthewkogan commented 6 months ago

I'm afraid uninstalling and reinstalling the addon hasn't fixed it. I'm still seeing the first error (TypeError: feed_desc is null) and now also this one:

TypeError: document.getElementById(...) is null rsspreview.js:315:33
    main moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:315
    onload moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:43
    (Async: EventHandlerNonNull)
    xhrdoc moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:39
    main moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:290
    onOptions moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:327
    (Async: promise callback)
    <anonymous> moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:342
    <anonymous> moz-extension://17906802-0934-4982-906d-c4238b325504/rsspreview.js:447
    inject resource://gre/modules/ExtensionContent.sys.mjs:573
    AsyncFunctionNext self-hosted:799
aureliendavid commented 6 months ago

hm, i'm stumped to be honest, I can't reproduce it anywhere (maybe some other users will manifest themselves if it's really a problem with the new firefox version)

can you maybe post a screenshot of what the page actually looks like when the error occurs? (and the exact feed url?)

sorry for the vague answers, it's hard to debug without reproducing

(also maybe go to the web inspector, right click on the root element, and so copy > outer html and post it?)

thanks

matthewkogan commented 6 months ago

image

matthewkogan commented 6 months ago

<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link rel="stylesheet" href="moz-extension://17906802-0934-4982-906d-c4238b325504/preview.css" /></head><body id="rsspreviewBody"><div id="feedBody"></div></body></html>

matthewkogan commented 6 months ago

Got it, it's caused by NoScript. I started a new profile and installed just RSSpreview and it worked fine. Installed NoScript and the problem appeared, even when the domain is marked as trusted.

aureliendavid commented 6 months ago

ah well spotted! thank you for debugging

I don't use noscript so I don't know it very well, I'll try to install it and check if there are incompatibilities with rsspreview

the thing that seems blocked in your issue is the xslt transformation of the xml into an html document, maybe this can be whitelisted in noscript (or maybe the extension can be whitelisted i don't know, i'll try to check)

matthewkogan commented 5 months ago

I've also reported https://bugzilla.mozilla.org/show_bug.cgi?id=1899786.

matthewkogan commented 4 months ago

For now it is possible to work around the problem by setting the Firefox preference network.decompression_off_mainthread to false in about:config.

MarkusGasser2 commented 4 months ago

Yes, I also noticed this error and reported it as well. Thanks, yes, with disabling the option everything works ok again.

jesup commented 4 months ago

Decompressing Off MainThread shouldn't change anything, except it will change timings and perhaps orders of when things occur, since decompression is no longer synchronous. From a Web Standards perspective, this shouldn't matter at all.
I suspect the timing changes combined with interactions between NoScript and RSSPreview are triggering some race conditions in the extensions. What, I'm not sure, and it would be hard for me to debug since I know little about them. (I wrote the Decompression OffMainThread patch). If you can get more details on what happens (perhaps a full networking log via about:logging), perhaps I can help tell you where the timing change might be, but I'm not sure that would tell you more than your own debugging would

matthewkogan commented 4 months ago

The preference to set to work around this has been renamed in Firefox 128 to network.decompression_off_mainthread2.