New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing a particular rss feed (not all feeds) #281

Closed
JackDandy opened this Issue Sep 16, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@JackDandy
Contributor

JackDandy commented Sep 16, 2016

Ref: NZBGet 18.0-testing

Hello,

First caught my eye in Messages ... [error] "Error parsing rss feed: Declaration has an invalid name."

I go to Settings / RSS Feeds to search which feed the error is referring to (consider adding the Feed number to the error msg e.g. "Error parsing rss feed [n]")

I click "Change" on each feed in turn until a dialog displays ... title: "Error" ... body: "Could not read feed"
the "Feed URL" ... [edit: link removed - no use]

The Feed URL does render as expected in a browser and used to work fine in the app.

It may be that there has been no change in the apps RSS parser and that the change is at the server side, however, this issue highlights something amiss in the parser and shows the browser is more forgiving.

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Sep 16, 2016

Member

Nzbget uses libxml2 to parse rss. An error can only mean that the xml is invalid.
There is usually multiple messages printed to understand context of the message.

If you can send me the content of the feed I could try to debug this although I may be not able to make the invalid xml to work as the error comes from libxml and it may not have option to ignore such kind of errors.

In any case it would be better to fix the issue on server side if it indeed generates invalid xml.

Member

hugbug commented Sep 16, 2016

Nzbget uses libxml2 to parse rss. An error can only mean that the xml is invalid.
There is usually multiple messages printed to understand context of the message.

If you can send me the content of the feed I could try to debug this although I may be not able to make the invalid xml to work as the error comes from libxml and it may not have option to ignore such kind of errors.

In any case it would be better to fix the issue on server side if it indeed generates invalid xml.

@JackDandy

This comment has been minimized.

Show comment
Hide comment
@JackDandy

JackDandy Sep 16, 2016

Contributor

Simply add the url I posted with your own api key.

Contributor

JackDandy commented Sep 16, 2016

Simply add the url I posted with your own api key.

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Sep 16, 2016

Member

He-he, if I had an api key I wouldn't ask.

Member

hugbug commented Sep 16, 2016

He-he, if I had an api key I wouldn't ask.

@JackDandy

This comment has been minimized.

Show comment
Hide comment
@JackDandy

JackDandy Sep 16, 2016

Contributor

Ahh, download rss page txt.

It may be that a particular element like say a CDATA block is throwing libxml off, perfectly legal but still causing issue. Therefore, the feed could to be "cleansed" before being passed to the parser, that way, all other sites with a similar markup would get fixed too, this would be preferable over chasing site owners who then have to chase newznab etc devs, etc. etc.

Contributor

JackDandy commented Sep 16, 2016

Ahh, download rss page txt.

It may be that a particular element like say a CDATA block is throwing libxml off, perfectly legal but still causing issue. Therefore, the feed could to be "cleansed" before being passed to the parser, that way, all other sites with a similar markup would get fixed too, this would be preferable over chasing site owners who then have to chase newznab etc devs, etc. etc.

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Sep 18, 2016

Member

The file works OK for me.
And everything I said about libxml is irrelevant as it seems you run NZBGet on Windows where msxml is used instead.
I'll test on Windows later.

Member

hugbug commented Sep 18, 2016

The file works OK for me.
And everything I said about libxml is irrelevant as it seems you run NZBGet on Windows where msxml is used instead.
I'll test on Windows later.

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Sep 19, 2016

Member

It worked on Windows too.
The issue is probably that the feed you see in a browser isn't the same feed nzbget tries to parse. For example nzbget becomes an error message from indexer.

I've improved error reporting:

  • feed name or id is printed on errors;
  • on error the temporary file with feed content is now preserved in tmp-directory and an error message containing file path name is printed for the info purpose.

If you compile nzbget yourself please compile from develop branch. Otherwise I can send you the current develop version. Send me a note to nzbget@gmail.com.

Member

hugbug commented Sep 19, 2016

It worked on Windows too.
The issue is probably that the feed you see in a browser isn't the same feed nzbget tries to parse. For example nzbget becomes an error message from indexer.

I've improved error reporting:

  • feed name or id is printed on errors;
  • on error the temporary file with feed content is now preserved in tmp-directory and an error message containing file path name is printed for the info purpose.

If you compile nzbget yourself please compile from develop branch. Otherwise I can send you the current develop version. Send me a note to nzbget@gmail.com.

@JackDandy

This comment has been minimized.

Show comment
Hide comment
@JackDandy

JackDandy Sep 25, 2016

Contributor

Issue solved. Thank you.

Note to users: check all chars in a URL for an stray tabulation that may have come in via a copy/paste.

Contributor

JackDandy commented Sep 25, 2016

Issue solved. Thank you.

Note to users: check all chars in a URL for an stray tabulation that may have come in via a copy/paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment