Open Aqualon opened 1 year ago
m = MetaInspector.new('https://karriere.westfalen.com/job/M%C3%BCnster-HR-Business-Partner-(mwd)/920832901/') m.images.best
raises
/gems/fastimage-2.2.6/lib/fastimage.rb:235:in `initialize': undefined method `start_with?' for nil:NilClass (NoMethodError)
This happens in https://github.com/metainspector/metainspector/blob/35e3e75875ecbbb56fb7b0a5c17adc69baed1cb3/lib/meta_inspector/parsers/images.rb#L44-L47 because MetaInspector passes a nil URL to FastImage.size. The imgs_with_size variable looks like this for the failing URL.
nil
FastImage.size
imgs_with_size
[["https://rmkcdn.successfactors.com/241be56e/a93393ca-2eac-4e3c-b06e-e.png", nil, nil], [nil, nil, nil]]
Figure out, that this is a changed behavior in fastimage 2.2.2 onwards.
Thanks for the bug report @Aqualon !
I'll have a look when I find some time, feel free to send a PR to fix that if you feel so inclined :)
raises
This happens in https://github.com/metainspector/metainspector/blob/35e3e75875ecbbb56fb7b0a5c17adc69baed1cb3/lib/meta_inspector/parsers/images.rb#L44-L47 because MetaInspector passes a
nil
URL toFastImage.size
. Theimgs_with_size
variable looks like this for the failing URL.