[GH-ISSUE #1570] I can't connect to Socket.IO servers #496

Closed
opened 2026-03-16 15:40:51 +03:00 by kerem · 3 comments
Owner

Originally created by @sawa-ko on GitHub (Mar 30, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1570

Describe the bug
I am unable to test socket.io to the tool's default server (wss://main-daxrc78qyb411dls-gtw.qovery.io).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Realtime'
  2. Click on 'Socket.IO tab'
  3. Scroll down to 'To the button called connect and click'
  4. See error

Expected behavior
A message telling me that the connection was successful and to be able to test.

Screenshots
image

Desktop:

  • OS: Windows 10 19042.906
  • Browser Microsoft Edge Chromium
  • Version 89.0.774.63

Additional context
It also happens when trying to connect to other Socket.IO servers.

Originally created by @sawa-ko on GitHub (Mar 30, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1570 **Describe the bug** I am unable to test socket.io to the tool's default server (wss://main-daxrc78qyb411dls-gtw.qovery.io). **To Reproduce** Steps to reproduce the behavior: 1. Go to 'Realtime' 2. Click on 'Socket.IO tab' 3. Scroll down to 'To the button called connect and click' 4. See error **Expected behavior** A message telling me that the connection was successful and to be able to test. **Screenshots** ![image](https://user-images.githubusercontent.com/56084970/112914245-ba5d7000-90b8-11eb-877d-470db78d03de.png) **Desktop:** - OS: Windows 10 19042.906 - Browser Microsoft Edge Chromium - Version 89.0.774.63 **Additional context** It also happens when trying to connect to other Socket.IO servers.
kerem 2026-03-16 15:40:51 +03:00
Author
Owner

@liyasthomas commented on GitHub (Mar 30, 2021):

This seems like an issue with CORS restrictions.

Since Socket.IO v3, you need to explicitly enable Cross-Origin Resource Sharing (CORS).

Read more →

Troubleshooting

Run the following command:

curl "https://your_wss_server.com/socket.io/?EIO=4&transport=polling"

should return something like:

0{"sid":"Lbo5JLzTotvW3g2LAAAA","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}

If that’s not the case, please check that your server is listening and is actually reachable on the given port.

<!-- gh-comment-id:809817588 --> @liyasthomas commented on GitHub (Mar 30, 2021): This seems like an issue with `CORS` restrictions. > Since Socket.IO v3, you need to explicitly enable Cross-Origin Resource Sharing (CORS). [`Read more →`](https://socket.io/docs/v3/handling-cors/) **Troubleshooting** Run the following command: ``` curl "https://your_wss_server.com/socket.io/?EIO=4&transport=polling" ``` should return something like: ``` 0{"sid":"Lbo5JLzTotvW3g2LAAAA","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000} ``` If that’s not the case, please check that your server is listening and is actually reachable on the given port.
Author
Owner

@jmcdo29 commented on GitHub (Mar 30, 2021):

I was just debugging this as well. Make sure your socket.io version is at least v3 (as socket.io v2 and v3 are not fully compatible, but socket.io v3 and v4 are)

<!-- gh-comment-id:809881092 --> @jmcdo29 commented on GitHub (Mar 30, 2021): I was just debugging this as well. Make sure your socket.io version is at least v3 (as [socket.io v2 and v3 are not fully compatible](https://socket.io/docs/v4/migrating-from-2-x-to-3-0/), but [socket.io v3 and v4 are](https://socket.io/docs/v4/migrating-from-3-x-to-4-0/))
Author
Owner

@liyasthomas commented on GitHub (Mar 30, 2021):

Feel free to re-open if issue is persisting even after updating Socket.io to latest version.

<!-- gh-comment-id:810524778 --> @liyasthomas commented on GitHub (Mar 30, 2021): Feel free to re-open if issue is persisting even after updating `Socket.io` to latest version.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#496
No description provided.