홈페이지 제작할땐!

비버팩토리

it 언어 노트/nodejs

failed: WebSocket is closed before the connection is established.

윤비버 2024. 8. 8. 18:00
728x90
반응형

 

개발자도구에서 failed: WebSocket is closed before the connection is established. 라는 문구가 나옵니다.

 

노란색 경고문으로 나오는데 혹시나 그대로 구글링으로 찾아봤더니....

 

(예측헌데 nginx 설정은 이미 프록시로 해놨고.. 여러 문제를 생각해야된다...)

 

어쨌든 

이런 메시지가 나올때 아래 참고 자료를 확인하면 됩니다.

 

 

https://github.com/feathersjs/feathers/issues/1149

 

WebSocket is closed before the connection is established · Issue #1149 · feathersjs/feathers

The following errors are often found: websocket.js?0882:235 WebSocket connection to 'ws://192.168.199.201:3030/socket.io/?EIO=3&transport=websocket' failed: WebSocket is closed before the connectio...

github.com

 

 

더 정확히는 여기꺼 참고한다.

 

https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon

 

WebSocket connection failed: Error during WebSocket handshake: Unexpected response code: 400

I am trying to integrate Socket.io with Angular and I'm having difficulties making a connection from the client-side to the server. I've looked through other related questions but my issue is happe...

stackoverflow.com

 

 

여기 보면 폴딩을 커넥션에 추가하면 된다고 나온다.

 

io.connect(주소,{transports: ['polling']});

 

웹소켓 최신 버전에서 나오는 에러가서.. 웹 소켓 2.5 에서 문제 없이 돌아갔던 기억이 난다..

728x90
반응형