Unable to connect to websocket

Hello friends, Elixir newbie here.

I am currently learning Elixir by following a guide on https://hexdocs.pm/phoenix/channels.html#content.

The issue I’m having is that I am unable to connect to websocket even though I followed the guide word for word. I am currently stuck on Joining Channels section.

According to the guide, when I go to localhost:4000, I should see a message in the browser console stating whether I joined successfully or not and I’m not getting any.

Can anybody send some help?

Hello and welcome,

It’s not a lot of info to help You debug this… Maybe try by adding a console.log atop of socket.js, just to see if goes into.

It’s possible to debug with raw tools (netcat) but it’s a bit more complicate.

Hello friend,

I was able to figure it out. I named my defmodule Chat.RoomChannel instead of ChatWeb.RoomChannel.

Ouch, now I feel real dumb spending almost an hour trying to figure this out.

Thanks for trying to help, and stay safe.