Searching throws ArgumentError - invalid byte sequence in UTF-8
Closed this issue · 4 comments
bartkamphorst commented
Searching in gollum using the RJGit adapter throws an ArgumentError. The relevant part of the stack trace:
ArgumentError - invalid byte sequence in UTF-8:
org/jruby/RubyString.java:3806:in `scan'
[...]/gollum-lib/lib/gollum-lib/wiki.rb:518:in `block in search'
[...]/gollum-lib_rjgit_adapter/lib/rjgit_adapter/git_layer_rjgit.rb:173:in `block in grep'
org/jruby/RubyArray.java:1734:in `each'
[...]/gollum-lib_rjgit_adapter/lib/rjgit_adapter/git_layer_rjgit.rb:170:in `grep'
[...]/gollum-lib/lib/gollum-lib/wiki.rb:512:in `search'
[...]/gollum/lib/gollum/app.rb:473:in `block in GET /gollum/search'
dometto commented
More specific context? I can't reproduce this on the standard lotr test repo, nor when I add a page containing some utf-8 characters. Note that sometimes a repo gets corrupted by first using grit on it, then switching back to rjgit/rugged. I think grit does some bad things with the encodings. :)
My versions:
Gollum 5.0.1b
Running on: java with Ruby version 2.5.0
Using:
rjgit 5.5.0.0
gollum-rjgit_adapter 0.3.4
gollum-lib 5.0.a.4
With the following renderers:
kramdown 2.1.0
bartkamphorst commented
$ bundle exec gollum --versions
Gollum 5.0.1b
Running on: java with Ruby version 2.3.3
Using:
rjgit 5.5.0.0
gollum-rjgit_adapter 0.3.4
gollum-lib 5.0.a.4
With the following renderers:
kramdown 2.1.0
The issue went away though with a brand new wiki repo.
dometto commented
I would assume this is the aforementioned grit bug then. Should we close this or do you want to keep it open?
bartkamphorst commented
Might as well close it for now since I haven't been able to reproduce it so far.