Direct S3 upload - generates shrine undefined method `bytesize' for #<Array

I am following the wiki Adding Direct S3 Uploads

The upload to cache works great
When I try to submit and save the record it fails with the following error:

Processing by PhotosController#create as HTML
Parameters: {“authenticity_token”=>“mtzUus5QVgkvkOUl+tirj2k69vzBykYTiXH6vCQoeWUTdj75KbTkAmbvlK44Gyj3DtuyALt90PmxircPHExzLg==”, “photo”=>{“title”=>“upload-test”, “image”=>"{“id”:“f0c5fccdf9de1d72dc647f2a6f019aa5.jpg”,“storage”:“cache”,“metadata”:{“size”:20,“filename”:“file.name”,“mime_type”:“mp4”}}"}, “commit”=>“Create Photo”}
Completed 500 Internal Server Error in 28ms (ActiveRecord: 0.0ms | Allocations: 3769)
NoMethodError (undefined method `bytesize’ for #Array:0x00007fc419d33b48):

Started OPTIONS "/s3/params?filename=boulder.jpg&type=image%2Fjpeg&" for ::1 at 2020-07-25 00:51:50 -0700
Started GET "/s3/params?filename=boulder.jpg&type=image%2Fjpeg&" for ::1 at 2020-07-25 00:51:50 -0700
Started POST "/photos" for ::1 at 2020-07-25 00:52:42 -0700
Processing by PhotosController#create as HTML
  Parameters: {"authenticity_token"=>"dbc/hv8Vk9t5u/3Obzv18H9xs4Ppo1826WrU6Euhl5L8HdXFGPEh0DDEjEWt+HaIGJD3f5MUydzRkZlbc8Ud2Q==", "photo"=>{"title"=>"jm", "image"=>"{\"id\":\"2442b6332011889063beefa720a65563.jpg\",\"storage\":\"cache\",\"metadata\":{\"size\":17017,\"filename\":\"boulder.jpg\",\"mime_type\":\"image/jpeg\"}}"}, "commit"=>"Create Photo"}
Completed 500 Internal Server Error in 24ms (ActiveRecord: 0.0ms | Allocations: 3651)

NoMethodError (undefined method `bytesize’ for #Array:0x00007fc41e020208):

I got the same error recently when updating my Ruby version and all my gems.
In my case Fastimage could not get the cached image dimensions anymore.

I reverted to previous gemfile.lock and only updgraded the Ruby version and it was fixed.
Though I did not take time to investigate what gem caused the issue …

Have you updated some gems recently ?

EDIT: At the moment, with the following versiosn it works on my side :
Shrine 3.2.1
Fastimage 2.1.5
image_processing 1.10.3
mini_magick 4.10.1
mimemagick 0.3.5

under Ruby 2.6.2

Thanks - gives me a place to look at more closely

It looks the same as this issue – https://github.com/shrinerb/shrine/issues/492.

Thanks - looks like it, working on it now.

It is working fine now - thanks