karma-runner / karma-runner/karma
Latest version of socket.io causes tests to fail on macOS
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Karma does not seem to be working properly with the latest version of [socket.io](https://github.com/socketio/socket.io) when running on macOS. Tests will always fail with the following output:
```
Chrome 115.0.0.0 (Mac OS 10.15.7) ERROR
Some of your tests did a full page reload!
Chrome 115.0.0.0 (Mac OS 10.15.7) ERROR
Some of your tests did a full page reload!
25 07 2023 13:08:13.224:ERROR [karma-server]: UncaughtException: TypeError: Cannot read properties of null (reading '57590020')
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at Socket.emitUntyped (/node_modules/socket.io/dist/typed-events.js:69:22)
at node_modules/socket.io/dist/socket.js:703:39
```
Overriding the socket.io dependency version to `4.6.1` within `package.json` fixes the issue:
```
"overrides": {
"socket.io": "4.6.1"
}
```
Suggest one of the following:
- Pinning socket.io to `4.6.1` [here](https://github.com/karma-runner/karma/blob/master/package.json#L450)
- Figuring out if karma needs to be updated to work with `socket.io@4.7.1`
- If not an issue in karma, filing a bug with socket.io
Contributor guide
Research direction
Start with package.json at the socket.io dependency around line 450, then reproduce the reported failures on macOS with socket.io 4.7.1 and the 4.6.1 override. Compare the behavior and determine whether Karma needs a compatibility change or the problem belongs upstream; done means the tests no longer fail or the issue is clearly redirected to socket.io.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100