Rishabh-malhotraa / caucus

Realtime Collaborate Editor with Embedded Compiler
https://caucus.rishabhmalhotra.in/
MIT License
297 stars 70 forks source link

Problem in y-websocket connection #81

Open gigabyteservice opened 2 years ago

gigabyteservice commented 2 years ago

Describe the bug I'm unable to code Syncing in Codemirror. I'm getting a problem y-websocket connection "y-websocket.js:91 WebSocket connection to 'wss://board.example.com:1234/public-room' failed:

in package.json "crdt-server": "cd client && HOST=board.example.com PORT=1234 npx y-websocket", so I'm getting running at 'board.example.com' on port 1234

and provider = new WebsocketProvider('wss://board.example.com:1234', roomID, ydoc); in CodeMirrorEditor.tsx ( AWS ports are open for : 1234,3090,5001)

REACT_APP_CLIENT_URL = https://board.example.com:3090 (localhost:3000)
REACT_APP_SERVER_URL = https://board.example.com:5001 (localhost:5000 reverse proxy by Nginx)

&

CLIENT_URL=https://board.example.com:3090
SERVER_URL=http://localhost:5000

socket.io is working fine, I can see users' join and left notifications, language changes, etc the only issue is code Syncing.

Expected behavior Code syncing should work in Codemirror.

Desktop (please complete the following information):

Please provide your suggestions.