Tiny Tiny RSS: Community

Issue since Readability update

i guess i’ll make a VM or something with php 7.3 and take a closer look at this :face_with_raised_eyebrow:

UPD: i’ve subscribed to the feed in the OP but so far no errors. maybe the data is not in the feed anymore. op can you post more feeds / specific posts where this happens on?

e: i’m using an ubuntu 18.04 test vm, php 7.3.2-3 from the ppa

post actual feed url ideally with affected post titles

This is the list of the feeds that I have the af_readability plugin enabled on… The issue is sporadic for me though. It will work fine for a day or two and then I’ll start seeing that error in the update process. So I guess if you subscribe to these and monitor it for a while you should see the same at some point.

I’m not sure about specific post titles. All my feeds are up to date at the moment, and if I git pull back up to HEAD then it will work fine. I guess if I purge the database of post entries it might trigger it though?

http://www.theregister.co.uk/headlines.atom
http://www.ispreview.co.uk/index.php/feed
http://feed.theregister.co.uk/rss?a=Simon%20Travaglia
https://www.thinkbroadband.com/news.rss
http://www.daemonology.net/blog/index.rss
https://dan.langille.org/feed/
https://www.gazetteseries.co.uk/news/yateandsodburynews/rss/

one of your feeds (the gazette) doesn’t open with connection timeout, i guess it’s geoblocking or something, the rest seemingly updated without any errors

yeah, i’m not going to keep a separate vm running and updating a bunch of random feeds because it might trigger a readability error at some point, maybe. this sounds like too much effort for a third party library + bleeding edge php combination. instead i’m going to wrap this into try-catch.

next time this happens make it trigger reliably on specific post urls (use force rehash in feed debugger) at least and post those here.

alternatively be a normal person like the rest of us and use a server distro for your server stuff.

e: maybe support should be limited to stable distros like centos and debian (+ubuntu) to begin with, it’s not like i’m going to investigate any issues with meme-tier garbage like arch or gentoo or whatever

update: readability parsing is already inside a try-catch block, which means it crashes in constructor? strange. i’ll move it inside the block, i guess.

let me know if that changes anything.

Would it be beneficial to call debug to log some info (article URL, feed, etc.) inside the catch() before returning false?

it could be a good idea to dump entire article XML somewhere (i.e. with file_put_contents) so that we could train readability on it later and see if it crashes


sorry about the 525. i’ve updated docker-ce and discourse, uh, didn’t take it well. i had to rebuild the container and since it’s such an overbloated monstrosity it always takes forever.

1 Like

Definitely, but I’ve used a lot of forum software and like Discourse the best. I also see other sites moving to it.

… and away from it. Well, sorta; we were told to FOAD by Jeff.

Whoops. Sorry I’ve not responded. I’ve just pulled the latest git code so I’ll see if the try/catch solves the problem and watch the update log for a few days. FYI I use FreeBSD, so yes I know it’s not very mainstream, but it is still server tier :slight_smile:

Yeah what may have been helpful in this case is if the feed and maybe the entry that crashed was shown in the log. Because the crash happened before any logging it’s difficult to see which one caused it. But thanks for reminding me about the feed debugger. I’ll try that on each feed one at a time if I still get the same problem.

Just had the error happen again after one week where all feeds stopped updating except ISP Review. Which just happens to be mentioned in the log again before the crash exactly the same as last time. Though when I went into the feed debugger with f+D and forced a refresh it all loaded without a problem. And now everything is working fine again. So it seems whatever caused the problem is then fixed by forcing a refetch/rehash.

[07:30:57/55805] Base feed: http://www.ispreview.co.uk/index.php/feed
[07:30:57/55805] => 2019-03-05 06:51:17.549093, 56 2
PHP Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Trav
ersable, null given in /usr/www/ttrss/vendor/andreskrey/Readability/Nodes/NodeTrait.php:324
Stack trace:
#0 /usr/www/ttrss/vendor/andreskrey/Readability/Nodes/NodeTrait.php(324): iterator_to_array(NULL)
#1 /usr/www/ttrss/vendor/andreskrey/Readability/Nodes/NodeTrait.php(421): andreskrey\Readability\N
odes\DOM\DOMText->getChildren(true)
#2 /usr/www/ttrss/vendor/andreskrey/Readability/Readability.php(1270): andreskrey\Readability\Node
s\DOM\DOMText->hasSingleTagInsideElement(‘tr’)
#3 /usr/www/ttrss/vendor/andreskrey/Readability/Readability.php(1166): andreskrey\Readability\Read
ability->prepArticle(Object(andreskrey\Readability\Nodes\DOM\DOMDocument))
#4 /usr/www/ttrss/vendor/andreskrey/Readability/Readability.php(155): andreskrey\Readability\Reada
bility->rateNodes(Array)
#5 /usr/www/ttrss/plugins/af_readability/init.php(188): andreskrey\Readability\Readabi in /usr/www/ttrss/vendor/andreskrey/Readability/Nodes/NodeTrait.php on line 324

congrats, instead of dumping the database, saving the XML somehow, or at least doing something to help us reproduce it, you decided to post the exception again. well done.

arch users, ladies and gentlemen. again and again.

Hi, new TTRSS user here

Imported my feeds via OPML from another reader. Also getting the Readability error mentioned

The initial update ran fine with readability on for all feeds. Subsequent feed updates started triggering the issue.

Most recent example is from The Register. Was working great for the whole 4 days I’ve had TTRSS, but just now bombed out. I disabled Readability for the Register and let the feed update run, and there was just 1 new article which was this one:

https://www.theregister.co.uk/2019/04/16/context_pc_numbers/

So is there something within this article which is screwing Readability? The atom feed is here http://www.theregister.co.uk/headlines.atom

I turned Readability back on for the Register and it hasn’t bombed out

Also regarding https://github.com/andreskrey/readability.php/issues/79 where Andreskrey says “Maybe you can put a breakpoint before triggering Readability and dump the HTML content?” is this possible? I’m not a dev but happy to dump my DB or whatever is needed

tldr: please report issues with readability to readability developers.

you didn’t even think to specify what php version on what platform you’re running in your largely useless “me too” post, i’m not going to waste a week spoonfeeding you because of a third party library i didn’t write nor support. you’ll have to do your homework yourself.

anyway, new rules for this issue:

  1. if you run into it and can figure out why it happens, submit a PR, preferably to developers of readability, but if its a tt-rss problem, to me. i don’t know how this could be a tt-rss problem since all its doing is passing XML to the class but whatever, anything is possible.
  2. if you want to bump this thread with a “me too”, the only thing you’ll get is a probation

i’m not wasting any more time on this.

when I went into the feed debugger with f+D and forced a refresh it all loaded without a problem. And now everything is working fine again.

i have the same problem
can u teach me how to ‘’ feed debugger with f+D ‘’ to fix the problem? thx a lot.

It means fetch the feed using debug mode. You go into the feed and then press the f and shift-D keys. The feed is successfully fetched and processed then. My guess is there’s something slightly different in the code paths between the main feed updater and the debug mode.

I am now agreeing with fox though. I took a look at the code and can see that he’s simply importing a 3rd party library and so this needs solving by the person that wrote the library. Unfortunately I can’t reproduce it in a way where I can just provide a broken feed. Because as I said, it breaks, you fetch the feed another way, and then it works fine for a week before maybe breaking again.

I have worked around this now by reverting the commit that upgraded the library and I’m rebasing the old version on top of any new commits. If the library gets upgraded again then I’ll test it. In the meantime, like fox, I’ve lost interest in caring about it.

btw actual readability library is now moved to the plugin so it’s possible to make af_readability_old or something and use that instead, i’ve made that change with this particular issue in mind.

Ahh that’s useful. Yes I’ve just done this instead. Created plugins.local/af_readability_old and then removed my revert with a reset --hard. Seems to work :slight_smile: If the library gets upgraded again in the future I’ll retest it but until then this will do.

I saw that the readability plugin was updated this week and so I switched back to using the proper plugin. So far it’s worked without any problems. So it’s possible the new version of the library fixed the problem that I had with the last version.

yeah, git changelog mentioned something related to php 7.3 compatibility, i’ve thought about posting here asking for feedback but got distracted and forgot.