jekyll/jekyll-gist

Liquid Exception: GET 404 Not Found

DirtyF opened this issue ยท 8 comments

If I don't set noscript: false in _config.yml, a Liquid exception is raised at build time:

/Users/frank/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/jekyll-gist-1.4.0/lib/jekyll-gist/gist_tag.rb:86: warning: constant Jekyll::Gist::GistTag::TimeoutError is deprecated
  Liquid Exception: GET https://api.github.com/gists/DirtyF/24cb9c96b64173ecd85578f38bcc940d: 404 - Not Found // See: https://developer.github.com/v3 in /Users/frank/code/jekyll-fr.org/_posts/2016-09-18-utiliser-des-plugins-jekyll-avec-github-pages.markdown
jekyll 3.2.1 | Error:  GET https://api.github.com/gists/DirtyF/24cb9c96b64173ecd85578f38bcc940d: 404 - Not Found // See: https://developer.github.com/v3

I don't know if it's related, but even if I add a JEKYLL_GITHUB_TOKEN with Gist, our tiny blog takes more than a minute to build ๐Ÿข , with just two embedded Gists, whereas without gists it takes a few seconds. ๐ŸŽ

At this point, I might as well remove the gists and insert code snippets ๐Ÿ˜ฅ

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

parkr commented

@DirtyF It sounds like the timeouts we're using to fetch the gists are fairly high (30s to create connection, 30s to read, etc). Getting a 404 means the URL it's trying to hit doesn't exist โ€“ did you confirm that the gist still exists? Maybe our URL needs to be updated.

Thanks @parkr for the reply โค๏ธ

I re-checked and the issue is still present if I remove gist.no-scriptoption from config.

/Users/frank/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/jekyll-gist-1.4.0/lib/jekyll-gist/gist_tag.rb:86: warning: constant ::TimeoutError is deprecated
  Liquid Exception: GET https://api.github.com/gists/DirtyF/24cb9c96b64173ecd85578f38bcc940d: 404 - Not Found // See: https://developer.github.com/v3 in /Users/frank/code/jamstatic.fr/_posts/2016-09-18-utiliser-des-plugins-jekyll-avec-github-pages.markdown
jekyll 3.3.1 | Error:  GET https://api.github.com/gists/DirtyF/24cb9c96b64173ecd85578f38bcc940d: 404 - Not Found // See: https://developer.github.com/v3

What I don't get is that https://gist.github.com/DirtyF/24cb9c96b64173ecd85578f38bcc940d exists. ๐Ÿค”

Gists are referenced by their ID alone, no need to put a username in front.

- {% gist DirtyF/24cb9c96b64173ecd85578f38bcc940d %}
+ {% gist 24cb9c96b64173ecd85578f38bcc940d %}

Indeed, it works if I remove the GitHub username. ๐ŸŽ‰

Thanks! @pathawks

FYI I just followed blindly the example usage given in the README ๐Ÿ˜•

parkr commented

We should simply strip the username from the gist ID when noscript: true.

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

jrfnl commented

Can someone please reopen this issue as it is still a thing. Just ran into this myself. And yes, the gist being referered to does exist.

C:/path-to/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-gist-1.4.1/lib/jekyll-gist/gist_tag.rb:96: warning: constant ::TimeoutError is deprecated
  Liquid Exception: GET https://api.github.com/gists/jrfnl/e5af95370fdb834ad7d696b4112c8d0c: 404 - Not Found // See: https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist in gisttest.md
jekyll 3.6.2 | Error:  GET https://api.github.com/gists/jrfnl/e5af95370fdb834ad7d696b4112c8d0c: 404 - Not Found // See: https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist