It seem to be a recurrent flaw about Phoenix, but still not solved.
Here is the reference : https://hexdocs.pm/phoenix/channels.html
When I try to create the chat application in the Hexdocs, chapter “Tying it all together”, I get this message in my browser when I try to join the lobby room :
Firefox can’t establish a connection to the server at ws://localhost:4000/socket/websocket?token=undefined&vsn=2.0.0.
The terminal gave me this error :
[error] Ranch listener ChannelerWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.541.0> exit with reason: {:undef, [{ChannelerWeb.RoomChannel, :child_spec, [{ChannelerWeb.Endpoint, {#PID<0.541.0>, #Reference<0.1539963333.2518417409.254495>}}], []}, {Phoenix.Channel.Server, :join, 4, [file: 'lib/phoenix/channel/server.ex', line: 25]}, {Phoenix.Socket, :handle_in, 4, [file: 'lib/phoenix/socket.ex', line: 617]}, {Phoenix.Endpoint.Cowboy2Handler, :websocket_handle, 2, [file: 'lib/phoenix/endpoint/cowboy2_handler.ex', line: 175]}, {:cowboy_websocket, :handler_call, 6, [file: '/home/michou/FUN/elixir/Labo/channeler/deps/cowboy/src/cowboy_websocket.erl', line: 528]}, {:cowboy_http, :loop, 1, [file: '/home/michou/FUN/elixir/Labo/channeler/deps/cowboy/src/cowboy_http.erl', line: 254]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}
After looking by myself, it look like the linter ALE from vim is at fault. I tried to patch it, but couldn’t find explanantion with enough details to do so. Each answer seem to assume a knowlegde of vi which I don’t have.
Can someone please explain me how to patch this problem. And tell me if we will still need to do so in the next Phoenix iteration ?
Many Thanks