SocketIO Server running transports: ["websocket"] prevents Insomnia from connecting
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
We expect to be able to connect to the SocketIO server from the Insomnia client when the socket server striclty mandates websocket only transport.
### Actual Behavior
There is no way to connect using the Insomnia socket.io request type when the remote server is running web socket transport only.
Error Message Received: xhr poll error
===============================
SocketIO server runs this option:
transports: ["websocket"]
================================
All of these will fail in Insomnia with "xhr poll error" when trying to connect to the socketIO server.
1. http://localhost:5000/?EIO=4&transports=websocket&token=
2. ws://localhost:5000/?EIO=4&transports=websocket&token=
3. http://localhost:5000/socket.io/?EIO=4&transports=websocket&token=
4. ws://localhost:5000/socket.io/?EIO=4&transports=websocket&token=
NOTE 1: when we comment out transports: ["websocket"], then Insomnia is able to connect fine.
NOTE 2: this works fine in Postman
NOTE 3: this feature is important because in socketio server multi container environments, then http handshake has issues given requests round robin server, hence transport websocket strictly.
### Reproduction Steps
_No response_
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [ ] Insomnia Cloud sync.
- [ ] Local only
### Additional Information
_No response_
### Insomnia Version
12.3.0
### What operating system are you using?
Windows
### Operating System Version
Windows 11 Pro
### Installation method
downloaded thick client
### Last Known Working Insomnia version
never
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reproducing the Insomnia Socket.IO request against a server configured with transports: ["websocket"], then locate the Socket.IO request handling and its transport negotiation. Done means the Insomnia Socket.IO request connects successfully without the xhr poll error when websocket-only transport is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100