Thanks a lot @al2o3cr and @kartheek. Now is clear for me… somewhat.
Little more context about the app would help - is this phoenix app or elixir app with cowboy web sockets ? What versions of libraries you are using?
No Phoenix, just Plug.Cowboy. v.2.5.2
Check your code that’s sending data via websockets; has a stray
{:ok, "data that should be sent"}snuck in someplace where you’re expecting just"data that should be sent"?
The payload is {:ok, obj}, where obj is a json. Then I still can’t get it why this error is raised.
This is just one example of this kind of errors. I’ve encountered many as such and didn’t know where to start from. I was just looking for a rationale/pattern for analyzing them.
That’s why I was asking initially how to debug these “in general” and not particularly this error above.
An observation: it’s very frustrating that most of these Elixir error stacks go deep to the underlying Erlang libraries. As my Erlang knowledge being nil, it’s almost impossible for me to understand and debug them. ![]()


















