YunoHost-Apps / ttrss_ynh

Tiny Tiny RSS package for YunoHost
https://tt-rss.org/
GNU General Public License v3.0
17 stars 14 forks source link

Error while fetching some feed #75

Closed Josue-T closed 2 years ago

Josue-T commented 4 years ago

Hello,

I've detected that in the last ttrss version the version is not cleanly managed because the git repository directory is not installed. The consequence are:

So I purpose to manage ttrss with a git repository. It will probably avoid many issues.

rndmh3ro commented 4 years ago

@Josue-T, why do you think that errors in feed-fetching have something to do with the download not being a git-repo? And what are these feed-errors? Can you paste some logs, please?

Josue-T commented 4 years ago

@Josue-T, why do you think that errors in feed-fetching have something to do with the download not being a git-repo?

Because I tried a first time and I got a 503 error. After I just do a git clone on a temporary directory and moved the .git directory in /var/www/ttrss. After that the issue was solved and I have a version indicated in the ttrss configuration.

And what are these feed-errors? Can you paste some logs, please?

Well, I don't have any more log because I solved this issue on my production. I could try do reproduce this issue on a VM, but anyway for me it's not normal that you have something like version unknown in the configuration part of ttrss, so we also need to fix this.

rndmh3ro commented 4 years ago

Can you paste the feed that produced the error? I want to try to reproduce the issue.

I have hard a hard time believing that the error exists because of the missing git-directory or the "unknown version".

but anyway for me it's not normal that you have something like version unknown in the configuration part of ttrss, so we also need to fix this.

This happens because there is no .git directory as per this commit: https://git.tt-rss.org/fox/tt-rss/commit/f30287be652295d18e632316a66866697c26638c

Also from looking at the code, I don't see any place where the version interferes with feeds. If seems it's only used to check whether the tt-rss version is up-to-date.

Josue-T commented 4 years ago

Can you paste the feed that produced the error? I want to try to reproduce the issue.

I got this issue with this feed : https://arcturius.org/feed/

rndmh3ro commented 4 years ago

Okay, I can reproduce this issue, sorry for not believing you! If the .git directory exists (or a version_static.txt file exists as per https://community.tt-rss.org/t/im-running-a-server-on-windows-8-1-and-what-is-this/3029/19), the feed works.

Without:

[18:15:08/8826] start
[18:15:08/8826] running HOOK_FETCH_FEED handlers...
[18:15:08/8826] ... Af_Comics
[18:15:08/8826] === 0.0000 (sec)
[18:15:08/8826] feed data has not been modified by a plugin.
[18:15:08/8826] local cache will not be used for this feed
[18:15:08/8826] last unconditional update request: 2020-02-15 18:14:55
[18:15:08/8826] stored last modified for conditional request: Sat, 15 Feb 2020 12:47:40 GMT
[18:15:08/8826] fetching [https://arcturius.org/feed/] (force_refetch: 1)...
[18:15:09/8826] fetch done.
[18:15:09/8826] source last modified: 
[18:15:09/8826] unable to fetch: HTTP/1.1 503 Service Unavailable [503]

with .git/version file:

[18:26:05/8829] start
[18:26:05/8829] running HOOK_FETCH_FEED handlers...
[18:26:05/8829] ... Af_Comics
[18:26:05/8829] === 0.0000 (sec)
[18:26:05/8829] feed data has not been modified by a plugin.
[18:26:05/8829] local cache will not be used for this feed
[18:26:05/8829] last unconditional update request: 2020-02-15 18:21:41
[18:26:05/8829] stored last modified for conditional request: Sat, 15 Feb 2020 12:47:40 GMT
[18:26:05/8829] fetching [https://arcturius.org/feed/] (force_refetch: 1)...
[18:26:06/8829] fetch done.
[18:26:06/8829] source last modified: Sat, 15 Feb 2020 12:47:40 GMT
[18:26:06/8829] running HOOK_FEED_FETCHED handlers...
[18:26:06/8829] feed data has not been modified by a plugin.
[18:26:06/8829] running HOOK_FEED_PARSED handlers...
[18:26:06/8829] language: simple
[18:26:06/8829] processing feed data...
[18:26:06/8829] site_url: https://arcturius.org
[18:26:06/8829] feed_title: Les Chroniques d'Arcturius
[18:26:06/8829] checking favicon...
[18:26:06/8829] loading filters & labels...
[18:26:06/8829] 0 filters loaded.
[18:26:06/8829] processing articles...
[18:26:06/8829] guid 2,https://arcturius.org/?p=29966 / SHA1:c7dd6257a23e5b86a706f89a02a344e2805dd6ba
....

As per this issue https://github.com/YunoHost-Apps/ttrss_ynh/issues/71#issuecomment-562829178, there's probably no use in talking to the maintainer about this, as this is an unsupported setup.

So we could either use git clone to install tt-rss or create a version_static.txt inside the root-folder of tt-rss. Using git clone is probably the better option for tt-rss as it is then supported, but the worse option for yunohost as the install helper uses tar.gz to download the source.

@JimboJoe, @Josue-T, @yalh76, @anto1ne pinging you for input. :)

Josue-T commented 4 years ago

For me we can use the version_static.txt if there are no more impact. With this solution we make the install more light because having all git file is heavy and no more useful.