Open ioleo opened 1 year ago
As a workaround, I'm doing rawToken.grouped(120).toList
, the API then takes a List[String]
instead, and on frontend side I do rawTokenParts.mkString
. Works.
I got into the same issue again. This time I had:
case class UserView(
// ...
roles: List[String]
)
and users fetched from database had either user
or admin
roles (note: both short strings, shorter than 127 chars).
Yet I got the same deserializer error.
Trying other collections like Vector
does not help either.
Any ideas what this might be? /cc @ochrons @japgolly
I wonder why readInt
gets invoked when my case class does not have any Int
fields?
/cc @cquiroz
I don't have much to add to this. I've used boopickle a lot with property tests (which generates massive strings) and I've never seen it fail. If you could provide a reproduction, a failing test case, that would really help.
I wonder why
readInt
gets invoked when my case class does not have anyInt
fields?
Encoders for other formats will serialise ints. Eg. string length and list length.
I got into the same issue again. This time I had:
Usually, I have seen these kind of errors, when the wrong codec is used for decoding in the frontend. Like, you might be returning an error message in the backend and the frontend wants to decode it as a success. Do you have more logs for these events? Or can you somehow reproduce it in a contained example?
In one of the responses I return a raw token:
which for some reason, when deserializing on frontend, triggers this error:
DeserializerError(java.lang.IllegalArgumentException: Unknown integer coding)
Experimenting a little, I think this is because the string is so long. By trial and error I determined that a 127-characters long string is OK, anything larger triggers the error.
source