Skip to content

TypeError can't dump IO (TypeError) with rails 7 and attr_encrypted 4.0.0 #451

@thibaut-pro

Description

@thibaut-pro

We hit this error after upgrading to rails 7 and attr_encrypted 4.0.0:

TypeError
can't dump IO (TypeError)

      value = options[:marshal] ? options[:marshaler].send(options[:dump_method], value) : value.to_s

It looks like the gem was no longer able to handle an encrypted json object in a payload. We fixed it by converting the payload to a hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions