jeudi 25 avril 2019

Issue related to websocket connection

I have an issue with a native instance of WebSocket. I need to debug some things on the application in development. What I did:

  1. Opened my node application on localhost:4200 locally.
  2. Opened my application on local IP
  3. Connected my iPhone 7 via cable to my MacBook Pro.
  4. Checked on Safari on Macbook if I have a stable connection with WebSocket (and I didn't have)
  5. Added debugger at the beginning of my application because of something is wrong with the instance of WebSocket. After new WebSocket('ws://localhost:3000/cable') I got error WebSocket network error: The operation couldn’t be completed. Connection refused. I am not sure how to debug it. I checked on https://caniuse.com/#search=websocket versions of my browsers and all is fine here. It looks like a request for connection is even not fired (checked on Redis, backend). Something is blocking it, maybe some default firewall or configurations that I don't see. Need help how to debug it, because it prevents me from debugging my real issues in my application.

Aucun commentaire:

Enregistrer un commentaire