-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failed : (0) at the end of karma execution #3511
Comments
It is not coming from Karma package, but rather from From the code it looks like Node attempts to close some resource of an unknown type and hence this assertion. This sounds either like Karma is doing something utterly wrong (not sure how it is possible though) or there is a bug in Node itself. If you can provide a minimal Karma project which reliably produces this error this should help with debugging and potentially reporting a problem upstream. |
Looks like the culprit is webpack/webpack#10037. tl;dr Webpack is stuck with the older versions of Karma has already upgraded to the latest |
Thank you for your reply, I will test it and let you know (maybe test with a beta version of webpack5 or some resolutions to force latest version of chokidar/fsevents). |
Actually this also may be caused by Karma. fsevents/fsevents#314 (comment) mentions that watcher should be closed asynchronously, which is not the case for Karma code. I'll create a branch with the change and ask you to test it just in case. |
`.close()` method returns a Promise now. See fsevents/fsevents#314 (comment). Fixes karma-runner#3511
Not sure if this will do any good for your particular case, but can you try this fix on your codebase? Replace |
I just test with your fix and I still have the same issue. |
Okay, then the problem is likely coming from |
The last version of karma and karm-webpack resolve this issue ! Thank you. |
`.close()` method returns a Promise now. See fsevents/fsevents#314 (comment). Fixes karma-runner#3511
The fix turns out to be bumping `webpack` from `4.43` to `4.44` in `packages/web-components`. Prior to this, I'd experience sporadic errors when running `yarn test` like the ones documented in this `karma` issue: [karma-runner/karma#3511](karma-runner/karma#3511). It turns out, that the problem is not with `karma` but rather with `webpack` as documented in [webpack/webpack#10037](webpack/webpack#10037). As per the closing comment in that issue, ensure we use `watchpack` version `^1.7.2` (a transitive dep of `webpack`) is enough to ensure this sporadic error goes away, and to bump `watchpack` we need to bump `webpack` by one minor version.
The fix turns out to be bumping `webpack` from `4.43` to `4.44` in `packages/web-components`. Prior to this, I'd experience sporadic errors when running `yarn test` like the ones documented in this `karma` issue: [karma-runner/karma#3511](karma-runner/karma#3511). It turns out, that the problem is not with `karma` but rather with `webpack` as documented in [webpack/webpack#10037](webpack/webpack#10037). As per the closing comment in that issue, ensure we use `watchpack` version `^1.7.2` (a transitive dep of `webpack`) is enough to ensure this sporadic error goes away, and to bump `watchpack` we need to bump `webpack` by one minor version.
The fix turns out to be bumping `webpack` from `4.43` to `4.44` in `packages/web-components`. Prior to this, I'd experience sporadic errors when running `yarn test` like the ones documented in this `karma` issue: [karma-runner/karma#3511](karma-runner/karma#3511). It turns out, that the problem is not with `karma` but rather with `webpack` as documented in [webpack/webpack#10037](webpack/webpack#10037). As per the closing comment in that issue, ensure we use `watchpack` version `^1.7.2` (a transitive dep of `webpack`) is enough to ensure this sporadic error goes away, and to bump `watchpack` we need to bump `webpack` by one minor version.
Issue
Hello, I using Karma + Webpack for running my unit tests and karma always display an error after testing and just before closing Chrome (or ChromeHeadless).
Error
The error is :
Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 187.
[1] 18461 abort npm run test-debug
Below a copy of my terminal
TOTAL: 87 SUCCESS 15 05 2020 15:35:04.564:DEBUG [karma-server]: Run complete, exiting. 15 05 2020 15:35:04.564:DEBUG [launcher]: Disconnecting all browsers 15 05 2020 15:35:04.564:DEBUG [launcher]: BEING_FORCE_KILLED -> BEING_FORCE_KILLED Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 187. [1] 18552 abort npm run test-debug
Software and hardware
The issue still appear on :
Karma config
Below my karma config :
`module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '../../../',
package.json file
More info
Sometimes (it's rare) the script end well and I don't have the issue.
NPM and node version
node: v12.16.3
npm:6.14.4
The text was updated successfully, but these errors were encountered: