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

Blank Page with error log #706

Open
nanocodex opened this issue Feb 18, 2024 · 3 comments
Open

Blank Page with error log #706

nanocodex opened this issue Feb 18, 2024 · 3 comments

Comments

@nanocodex
Copy link

nanocodex commented Feb 18, 2024

Description:

I was locally hosting WhatATheme for my personal website. But when I navigated to http://localhost:4000/admin, I got the error log shown below.

Tell us a bit about yourself:

  • Version of JekyllAdmin I'm using <HINT: use bundle show to check>: 0.9.0
  • Version of Jekyll I'm using <HINT: use bundle show to check>: 3.9.5
  • Version of NodeJS I'm using <HINT: use node -v to check>: v18.17.0
  • Operating System <e.g. OS X, Windows>: Windows 11
  • Browser <e.g, Safari, Chrome>: Firefox

Steps to reproduce:

  1. Install WhatATheme
  2. Run bundle exec jekyll serve --livereload
  3. Go to http://localhost:4000/admin
  4. View powershell terminal

I expected the following:

The Jekyll Admin GUI for version 0.9.0 to load

But got the following, instead:

A blank page and the following chunk of error log:

Configuration file: C:/.../nanocodex.github.io/_config.yml
Configuration file: C:/.../nanocodex.github.io/_config.yml
2024-02-18 12:52:03 - TypeError - no implicit conversion of Hash into Integer:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-admin-0.9.0/lib/jekyll-admin/server/configuration.rb:36:in read' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-admin-0.9.0/lib/jekyll-admin/server/configuration.rb:36:in raw_configuration'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-admin-0.9.0/lib/jekyll-admin/server/configuration.rb:7:in block (2 levels) in <class:Server>' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in block in compile!' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in block (3 levels) in route!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in route_eval' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in block (2 levels) in route!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in block in process_route' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in catch'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in process_route' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in block in route!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in each' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in route!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in block in dispatch!' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in block in invoke'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in catch' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in invoke'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in dispatch!' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in block in call!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in block in invoke' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in catch'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in invoke' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in call!'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/xss_header.rb:18:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/path_traversal.rb:16:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/json_csrf.rb:18:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-protection-1.5.5/lib/rack/protection/frame_options.rb:31:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-1.6.13/lib/rack/nulllogger.rb:9:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-1.6.13/lib/rack/head.rb:13:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in call' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in block in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in synchronize' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in call'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rack-1.6.13/lib/rack/handler/webrick.rb:88:in service' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in service'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in run' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in block in start_thread'

Other details:

  1. I censored out the user directory in the first two lines of the error log
  2. Under Jekyll Installation Requirements, I realised that I do not have GCC and Make installed. I would prefer not to download them however, because the download page for them is way too confusing for me to navigate 😵‍💫
  3. The source files for my personal website is available here
  4. I asked my friend @dentolos19 to see if he could get it working on his machine. But when he tried using Jekyll Admin on Docker, he received the same error message.
  5. I am aware that this issue is very similar to another one, but the OP for that issue had a different error log in their console (with the little information present I could infer in the attached screenshot)
nanocodex added a commit to nanocodex/nanocodex.github.io that referenced this issue Feb 18, 2024
(In case I can use it in the future)
[Jekyll Admin is currently bugged out](jekyll/jekyll-admin#706)
@nanocodex
Copy link
Author

Update: The solution I found was to update jekyll-admin to the latest version:
gem 'jekyll-admin', '~> 0.11.1'

Also relevant

I got the following error when I tried launching Jekyll Admin on rack version 3.0.10:

internal:C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:37:in `require': cannot load such file -- rack/handler (LoadError)

After searching, I found this post saying that:

As of version 3.0 Rack::Handler was removed from rack and pulled out into its own gem (rackup).

To fix the error, add gem 'rackup' to the gemfile:

gem 'rack'
gem 'rackup'

@nanocodex
Copy link
Author

nanocodex commented Apr 10, 2024

Update

Upon further local testing, it seems that Jekyll Admin has trouble allowing me to change and edit files when using the rack ~> 3.0 and rackup gems.

Respective versions that caused this bug to happen are as follows:

  • Jekyll Admin 0.11.1
  • Rack 3.0.10
  • Rackup 2.1.0

Rolling back rack to a version below 3.0 (I used version 1.6.13) and hence removing the rackup gem seems to solve the problem. However, Jekyll Admin still says that it "could not fetch the config" even if the _config.yml file was successfully updated. Just like the issue linked, it has the exact same issue when updating any other file in the site.

Also to note

Regardless of whether Jekyll Admin is using gem "rack", "< 3.0" or gem "rack", "~> 3.0" paired with gem "rackup", the homepage configuration no longer works, instead always defaulting to pages. No matter what you set it as in _config.yml:

jekyll_admin:
  homepage: "posts"

The above configuration does not work.

@nanocodex nanocodex reopened this Apr 10, 2024
@vcavallo
Copy link

#620 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants