search

Home  >  Q&A  >  body text

Laravel Echo and Socket IO transfer polling 404 ERR_CONNECTION_CLOSED in loop

I'm building a website using Laravel Echo Server, Socket IO and Redis. The problem I'm facing is that everything works locally but not on my VPS server.

When the user enters a view that requires Socket IO, a 404 loop will occur. https://example.com:6001/socket.io/?EIO=4&transport=polling&t=O0DofMO net::ERR_CONNECTION_CLOSED

On FireFox I can see this error, described in more detail

##
P粉029057928P粉029057928271 days ago506

reply all(1)I'll reply

  • P粉269530053

    P粉2695300532024-03-27 12:36:38

    Seems to be working now.

    I configured laravel-echo-server.json to work over HTTPS.

    This makes event broadcasting work again, but channel authentication does not.

    So I changed the way Socket.IO is imported:

    sssccc
    

    to

    sssccc
    

    These changes worked.

    Please note that removing the channel default prefix helps a lot.

    reply
    0
  • Cancelreply