Hi there! I’m seeing frequent socket (term?) crashes in a new LiveView component. It’s pretty boring, just some input tags and simple validation (no DB queries or anything). I’m on Phoenix 1.7.14.
Console log:
phx-F_Y0PgAX2pTMWzbH update: -
phx-F_Y0PgAX2pTMWzbH error: view crashed - undefined
The first line is the update object, which looks fine (not sure what exactly I’d look for, though). The second line is coming from what looks like a generic error handler in my app.js
(the channel onError
method?), so not pasting it here.
This only happens in text inputs when I type quickly. And that’s only locally (running the server in a devcontainer, so Docker, if that helps). I haven’t seen this behavior in production. When I type slowly (hunt and peck), everything seems fine. On the server side, I’m not seeing any errors, just a new connection after those console errors in the browser.
16:35:53.827 [debug] HANDLE EVENT "validate" in AiCoachWeb.VideoLive.Show
Component: AiCoachWeb.VideoLive.FormComponent
Parameters: %{"_target" => ["video", "name"], "video" => %{"name" => "aaaaaaaa"}}
16:35:53.831 [debug] Replied in 5ms
16:35:54.157 [info] CONNECTED TO Phoenix.LiveView.Socket in 34µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "REDACTED", "_live_referer" => "undefined", "_mounts" => "2", "_track_static" => %{"0" => "http://localhost:4000/assets/app.css", "1" => "http://localhost:4000/assets/app.js"}, "vsn" => "2.0.0"}
This isn’t the end of the world, but it’s pretty annoying. Also makes me concerned I have a bug somewhere.
Any debugging suggestions or ideas on squashing this?
Thanks!