Skip to content
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

Maximum call stack size exceeded #9062

Closed
alesmenzel opened this issue Oct 17, 2019 · 5 comments · Fixed by #9097
Closed

Maximum call stack size exceeded #9062

alesmenzel opened this issue Oct 17, 2019 · 5 comments · Fixed by #9097

Comments

@alesmenzel
Copy link
Contributor

🐛 Bug Report

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)

To Reproduce

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' })
  })
})

Expected behavior

Does not crash on max. call stack.

Link to repl or repo (highly encouraged)

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 )

envinfo

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
@sawyerh
Copy link

sawyerh commented Oct 24, 2019

Looks like this was resolved in v4.2.3 of graceful-fs: isaacs/node-graceful-fs#174

alesmenzel pushed a commit to alesmenzel/jest that referenced this issue Oct 25, 2019
alesmenzel pushed a commit to alesmenzel/jest that referenced this issue Oct 25, 2019
 - previous version of graceful-fs causes max. call stack errors in some cases
@anfriis
Copy link

anfriis commented Nov 6, 2019

@SimenB Could a new version be released with this fix? It is breaking my React Native Android app build randomly

@erunion
Copy link

erunion commented Dec 16, 2019

Would also like a patch release with this fix as we have some tests crashing out because of this.

@katlimruiz
Copy link

katlimruiz commented Dec 27, 2019

+1
If it helps, I tried a second time npm i --save-dev jest and it worked this time,

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants