{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/369","labels_url":"https://api.github.com/repos/facebook/jest/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/369/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/369/events","html_url":"https://github.com/facebook/jest/issues/369","id":76496822,"number":369,"title":"Error: Attempted to send a message to the worker before the response from the last message was received! Worker processes can only handle one message at a time.","user":{"login":"binarykitchen","id":177641,"avatar_url":"https://avatars.githubusercontent.com/u/177641?v=3","gravatar_id":"","url":"https://api.github.com/users/binarykitchen","html_url":"https://github.com/binarykitchen","followers_url":"https://api.github.com/users/binarykitchen/followers","following_url":"https://api.github.com/users/binarykitchen/following{/other_user}","gists_url":"https://api.github.com/users/binarykitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/binarykitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarykitchen/subscriptions","organizations_url":"https://api.github.com/users/binarykitchen/orgs","repos_url":"https://api.github.com/users/binarykitchen/repos","events_url":"https://api.github.com/users/binarykitchen/events{/privacy}","received_events_url":"https://api.github.com/users/binarykitchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-14T21:31:17Z","updated_at":"2015-06-02T00:17:16Z","closed_at":null,"body":"Unable to run jest tests here. Getting the above error and here is the stack trace:\r\n\r\n```\r\nError: Received multiple responses when we were only expecting one: [{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at maybeReadMore_ (_stream_readable.js:425:18)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate [as _immediateCallback] (timers.js:368:17)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate [as _immediateCallback] (timers.js:368:17)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate [as _immediateCallback] (timers.js:368:17)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate [as _immediateCallback] (timers.js:368:17)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"},{\"error\":\"TypeError: Cannot read property 'length' of undefined\\n  at onwriteDrain (_stream_writable.js:359:12)\\n  at afterWrite (_stream_writable.js:349:5)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at Immediate._tickCallback [as _onImmediate] (node.js:344:13)\\n  at processImmediate (timers.js:368:17)\\n  at /Users/michael-heuberger/Development/(...)/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:329:7\\n  at doNTCallback0 (node.js:415:9)\\n  at process._tickCallback (node.js:344:13)\\n\"}]\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/107751516","html_url":"https://github.com/facebook/jest/issues/369#issuecomment-107751516","issue_url":"https://api.github.com/repos/facebook/jest/issues/369","id":107751516,"user":{"login":"binarykitchen","id":177641,"avatar_url":"https://avatars.githubusercontent.com/u/177641?v=3","gravatar_id":"","url":"https://api.github.com/users/binarykitchen","html_url":"https://github.com/binarykitchen","followers_url":"https://api.github.com/users/binarykitchen/followers","following_url":"https://api.github.com/users/binarykitchen/following{/other_user}","gists_url":"https://api.github.com/users/binarykitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/binarykitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarykitchen/subscriptions","organizations_url":"https://api.github.com/users/binarykitchen/orgs","repos_url":"https://api.github.com/users/binarykitchen/repos","events_url":"https://api.github.com/users/binarykitchen/events{/privacy}","received_events_url":"https://api.github.com/users/binarykitchen/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T00:17:16Z","updated_at":"2015-06-02T00:17:16Z","body":"In my case, I call jest within a gulp task and have this `scriptPreprocessor` defined:\r\n\r\n```js\r\nvar coffee    = require('coffee-script'),\r\n    transform = require('coffee-react-transform')\r\n\r\nmodule.exports = {\r\n  process: function(src, path) {\r\n\r\n    if (coffee.helpers.isCoffee(path) || (path.match(/\\.cjsx/))) {\r\n      return coffee.compile(transform(src), {'bare': true})\r\n    } else\r\n      return src\r\n  }\r\n}\r\n```\r\n\r\nThere is no console.log and everything looks right. But why do jest tests still do not work? (they work with older node.js or io.js versions but not with newer ones)"}}