tinytinyrss-fever-plugin icon indicating copy to clipboard operation
tinytinyrss-fever-plugin copied to clipboard

Network connection error on every sync with Press 1.5.4

Open rubenv opened this issue 8 years ago • 4 comments

I'm using:

  • Press 1.5.4 (on a Nexus 5 with Android M)
  • Tiny Tiny RSS v15.7
  • This plugin, from git master

On every sync, I get a toast message with "Network connection error".

Sync seems to work, partially (only some items get synced in).

Here are the HTTP logs from a sync session:

rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:25 +0000] "POST /plugins/fever/?api&groups HTTP/1.1" 200 513 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:25 +0000] "POST /plugins/fever/?api&feeds HTTP/1.1" 200 4883 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:25 +0000] "POST /plugins/fever/?api&items&since_id=2000 HTTP/1.1" 200 116 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:25 +0000] "POST /plugins/fever/?api&items&since_id=2050 HTTP/1.1" 200 116 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:26 +0000] "POST /plugins/fever/?api&items&since_id=2100 HTTP/1.1" 200 116 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:26 +0000] "POST /plugins/fever/?api&items&since_id=2150 HTTP/1.1" 200 116 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:26 +0000] "POST /plugins/fever/?api&unread_item_ids HTTP/1.1" 200 108 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:26 +0000] "POST /plugins/fever/?api&saved_item_ids HTTP/1.1" 200 107 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"
rss.rocketeer.be 94.225.203.40 - - - [13/Nov/2015:14:56:26 +0000] "POST /plugins/fever/?api&items&with_ids= HTTP/1.1" 500 5 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0; Nexus 5 Build/MRA58N)"

The last one returns an HTTP 500 error.

Is there any way I can debug this?

rubenv avatar Nov 13 '15 14:11 rubenv

Turns out this happens when you have no saved items.

{
   "auth" : 1,
   "api_version" : 3,
   "last_refreshed_on_time" : "1448290332",
   "saved_item_ids" : ""
}

This causes Press to do the wrong thing. Saving one item makes sync work.

rubenv avatar Nov 23 '15 14:11 rubenv

Do you know what Press want in source? I can fix this fast if i know what Press accepts. I don't have any Android device at hand. Can you mail the creator and ask?

dasmurphy avatar Nov 23 '15 17:11 dasmurphy

I'm not sure about Press.

I'm guessing that an easy fix would be to make sure that POST /plugins/fever/?api&items&with_ids= doesn't generate a HTTP 500, but just returns a response with zero items in it.

I don't have a Fever install at hand, so I can't really compare between what Press sends/expects from normal Fever and this plugin.

Thanks for this awesome plugin by the way, it's a a life-saver!

rubenv avatar Nov 24 '15 08:11 rubenv

Pretty sure it's an issue with the query:

2017/07/17 16:54:51 [error] 287#287: *472 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Query SELECT ref_id, feed_id, title, link, content, id, marked, unread, author, updated
									 FROM ttrss_entries, ttrss_user_entries
									 WHERE  owner_uid = '2' AND ref_id = id  AND id IN ('')  LIMIT 50 failed: ERROR:  invalid input syntax for integer: ""

I replaced the $query = "id IN ('') "; with $query = "id IN (0) "; to at a minimum fix the error.

travisghansen avatar Jul 17 '17 23:07 travisghansen