Hi guys, first question ever in this amazing forum.
I’m an Elixir (and Phoenix) newbie who spent some months learning and experimenting last year and currently getting back at it (Primary language is Python).
I’m interested in Channels and following this tutorial: https://hexdocs.pm/phoenix/channels.html
On the step where it says “Save the file and your browser should auto refresh, thanks to the Phoenix live reloader. If everything worked, we should see “Joined successfully” in the browser’s JavaScript console”, I get an error both in the browser console and CLI:
Browser: Unable to join {reason: "join crashed"}
CLI:
[error] {:EXIT, {:undef, [{MychannelsWeb.RoomChannel, :start_link, [{%{}, {#PID<0.445.0>, #Reference<0.515670472.1991507970.133374>}, %Phoenix.Socket{assigns: %{}, channel: M
ychannelsWeb.RoomChannel, channel_pid: nil, endpoint: MychannelsWeb.Endpoint, handler: MychannelsWeb.UserSocket, id: nil, join_ref: "165", joined: false, private: %{}, pubsub
_server: Mychannels.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "room:lobby", transport: :websocket, transport_pid: #PID<0.445.0>}}], []}, {:superv
isor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 379]}, {:supervisor, :handle_call, 3, [file: 'supervisor.erl', line: 404]}, {:gen_server, :try_handle_call, 4, [fil
e: 'gen_server.erl', line: 661]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 690]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}
The only difference with the tutorial is the App name ‘Mychannels’ (instead ‘Hello’).
Any pointers on what could be the problem?
Thanks in advance!