When running acceptance tests, I am sometimes getting a maximum call stack size error.
RangeError: Maximum call stack size exceeded
at Function.[Symbol.hasInstance] (<anonymous>)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:200:14)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
Sorry, but I cannot reproduce it 100%. It sometimes happens when I create a writable stream:
const fs = require('fs');
describe('xxx', () => {
it('will sometimes exit on max call stack', () => {
fs.createWriteStream('test.log', { flags: 'a' })
})
})
Does not crash on max. call stack.
It seems to sometimes reproduce on this repository:
https://github.com/alesmenzel/churchill
when running the npm run test:acceptance -- file
here is a screenshot from travis-ci running the tests ( https://prnt.sc/pkr5zy )
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 12.12.0 - ~/.nvm/versions/node/v12.12.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v12.12.0/bin/npm
npmPackages:
jest: ^24.9.0 => 24.9.0
Looks like this was resolved in v4.2.3 of graceful-fs: https://github.com/isaacs/node-graceful-fs/issues/174
@SimenB Could a new version be released with this fix? It is breaking my React Native Android app build randomly
Would also like a patch release with this fix as we have some tests crashing out because of this.
+1
If it helps, I tried a second time npm i --save-dev jest and it worked this time,