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

Net::ReadTimeout on Rails 6 with SVG favicon #33

Open
amingilani opened this issue Sep 23, 2019 · 5 comments
Open

Net::ReadTimeout on Rails 6 with SVG favicon #33

amingilani opened this issue Sep 23, 2019 · 5 comments

Comments

@amingilani
Copy link

amingilani commented Sep 23, 2019

Hi, this may be related to #31

I've run through the steps as usual on your site, installed rails_real_favicon in :development, run bundle install and copied the configuration into config/favicon.json with the following:

    "master_picture": "app/assets/images/brand-mark.svg"

However, generating the favicon throws this:

rails generate favicon
Running via Spring preloader in process 38793
Traceback (most recent call last):
	40: from -e:1:in `<main>'
	39: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	38: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	37: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
	36: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
	35: from /Users/gilani/Sandbox/project/bin/rails:9:in `<main>'
	34: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.1.10/lib/zeitwerk/kernel.rb:23:in `require'
	33: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	32: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
	31: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	30: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
	29: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
	28: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/commands.rb:18:in `<main>'
	27: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke'
	26: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform'
	25: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	24: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	23: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	22: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/commands/generate/generate_command.rb:26:in `perform'
	21: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/railties-6.0.0/lib/rails/generators.rb:276:in `invoke'
	20: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	19: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/group.rb:232:in `dispatch'
	18: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `invoke_all'
	17: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `map'
	16: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `each'
	15: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `block in invoke_all'
	14: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	13: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	12: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/rails_real_favicon-0.0.13/lib/generators/favicon_generator.rb:32:in `generate_favicon'
	11: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:605:in `start'
	10: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:920:in `start'
	 9: from /Users/gilani/.rvm/gems/ruby-2.6.3/gems/rails_real_favicon-0.0.13/lib/generators/favicon_generator.rb:36:in `block in generate_favicon'
	 8: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1479:in `request'
	 7: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
	 6: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1506:in `catch'
	 5: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:1509:in `block in transport_request'
	 4: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http/response.rb:29:in `read_new'
	 3: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http/response.rb:40:in `read_status_line'
	 2: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
	 1: from /Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/Users/gilani/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/protocol.rb:217:in `rbuf_fill': Net::ReadTimeout with #<TCPSocket:(closed)> (Net::ReadTimeout)
@amingilani
Copy link
Author

amingilani commented Sep 23, 2019

This problem did not occur when I converted my SVG image to a PNG image and reran the same steps. It appears as though this gem is not compatible with SVG images.

I can document it for you if you'd point me in the right direction :)

@gordienko
Copy link

I had the same problem on rails 6, the same application but on rails 5.2 worked fine. Used also svg.

@amingilani
Copy link
Author

In that case, this is likely a bug.

@crivotz
Copy link

crivotz commented Feb 24, 2020

Pr #36 fix this problem. You can close it

@justinkuntz
Copy link

I did this with a svg and passed -t 90 and it processed everything.

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

4 participants