Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd Jason Encoding error after new release #173

Closed
Ch4s3 opened this issue May 25, 2023 · 2 comments
Closed

Odd Jason Encoding error after new release #173

Ch4s3 opened this issue May 25, 2023 · 2 comments

Comments

@Ch4s3
Copy link

Ch4s3 commented May 25, 2023

We just rolled out 2.1.2 from 2.1.1 and immediately started seeing this error on LiveView pages:

Jason.EncodeError: invalid byte 0xC3 in <<77, 117, 115, 99, 108, 101, 32, 77, 105, 108, 107, 32, 71, 101, 110, 117, 105, 110, 101, 32, 80, 114, 111, 116, 101, 105, 110, 32, 80, 111, 119, 100, 101, 114, 44, 32, 67, 111, 111, 107, 105, 101, 115, 32, 38, 35, 51, 57, 59, 78, ...>>
  File "lib/jason.ex", line 213, in Jason.encode_to_iodata!/2
  File "lib/phoenix/socket/serializers/v2_json_serializer.ex", line 97, in Phoenix.Socket.V2.JSONSerializer.encode!/1
  File "lib/phoenix_live_view/channel.ex", line 866, in Phoenix.LiveView.Channel.push/3
  File "lib/phoenix_live_view/channel.ex", line 694, in Phoenix.LiveView.Channel.handle_changed/4
  File "gen_server.erl", line 1123, in :gen_server.try_dispatch/4
  File "gen_server.erl", line 1200, in :gen_server.handle_msg/6
  File "proc_lib.erl", line 240, in :proc_lib.init_p_do_apply/3

We're on
erlang 25.3
elixir 1.14.4
phoenix 1.7.2
jason 1.0
plug 1.14.2
phoenix_live_view 0.18.2

Unfortunately, I don't have much more in the way of details yet.

The text that's blowing up shouldn't be an issue, but when I reverted the update the problem went away.

@chrismccord
Copy link
Member

This is on the phoenix serialization side, and the pubsub change would not have effected this. If you can provide more information, please open a new issue on phoenix LV if you can better isolate the cause. Are you using push_event with your own map of data?

@Ch4s3
Copy link
Author

Ch4s3 commented May 25, 2023

That's interesting, we're not using push_event in the place where this happened. I'll try to reproduce this locally tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants