Closed sachin-gupta closed 7 years ago
redirect.html
is provided by the plugin.
I wonder if it is the ellipsis. The file is UTF-8, but Liquid seems to think it is ASCII?
Is your site source public? I’d like to be able to reproduce this issue.
Hi pathawks, code for site is private as I need to work on removal of personal information and am single handedly working :( in lack of job. I am pasting error log generated with jekyll build -d public/ JEKYLL_ENV=production
command. In the end of log error Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html
is evident.
LOG CONTENTS
Logging at level: debug
Configuration file: /builds/sachingpta/home/_config.yml
Creating a new instance of: Jekyll::Assets::Env
The old value of Sprockets:
Caching is disabled by configuration. However, if you're using proxies, a cache might still be created.
Requiring: /builds/sachingpta/home/_plugins/Rand.rb
Requiring: /builds/sachingpta/home/_plugins/emoji.rb
Requiring: /builds/sachingpta/home/_plugins/urltoqr.rb
Requiring: /builds/sachingpta/home/_plugins/RandInt.rb
Requiring: gemoji
Requiring: jekyll-admin
Requiring: jekyll-archives
Requiring: jekyll-feed
Requiring: jekyll-seo-tag
Requiring: jekyll-paginate
Requiring: jekyll-mentions
Requiring: jekyll-redirect-from
Requiring: jekyll-gist
Requiring: jekyll-compose
Requiring: jekyll-assets
Requiring: jekyll-textile-converter
Requiring: jekyll-sitemap
Requiring: pygments.rb
Requiring: rqrcode_png
Requiring: kramdown
Source: /builds/sachingpta/home
Destination: public/
Incremental build: disabled. Enable with --incremental
Generating...
Creating a new instance of: Jekyll::Assets::Env
The old value of Sprockets: #
Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:232:in
split': invalid byte sequence in US-ASCII (ArgumentError) from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:232:in
tokenize' from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:122:inparse' from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:108:in
parse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:11:inblock in parse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:47:in
measure_time' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:10:inparse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:129:in
render_liquid' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:177:inplace_in_layouts' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:91:in
run' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:463:inblock in render_pages' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:461:in
each' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:461:inrender_pages' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:191:in
render' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:69:inprocess' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/command.rb:26:in
process_site' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:63:inbuild' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:34:in
process' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:16:inblock (2 levels) in init_with_program' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
block in execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:ineach' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:ingo' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in
program' from /usr/local/bundle/gems/jekyll-3.3.1/exe/jekyll:13:in<top (required)>' from /usr/local/bundle/bin/jekyll:22:in
load' from /usr/local/bundle/bin/jekyll:22:in<main>' Exited with code: 1. Error executing child process: Error: Command failed: jekyll build -d public/ JEKYLL_ENV=production --verbose --trace Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:232:in
split': invalid byte sequence in US-ASCII (ArgumentError) from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:232:intokenize' from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:122:in
parse' from /usr/local/bundle/gems/liquid-3.0.6/lib/liquid/template.rb:108:inparse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:11:in
block in parse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:47:inmeasure_time' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/liquid_renderer/file.rb:10:in
parse' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:129:inrender_liquid' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:177:in
place_in_layouts' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/renderer.rb:91:inrun' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:463:in
block in render_pages' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:461:ineach' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:461:in
render_pages' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:191:inrender' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/site.rb:69:in
process' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/command.rb:26:inprocess_site' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:63:in
build' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:34:inprocess' from /usr/local/bundle/gems/jekyll-3.3.1/lib/jekyll/commands/build.rb:16:in
block (2 levels) in init_with_program' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:inblock in execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
each' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:inexecute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in
go' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:inprogram' from /usr/local/bundle/gems/jekyll-3.3.1/exe/jekyll:13:in
<top (required)>' from /usr/local/bundle/bin/jekyll:22:inload' from /usr/local/bundle/bin/jekyll:22:in
' Warning: Task "exec:jkbuild" failed. Use --force to continue.
Aborted due to warnings. ERROR: Build failed: exit code 1
Can you maybe provide one of your pages that includes a redirect? I'd love to have just a minimal setup that reproduces this issue so I can begin to isolate the problem.
PFA content, please note that there is no error during parsing of markdown files in the log. Am struggling hard to find this issue. Its a great opportunity to learn.
---
layout: post
comments: true
title: "PDFs: Serving On HTML5"
subtitle: "PDF.js for parsing and rendering pdf files over Web (HTML5)"
date: 2017-01-11 07:30:00 +0530
categories: _Posts PDF.js Tuts
tags: PDF.js Tuts Demo
published: true
authors: Sachin Gupta
hidefromindex: false
redirect_from:
- /pdfjsinto.html
---
test content
Solved by reverting version of gems in gemfile. However, present versions do have same issue - you may like to find any compatibility issues. Thank you very much :smile:
WORKING GEMFILE
group :jekyll_plugins do
gem "gemoji", "~> 2.1.0"
gem "pygments.rb", "~> 1.0.0"
gem "jekyll-archives", "~> 2.1.1"
gem "jekyll-assets", "~> 2.2.8"
gem "jekyll-admin", "~> 0.1.1"
gem "jekyll-feed", "~> 0.8.0"
gem "jekyll-seo-tag", "~> 2.1.0"
gem "jekyll-paginate", "~> 1.1.0"
gem "jekyll-mentions", "~>1.2.0"
gem "jekyll-redirect-from", "~> 0.11.0"
gem "jekyll-gist", "~> 1.4.0"
gem "jekyll-compose", "~> 0.5.0"
gem "jekyll-textile-converter", "~> 0.1.0"
gem "jekyll-sitemap", "~> 0.12.0"
gem 'rqrcode_png', '~> 0.1.5'
end
NOT WORKING GEMFILE
group :jekyll_plugins do
gem 'gemoji', '~> 3.0'
gem 'pygments.rb', '~> 1.1', '>= 1.1.1'
gem 'jekyll-archives', '~> 2.1', '>= 2.1.1'
gem 'jekyll-assets', '~> 2.2', '>= 2.2.8'
gem 'jekyll-admin', '~> 0.2.0'
gem 'jekyll-feed', '~> 0.8.0'
gem 'jekyll-seo-tag', '~> 2.1'
gem 'jekyll-paginate', '~> 1.1'
gem 'jekyll-mentions', '~> 1.2'
gem 'jekyll-redirect-from', '~> 0.12.1'
gem 'jekyll-gist', '~> 1.4'
gem 'jekyll-compose', '~> 0.5.0'
gem 'jekyll-textile-converter', '~> 0.1.0'
gem 'jekyll-sitemap', '~> 1.0'
gem 'rqrcode_png', '~> 0.1.5'
end
@pathawks @benbalter Could it be that it's trying to output an image or something like that as text?
I am also getting exactly the same error on jekyll-redirect. Solved by similar means as @sachin-gupta
If I install:
gem install jekyll-redirect-from -v 0.10.0
All is well. Seems to be something that was introduced post 0.10. I was transfering a website (that was working fine) to a new computer and installed the latest of redirect. When I backed off the version to 0.10 (version installed on my other machine) it worked.
FYI, a little more info. I walked the version chain forward from 0.10.0 until it stopped working. It looks like the first version that has this error is:
gem install jekyll-redirect-from -v 0.12.0
@jeffheaton Are you able to share the source of your site? This would be easier for me to track down if I could reproduce the issue myself.
@pathawks I am going to try to take it down to a minimal reproducible example. Failing that I can likely share. I will have something this week.
By the way thank you for a great tool, I use redirect-from in several sites.
This simple site has just the page that causes the issue and it seems to reproduce it:
https://github.com/jeffheaton/test-jekyll
Also, for my exact setup, I am running from this Dockerfile:
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y ruby ruby-dev make gcc nodejs git bundler
RUN gem update
RUN gem install jekyll -v 3.1.6 --no-rdoc --no-ri
RUN gem install jekyll-redirect-from -v 0.12.1 --no-rdoc --no-ri
EXPOSE 4000
As @pathawks mentioned, this seems to be caused by the two ellipses in the provided redirect.html
file bundled with the Gem. Here's the commit that introduced it.
I fixed it for now in my own site by copying that file to a custom redirect template in _layouts/redirect.html
and removing the ellipses.
For me the problem was introduced when my github-pages
gem updated my jekyll-redirect-from plugin from 0.11.0 to 0.12.1.
@jeffheaton I am unable to reproduce the issue using your test site.
Shopify/liquid#290
Using this plugin always leading to following error in GitLab CI:
GemFile Contains:
_layouts/redirect.html
is not a source file. It is some issue in new release of plugin.