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

the scheme https does not accept registry part: pixelfed.org' (or bad hostname?) (URI::InvalidURIError) #163

Closed
xplosionmind opened this issue Nov 27, 2021 · 9 comments

Comments

@xplosionmind
Copy link

Error when running bundle exec jekyll webmention. Log:

~/tommi.space [main] » bundle exec jekyll webmention
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:  the scheme https does not accept registry part: pixelfed.org' (or bad hostname?)
/Users/tommi/.rbenv/versions/3.0.2/lib/ruby/3.0.0/uri/generic.rb:207:in `initialize': the scheme https does not accept registry part: pixelfed.org' (or bad hostname?) (URI::InvalidURIError)
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/3.0.0/uri/common.rb:82:in `new'
	from /Users/tommi/.rbenv/versions/3.0.2/lib/ruby/3.0.0/uri/common.rb:82:in `for'
	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-65efd7dd058b/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-65efd7dd058b/lib/jekyll/commands/webmention.rb:47: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-65efd7dd058b/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-65efd7dd058b/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-65efd7dd058b/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-65efd7dd058b/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-65efd7dd058b/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
Copy link
Collaborator

So this looks like a busted URL to me. If you look at the error message it reports pixelfed.org'. Notice the stray single quote at the end of the host name. Can you just the link in the markdown text or wherever it's present to see if it's malformed?

@xplosionmind
Copy link
Author

As mentioned in #162, the issue persist. Formatting is correct, 100% sure.

Note: in .jekyll-cache/webmention_io_outgoing.yml I see some links ending with a ' which should not be there. Content of the file is here.

@fancypantalons
Copy link
Collaborator

fancypantalons commented Jan 22, 2022

I just checked the source file and I see you're using HTML-style links instead of markdown links, which is almost certainly confusing some regular expression somewhere... I'll poke around and see if I can find the root cause, but the original code was almost certainly not written with that in mind!

Edit: Scratch that, I think the real issue is that the URLs are wrapped in single quotes, and the current regex doesn't account for that. Probably a minor fix, just working to replicate the issue, now, so I can test.

fancypantalons added a commit that referenced this issue Jan 23, 2022
Update the regex used to find URLs to account for single quotes in the
pattern.
@fancypantalons
Copy link
Collaborator

@xplosionmind Alright, I was able to replicate the issue in a small test site and pushed a fix. Feel free to pull the main branch and give 'er a try.

@xplosionmind
Copy link
Author

Uhm… I think there still is some sort of error, though not the same. Now no Webmentions at all are sent, when running bundle exec jekyll webmention:

Configuration file: /Users/tommi/tommi.space/_config.yml
[jekyll-webmention_io] Getting ready to send webmentions (this may take a while).
[jekyll-webmention_io] 0 webmentions sent.

@fancypantalons
Copy link
Collaborator

The change I made only impacts the webmention gathering/queuing phase which occurs when you run a site build (i.e. bundle exec jekyll build).

Can you check <cache>/webmention_io_outgoing.yml to confirm there are outstanding webmentions that are queued to be sent?

@xplosionmind
Copy link
Author

Can you check <cache>/webmention_io_outgoing.yml to confirm there are outstanding webmentions that are queued to be sent?

Yes! There are! Is it normal that all of the links listed end with : false? Does it mean that the destination website has not been pinged yet?

@fancypantalons
Copy link
Collaborator

Yup, that's exactly what that means.

@fancypantalons
Copy link
Collaborator

Closing this based on the previously pushed fix. If there's still an issue we can reopen or start a new ticket!

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