fasheng / elfeed-protocol

Provide extra protocols to make like Fever, NewsBlur, Nextcloud/ownCloud News and Tiny Tiny RSS work with elfeed
GNU General Public License v3.0
100 stars 18 forks source link

elfeed + ttrss protocol don't work with location #4

Closed ssh3 closed 6 years ago

ssh3 commented 6 years ago

Hello.

I have a problem with elfeed-protocol. My ttrss location is http://myhost.ru/rzz.

.emacs contains:

(setq elfeed-use-curl t)
(setq elfeed-curl-extra-arguments '("--insecure"))

(require 'elfeed-protocol)
(setq elfeed-feeds '("ttrss+http://user:passwd@myhost.ru/rzz"))
(elfeed-protocol-enable)

elfeed-log:

[2018-03-26 23:10:10] [info]: Elfeed update: March 26 2018 23:10:10 +10

apache.log:

192... - - [26/Mar/2018:23:10:10 +1000] "GET /rzz/api/ HTTP/1.0" 200 525 "-" "Emacs Elfeed 2.3.0" 192... - - [26/Mar/2018:23:10:12 +1000] "GET /rzz/api/ HTTP/1.0" 200 14470 "-" "Emacs Elfeed 2.3.0" 192... - - [26/Mar/2018:23:10:12 +1000] "GET /rzz/api/ HTTP/1.0" 200 858429 "-" "Emacs Elfeed 2.3.0"

User's data is true. Tiny Tiny RSS version is 17.12. API access is enable, and works fine with android app.

Can you help me? If it needs, I'm ready to give the additional information

fasheng commented 6 years ago

Hi, please toggle on debug and upload the full log:

(setq elfeed-log-level 'debug)

I just fixed a similar issue #3 a few days ago, do you use the latest code?

ssh3 commented 6 years ago

Thank you for quick respond.

elfeed-log: [2018-03-27 00:10:45] [info]: Elfeed update: March 27 2018 00:10:45 +10 [2018-03-27 00:10:45] [debug]: elfeed-protocol-ttrss: login

[2018-03-27 00:10:45] [debug]: elfeed-protocol-ttrss: update feed list

[2018-03-27 00:10:52] [debug]: elfeed-protocol-ttrss: update entries with action init, arg nil

[2018-03-27 00:10:55] [debug]: elfeed-protocol-ttrss: parsing entries, first-entry-id: -1 last-entry-id: -1

I used the melpa package, but files are identical.

fasheng commented 6 years ago

OK, from the log format looks it's the latest code. I only tested ttrss 17.2 and 17.4 before, maybe it caused by the latest 17.12 version, I will deploy and debug it later.

And you could help to debug with following steps:

  1. deploy and test if works with README testing steps https://github.com/fasheng/elfeed-protocol#tiny-tiny-rss
  2. if it works, import yourself feeds and retry again
  3. once the error occurred again, please hack elfeed-protocol-ttrss--parse-entries function and insert one line code in the header to dump the feed content in log buffer
    (elfeed-log 'error "debug elfeed-protocol-ttrss--parse-entries: %s" (buffer-string))

It's late here, I will debug it tomorrow. Thanks for your report~

fasheng commented 6 years ago

One more question, but there is no 17.12 version in official release page XD https://git.tt-rss.org/fox/tt-rss/releases

ssh3 commented 6 years ago

One more question, but there is no 17.12 version in official release page XD

You're fully right. I used code from the development branch, but I've already fixed it. The version of ttrss that I use now is 17.04.

elfeed-protocol-ttrss-debug.log.zip

fasheng commented 6 years ago

The logs format is correct, and I use your feeds in ttrss 17.4 with docker in local, everything is fine, too. The elfeed version is 2.3.0 and elfeed-protocol is 0.5.2. Here is the screenshots: screenshot from 2018-03-27 15-57-21

screenshot from 2018-03-27 16-21-40

I guess this may caused by the feed categories you defined in ttrss. So please help to debug again with following steps:

  1. Export your feeds to OPML file and backup
  2. Delete feeds one by one and find the minimum feeds to reproduce the issue and upload the OPML
  3. At the same time, show the content in elfeed-protocol-ttrss-feeds variable

Besides, if possible, you could try above steps in docker environment that said in README steps so will not break your ttrss settings(use image fischerman/docker-ttrss instead of clue/ttrss for 17.4 version): https://github.com/fasheng/elfeed-protocol#tiny-tiny-rss

Thanks~

ssh3 commented 6 years ago

OK, thank you for your time. I don't use docker with ttrss yet, my ttrss instance is running into lxc.

I use ttrss long time, first article pinned in summer 2013 and the size of the MySQL dump is more 300Mb. Maybe this is the cause of the problem.

I need a bit of time for deep research this situation. :) I will report about results.

fasheng commented 6 years ago

Fine, the db size should not the problem, elfeed-protocol limit the article size for per request in elfeed-protocol-ttrss-maxsize, and it only fetch the unread articles at the first update operation.

I don't use ttrss long time, maybe you custom some special categories and elfeed just forget fetch them so the articles could not find the right feed url. Anyway, hope your new debug result will point out the key :)

fasheng commented 6 years ago

The code was updated just now and will popup backtrace window to help debug when error occurs, I think this will help a lot for us:

(toggle-debug-on-error)
ssh3 commented 6 years ago

Hello. Sorry for delay - the hard work week. I still didn't discover the cause of this trouble. Everything good works when the new database contains a few feeds. But I get error if I use the big database. :\

The new config option is amazing! Log file elfeed-protocol-debug.log.zip attached.

fasheng commented 6 years ago

Thanks for your hard work, the backtrace message really helps!

This issue was caused by the wrong item "feed_id": null in some headline JSON string. Though I don't know why it happened, I will try to fix it as soon as possible.

ssh3 commented 6 years ago

You are very kind. It was easy. I'm ready to help you.

fasheng commented 6 years ago

Here is a workaround now, it should works. Glade to see your new reply ;)

fasheng commented 6 years ago

I will close this issue, thanks for your help, enjoy elfeed-protocol and welcome more advices~