[error] Ranch listener ChatWeb.Endpoint.HTTP

Hi there i’m new to phoenix and i’m following a tutorial (https://www.youtube.com/watch?v=irDC1nWKhZ8) the problem is this is the only one i found and it’s using an old version of phoenix, now whenever i try to start my server i get this error:

[error] Ranch listener ChatWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.508.0> exit with reason:
  {:undef, [{ChatWeb.RoomChannel, :child_spec, [{%{}, {#PID<0.508.0>, #Reference<0.134516824.1353973764.168571>}, %Phoenix.Socket{assigns: %{user: "alpha"}, channel: ChatWeb.RoomChannel, channel_pid: nil, endpoint: ChatWeb.Endpoint, handler: ChatWeb.UserSocket, id: nil, join_ref: "3", joined: false, private: %{}, pubsub_server: Chat.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "room:hub", transport: :websocket, transport_pid: #PID<0.508.0>}}], []}, {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: 174]}, {:cowboy_websocket, :handler_call, 6, [file: 'c:/Users/Pacis/Desktop/chat/deps/cowboy/src/cowboy_websocket.erl', line: 482]}, {:cowboy_http, :loop, 1, [file: 'c:/Users/Pacis/Desktop/chat/deps/cowboy/src/cowboy_http.erl', line: 231]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}

and i don’t really understand what to do, the server stll goes on so probably the problem is in the .js file:

import "../css/app.scss"
import {Socket, Presence} from "phoenix"
import "phoenix_html"

let user = document.getElementById("user").innerText

let socket = new Socket("/socket", {params: {user: user}})


let presences = {}

let formatedTimestamp = (Ts) => {

    let date = new Date(Ts)

    return date.toLocaleString()


let listBy = (user, {metas: metas}) => {

    return {


        onlineAt: formatedTimestamp(metas[0].online_at)



let userList = document.getElementById("userList")

let render = (presences) => {

    userList.innerHTML = Presences.list(presences, listBy).map(presence => '
online since ${presence.onlineAt} 


let room = socket.channel("room:hub")

room.on("presence_state", state  => {

    presences = Presence.syncState(presences, state)



room.on("presence_diff", diff => {

    presences = Presence.syncDiff(presences, diff)




…i dont really know what to do

Hi @federico1, welcome! sorry that you ended up on an old tutorial. What version of phoenix are you actually using at this point? Can you show your mix.exs file?