Fever Plugin Broken on 14 Dec 2017?


#1

I’m having issues after the large ttrss update yesterday.

I don’t get log-in errors. I can still open old articles. However, Reeder on iOS does not seem to update feed articles from the server so no new content is available.

thanks


#2

For starters, please read before posting / reporting bugs; provide the information requested.

There was a little bit of discussion about this. I said I would take a look if I had time. But I would be surprised if you’re not getting errors on the server. Can you please check the logs and report back. I’m assuming you’ve made the latest updates to TT-RSS, which include the PDO overhaul, but no one can know because you’ve posted next to nothing detail-wise.


#3

Just to jump in here, after upgrading to the most recent release, I too was having issues with the Fever Plugin. This was on a Mac running 10.13.2 with PostgreSQL 10.1 and php 7.1.7.

The error I’m seeing in the apache log is:

[Thu Dec 14 21:58:09.848296 2017] [php7:error] [pid 21674] [client 127.0.0.1:64405] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /Library/Server/Web/Data/Sites/Default/tt-rss/plugins/fever/fever_api.php:149\nStack trace:\n#0 /Library/Server/Web/Data/Sites/Default/tt-rss/plugins/fever/fever_api.php(891): FeverAPI->setUser()\n#1 /Library/Server/Web/Data/Sites/Default/tt-rss/plugins/fever/index.php(50): FeverAPI->before(NULL)\n#2 {main}\n thrown in /Library/Server/Web/Data/Sites/Default/tt-rss/plugins/fever/fever_api.php on line 149

I rolled back to the previous version of TT-RSS in the mean time. Let me know if I can provide more information.


#4

check the few last posts in the PDO thread


#6

Thanks fox. Found it.

For others, add this new function, properly indented, to your tt-rss clone in ./plugins/fever/fever_api.php. I added it at around line 22 before the comment for ‘function wrap’

function __construct() {
    $this->dbh = Db::get();
}

#7

someone should probably push this to upstream


#8

I’m working on some patches now… But upstream hasn’t been touched since Nov. 2015.


#9

Updated 2017-12-16

Download Fever API Plugin

This contains as many patches as I could remember. Pull request was made upstream but don’t hold your breath as there’s been no activity in years there.

Report errors in this thread and I’ll see what I can do.

e: Original author has posted an updated link to the maintained repository.


#10

Also created a quick fix.

Now every database connect creates this annoying notices in ngxin error log:

2017/12/16 22:56:26 [error] 8648#8648: *74597 FastCGI sent in stderr: “PHP message: PHP Notice: Legacy connect requested to mysql in /var/www/xxx.xxx.xxx/htdocs/classes/db.php on line 22” while reading response header from upstream, client: 77.188.117.74, server: xxx.xxx.xxx, request: “POST /plugins/fever/?api&links&page=1 HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.0-fpm_xxx.xxx.xxx.sock:”, host: “xxx.xxx.xxx


#11

You might want to read the PDO thread.

I’m not going to rewrite the queries at this point; I’m only interested in getting it working for others.


#12

This kind person has actually changed the code to use PDO which is a better solution. https://github.com/phiali/tinytinyrss-fever-plugin , also if you add self:: to line 572 that solves the PHP7.2 warning.

if (self::ADD_ATTACHED_FILES){


#13

My fork is also refactored to use PDO and prepared SQL statements which improves security :slight_smile:
https://github.com/wodev/tinytinyrss-fever-plugin


#14

Great work - just checked it, but i have tons of the same log messages:

[17/Dec/2017:18:55:38 +0100] “POST /plugins/fever/?api&items&since_id=483011 HTTP/1.1” 200 719739 “-” “Reeder/3.1.21 CFNetwork/893.14.2 Darwin/17.3.0”

Reeder remains in “Syncing…” status


#15

Thanks for the feedback.
I committed a FIX for the IOS Reeder app.


#16

Anyone else still seeing issues with Reeder? Thanks @wodev this looks great, but I’m seeing Reeder taking ages to sync and looking at my webserver logs it’s doing a huge amount of requests. It POSTs to the API around 55 times with items&since_id= ranging from 142248 all the way down to 82727 knocking off a few hundred at a time. The original fever plugin didn’t do this. It synced straight away with a single request.

EDIT: Actually ignore this. I deleted the account in Reeder and recreated it and that seems to have solved the problem. I guess Reeder had got itself into a tiz because the fix wasn’t there to begin with and now I’ve cleared the cache.

@wodev If you also add self:: in front of the constant on line 600 it will solve an error that you get in PHP 7.2 as well. And then you can become the “one true version” :slight_smile:


#17

The issue with the huge ammounts of request was an an error for the since_id request, which is fixed now.
Also fixed is the php 7.2 error for missing self

Changes are committed to github.


#18

Thank you! Just did a git pull. Hopefully that sorts it out. I was wrong about recreating the account fixing it. Noticed it went wrong again shortly afterwards. But hopefully it’s fixed now. I see you’ve edited a where clause.


#19

Should the Fever Plugin be listed here: https://git.tt-rss.org/git/tt-rss/wiki/Plugins Its suprisingly missing.

If so, what link should be listed? Looks like wodev’s is the latest?


#20

All,

As the original author of this plugin, the Github project is now located here: https://github.com/DigitalDJ/tinytinyrss-fever-plugin.

I posted it on the original forums some time ago and didn’t realise people actually picked it up and made changes. I’ve gone over forks on Github and pulled changes back into my own version. I recently fixed up the PDO issue by rewriting the queries.

Please submit any issues and pull requests there and use my repository as the official upstream repo. Cheers.


#21

thanks for updating, I just updated my install and everything seems to be working fine with Reeder on iO and OSX.