Skip to content
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

No valid parser for XML #2343

Closed
2 tasks done
amztc34283 opened this issue Apr 14, 2024 · 3 comments · Fixed by #2347
Closed
2 tasks done

No valid parser for XML #2343

amztc34283 opened this issue Apr 14, 2024 · 3 comments · Fixed by #2347
Labels

Comments

@amztc34283
Copy link
Contributor

amztc34283 commented Apr 14, 2024

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

Feed parser could be loading empty xml file even the format is matching.

How to reproduce the bug

  1. Set external_sources in the config file to medium.com and the corresponding rss_url
external_sources:
  - name: medium.com
    rss_url: https://medium.com/@billy.chau./feed
  1. docker compose up

Please notice the error does not occur every time and it is hard to predict when will happen.

Error messages and logs

amztc34283githubio-jekyll-1  | "Fetching external posts from medium.com:"
amztc34283githubio-jekyll-1  | /var/lib/gems/3.0.0/gems/feedjira-3.2.3/lib/feedjira.rb:59:in `parse': No valid parser for XML. (Feedjira::NoParserAvailable)
amztc34283githubio-jekyll-1  | 	from /srv/jekyll/_plugins/external-posts.rb:15:in `block in generate'
amztc34283githubio-jekyll-1  | 	from /srv/jekyll/_plugins/external-posts.rb:12:in `each'
amztc34283githubio-jekyll-1  | 	from /srv/jekyll/_plugins/external-posts.rb:12:in `generate'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:193:in `block in generate'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `each'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `generate'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:79:in `process'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:28:in `process_site'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:65:in `build'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:36:in `process'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `each'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
amztc34283githubio-jekyll-1  | 	from /var/lib/gems/3.0.0/gems/jekyll-4.3.3/exe/jekyll:15:in `<top (required)>'
amztc34283githubio-jekyll-1  | 	from /usr/local/bin/jekyll:25:in `load'
amztc34283githubio-jekyll-1  | 	from /usr/local/bin/jekyll:25:in `<main>'

What operating system are you using?

Mac

Where are you seeing the problem on?

Running locally with Docker

More info

I suspect this issue is from rendering order but not sure as I have not looked into it.

Update: VPN could also cause the problem.

@amztc34283 amztc34283 added the bug label Apr 14, 2024
@george-gca
Copy link
Collaborator

Since the error occurs sporadic, it is probably because of your VPN, which may be failing to download the XML atom correctly. Ìf you check feedjira documentation, it states:

Parse XML with first compatible parser

Which means, it checks if the returned (assumed) XML file can be parsed by one of its parsers. This error message is kind of misleading, since it is not that it hasn't a parser, but that the file given to be parsed is not a valid parseable XML file.

@george-gca
Copy link
Collaborator

But thinking about it now, it would be useful to add a check if the file was fetched successfully in the external posts plugin. Would you mind sending a PR for this?

@amztc34283
Copy link
Contributor Author

I am more than happy to create the PR.

george-gca pushed a commit that referenced this issue Apr 16, 2024
BoAi01 pushed a commit to BoAi01/boai01.github.io that referenced this issue May 7, 2024
siril-teja pushed a commit to siril-teja/siril-teja.github.io-old that referenced this issue Jun 19, 2024
karapostK pushed a commit to karapostK/karapostK.github.io that referenced this issue Jul 4, 2024
Suraj-Bhor pushed a commit to Suraj-Bhor/suraj-bhor.github.io that referenced this issue Aug 13, 2024
meiqing-wang pushed a commit to meiqing-wang/meiqing-wang.github.io that referenced this issue Oct 13, 2024
avishekanand pushed a commit to avishekanand/al-folio-homepage that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants