Fever Plugin Broken on 14 Dec 2017?

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

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:

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.

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.

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?

All,

As the original author of this plugin, the Github project is now located here: GitHub - DigitalDJ/tinytinyrss-fever-plugin: Tiny Tiny RSS Fever API 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.

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

added the link to your repo to Plugins wiki page

Thanks @Grant_Pannell we had sent various pull requests to your original repo ages ago which all went unanswered so we came to the conclusion that it had been abandoned. Good to see you’ve given it an update! There’s still many users of it. Though I am wondering about its future now that Fever itself has been discontinued. We may find fever support being removed from various apps now.

EDIT: Although saying this, I get a 500 server error from your new version so I’ve reverted to the one from @wodev again which works a treat. Strangely there’s no logs showing why I’m getting 500 from php-fpm. I’ll have to do some investigation another day.

@xtaz There was no original Github repo, so I’m not sure what repository you’re referring to. I originally posted this as a zip file several years ago on the tt-rss forums, and there have been various forks since. The original forums stopped emailing me after a couple of replies, so I never saw the thread reach several pages of replies.

Currently using what ever I have commited into Git with Reeder for iOS. So if you can narrow down and report which client is working, I’m sure there’s a simple fix. Seems to work OK with php 7.1.

OK. This is odd. There is a setting in php.ini called display_errors. If it’s set to Off then I get a 500 server error from php-fpm with no log entries at all to say that something has gone wrong. Usually errors still log to the error log with this set to Off. If I change that to On then the fever plugin works fine and returns 200 OK. What’s going on there then? If I use the version from @wodev it works with display_errors set to Off.

As for the “original repo”. Sorry I now realise you’re not the original repo. I was referring to GitHub - dasmurphy/tinytinyrss-fever-plugin: TinyTiny RSS Fever API Plugin

EDIT OK. Noticed that actually even though it’s returning 200 OK now it’s still not syncing. Thought I would try and delete the account and create it again (in the Reeder app). It now refuses to login saying login failed, check password etc. Again if I put the other version back then it logs in straight away. Something really screwed up going on with this version.

EDIT2 Have tried to do some more debugging. Have tcpdump’d the traffic between nginx and php-fpm. Can see Reeder posting to the API, it has the correct password hash in it which matches the one in the database. But it just gets back a single HTTP header which is Content-type: text/html. There is no other content at all returned from the API. If I switch back to @wodev then I see application/json returned.

check tt-rss error log in preferences, that’s where the errors probably are

plugin runs within tt-rss context so it should log errors via tt-rss

Nothing in that log either except for old errors. I’ve tested PHP error logging by making an intentional error in another website and that works fine. I’m at a loss really. I was hoping somebody else might be seeing the same issue but it may just be something specific to my setup. I’ve gone back to older versions of the script to before PDO and the same problem occurs. Any other versions of the script from the various github forks work fine. It’s literally just this digitaldj version that’s doing this. Weird if I’m the only one that is seeing this.

@xtaz
I am seeing the same problem that you are. However, I am seeing warnings in the log in preferences:

E_WARNING (2)	plugins/fever/fever_api.php:58	unserialize() expects exactly 1 parameter, 2 given
1. plugins/fever/fever_api.php(58): unserialize(a:1:{s:8:"password";s:32:"PASSWORD_HASH";}, Array)
2. plugins/fever/fever_api.php(119): setUser()
3. plugins/fever/index.php(57): before()

It appears that the plugin requires PHP7. Since I could not get TTRSS to work with PHP7 (something about PDO not working because a driver could not be found), I changed the plugin:

fever_api.php:58

$obj = unserialize($line["content"], array("allowed_classes" => FALSE));

to

$obj = unserialize($line["content"]);

I’ll have a look at my broken PHP7 setup when I have more time …

@conflux thanks for the post. I had to make the change. After the recommended change I’m up and working @ line 58.

I’m on a old Ubuntu install with PHP 5.4.45. Pdo-test.php from the pdo thread passed but I got the same error as you.

I’m up and working so I’m happy.

That change doesn’t help me. I still get the same text/html empty content with no log output. I’m actually using PHP 7.2.0, though I had exactly the same problem when I was using PHP 7.1.x. Now that Xmas is over I need to take a look to see if I can work out the diff between the DigitalDJ version and the dasmurphy version and subsequent forks.

OK. I’ve at least confirmed the commit which breaks things for me. It’s Take back my plugin - fix a bunch of bugs which counters not updating, · DigitalDJ/tinytinyrss-fever-plugin@6d26584 · GitHub

Unfortunately that’s a massive change and makes it difficult to work out why that particular commit breaks it.

For what it is worth, I am not (and have not been) getting any log output from the plugin either.

I did see the issue with an empty text/html content when trying PHP 7. That was fixed by installing a missing package - it could have been php7.0-json, but I’m not sure (hard to keep notes late at night, sorry :blush:).

You’re welcome. I’m glad it’s working for you. :smiley:

It could indeed be a missing extension. Though you would expect the logs to state that fact wouldn’t you. There’s obviously something which is intercepting the logs I guess and not displaying them properly. My extensions are these… anything stand out as missing? JSON is there.

php72-7.2.0_1 PHP Scripting Language
php72-ctype-7.2.0_1 The ctype shared extension for php
php72-curl-7.2.0_1 The curl shared extension for php
php72-dom-7.2.0_1 The dom shared extension for php
php72-exif-7.2.0_1 The exif shared extension for php
php72-fileinfo-7.2.0_1 The fileinfo shared extension for php
php72-gd-7.2.0_1 The gd shared extension for php
php72-hash-7.2.0_1 The hash shared extension for php
php72-json-7.2.0_1 The json shared extension for php
php72-mbstring-7.2.0_1 The mbstring shared extension for php
php72-opcache-7.2.0_1 The opcache shared extension for php
php72-pcntl-7.2.0_1 The pcntl shared extension for php
php72-pdo-7.2.0_1 The pdo shared extension for php
php72-pdo_pgsql-7.2.0_1 The pdo_pgsql shared extension for php
php72-pgsql-7.2.0_1 The pgsql shared extension for php
php72-posix-7.2.0_1 The posix shared extension for php
php72-session-7.2.0_1 The session shared extension for php
php72-simplexml-7.2.0_1 The simplexml shared extension for php