Exception whilst processing onebox


(Dean Taylor) #1

I’m checking though logs after importing a site and a queued sidekiq process just output this exception:

exception: undefined method `request_uri' for #<URI::Generic:0x007fd428646aa0>

context: {:current_db=>"default", :current_hostname=>"forum.example.club", :url=>"http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=488349&in_page_id=1770"}
backtrace: /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/standard_embed.rb:75:in `fetch_response'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/standard_embed.rb:79:in `fetch_response'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/standard_embed.rb:7:in `raw'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/whitelisted_generic_onebox.rb:192:in `data'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/whitelisted_generic_onebox.rb:172:in `generic_html'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/engine/whitelisted_generic_onebox.rb:181:in `to_html'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/preview.rb:37:in `engine_html'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/onebox-1.3.8/lib/onebox/preview.rb:14:in `to_s'
/var/www/discourse/lib/oneboxer.rb:127:in `block in onebox_raw'

So far has occued for both these urls:


More callstack and backtrace info here:


(Sam Saffron) #2

This is still failing @techAPJ can you send through a PR to fix it.


(Arpit Jalan) #3

PR sent:

https://github.com/discourse/onebox/pull/222


(Arpit Jalan) #4