aarongustafson / jekyll-webmention_io

A Jekyll Plugin for rendering Webmentions via Webmention.io
https://aarongustafson.github.io/jekyll-webmention_io/
MIT License
139 stars 27 forks source link

“Error: bad URI(is not URI?)” when sending Webmentions #161

Closed xplosionmind closed 3 years ago

xplosionmind commented 3 years ago

When running bundle exec jekyll webmention locally, I get:

NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See https://github.com/sparklemotion/nokogiri/issues/2205 for more information.
Configuration file: /Users/tommi/tommi.space/_config.yml
[jekyll-webmention_io] Getting ready to send webmentions (this may take a while).
jekyll 4.2.1 | Error:  bad URI(is not URI?): https://en.wikipedia.org/wiki/Goodbye,\_Mr.\_Chips
/Users/tommi/.rbenv/versions/3.0.2/lib/ruby/3.0.0/uri/rfc2396_parser.rb:176:in `split': bad URI(is not URI?): https://en.wikipedia.org/wiki/Goodbye,\\_Mr.\\_Chips (URI::InvalidURIError)
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/3.0.0/uri/rfc2396_parser.rb:210:in `parse'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/webmention_io.rb:366:in `uri_ok?'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:43:in `block (2 levels) in process'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:33:in `each'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:33:in `block in process'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:32:in `each'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:32:in `process'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/jekyll-webmention_io-85c6b7d9a7eb/lib/jekyll/commands/webmention.rb:14:in `block (2 levels) in init_with_program'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/exe/jekyll:15:in `<top (required)>'
    from /Users/tommi/.rbenv/versions/3.0.2/bin/jekyll:25:in `load'
    from /Users/tommi/.rbenv/versions/3.0.2/bin/jekyll:25:in `<top (required)>'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli/exec.rb:58:in `load'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli/exec.rb:58:in `kernel_load'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli/exec.rb:23:in `run'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli.rb:478:in `exec'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli.rb:31:in `dispatch'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/cli.rb:25:in `start'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/exe/bundle:49:in `block in <top (required)>'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
    from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.31/exe/bundle:37:in `<top (required)>'
    from /Users/tommi/.rbenv/versions/3.0.2/bin/bundle:23:in `load'
    from /Users/tommi/.rbenv/versions/3.0.2/bin/bundle:23:in `<main>'
fancypantalons commented 3 years ago

Doh! This is basically the same issue as issue #161, only it's the failure to encode the URI when sending a webmention to a target. I'll deal with this this week, it's a very simple fix.

xplosionmind commented 3 years ago

This is basically the same issue as issue #161

I figured. Thank you very much!

xplosionmind commented 3 years ago

I am sorry, issue closed by accident

fancypantalons commented 3 years ago

Alright, I've pushed a fix for this as well!