You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not totally confident of what's happening, but we recently switched our carrierwave to use fog and we're seeing this error come up a TON. undefined method 'gsub' for nil:NilClass
Relevant backtrace is always
fog-aws-3.22.0/lib/fog/aws/models/storage/files.rb:128→ normalize_headers
fog-aws-3.22.0/lib/fog/aws/models/storage/files.rb:111→ head
carrierwave-2.1.1/lib/carrierwave/storage/fog.rb:494→ file
I assume it doesn't have an ETag at that point. I'm guessing that the file is there, otherwise .head_object would be returning an error.
I'm surprised I haven't seen this mentioned elsewhere, which makes me worried it's something specific to our app.
At the very least, since fetch_and_delete_header has the potential to return nil, shouldn't we safeguard calling gsub on the return value there?
@jnnttlpcktw thanks for calling this out, I also am not sure why you would be seeing this in particular. But it also seems like a buggy part of the code that we don't check for nil before trying to gsub, so seems safe/easy enough to fix.
I am not totally confident of what's happening, but we recently switched our carrierwave to use fog and we're seeing this error come up a TON.
undefined method 'gsub' for nil:NilClass
Relevant backtrace is always
I assume it doesn't have an ETag at that point. I'm guessing that the file is there, otherwise
.head_object
would be returning an error.I'm surprised I haven't seen this mentioned elsewhere, which makes me worried it's something specific to our app.
At the very least, since
fetch_and_delete_header
has the potential to returnnil
, shouldn't we safeguard callinggsub
on the return value there?VERSIONS
ruby 3.0.5
rails 7.0.5.1
fog-aws 3.22.0
carrierwave 2.1.1
carrierwave-backgrounder 0.4.2
The text was updated successfully, but these errors were encountered: