mocha-parallel-tests icon indicating copy to clipboard operation
mocha-parallel-tests copied to clipboard

null reference in main/util.js

Open okay-dude opened this issue 6 years ago • 5 comments

I'm not sure what causes "fn" to be null but sometimes it seems to be null. This causes the mocha-parallel-tests to crash. I'm using mocha 3.0.2. Wrapping the assignment in a if block seemed to fix it.

Unhandled asynchronous exception: TypeError: Cannot set property 'toString' of null at Array.subprocessParseReviver (/repos/dbook-cloud/tests/node_modules/mocha-parallel-tests/dist/main/util.js:18:26) at Array. (/repos/dbook-cloud/tests/node_modules/circular-json/build/circular-json.node.js:138:30) at JSON.parse () at Object.parse (/repos/dbook-cloud/tests/node_modules/circular-json/build/circular-json.node.js:196:32) at MochaWrapper.addSubprocessSuites (/repos/dbook-cloud/tests/node_modules/mocha-parallel-tests/dist/main/mocha.js:99:59) at TaskManager.taskManager.on (/repos/dbook-cloud/tests/node_modules/mocha-parallel-tests/dist/main/mocha.js:73:22) at emitOne (events.js:116:13) at TaskManager.emit (events.js:211:7) at TaskManager.onTaskProcessingFinished (/repos/dbook-cloud/tests/node_modules/mocha-parallel-tests/dist/main/task-manager.js:19:18) at emitTwo (events.js:126:13)

okay-dude avatar Apr 18 '19 19:04 okay-dude

@dbrinda-db can you post any test code you're running so that I could reproduce it?

1999 avatar Apr 19 '19 00:04 1999

i have no idea what causes this. it blows up randomly while running some combination of 20+ mocha tests and 3500 test cases. does not seem to be a deterministic failure.

okay-dude avatar Apr 22 '19 21:04 okay-dude

Do you always see the same stack trace for this error?

1999 avatar Apr 22 '19 21:04 1999

yes

okay-dude avatar Apr 22 '19 22:04 okay-dude

most of the time the tests complete without hitting this error. it happens maybe 10% of the time.

okay-dude avatar Apr 22 '19 22:04 okay-dude