danger-js icon indicating copy to clipboard operation
danger-js copied to clipboard

[BUG] ERR_CHILD_PROCESS_STDIO_MAXBUFFER when trying to get the JSON diff of a large document

Open keneanung opened this issue 3 years ago • 1 comments

Describe the bug I am trying to get the changes in a large (~26MB) JSON document. However, when trying to get a diff of the file I get the following error:

RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
    at Socket.onChildStdout (child_process.js:368:14)
    at Socket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23) {
  code: 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER',
  cmd: 'git show gh-pages:"Map/map.json"'
}

To Reproduce Steps to reproduce the behavior:

  1. Check out https://github.com/IRE-Mudlet-Mapping/AchaeaCrowdmap
  2. Make a JSON change in Map/map.json
  3. add a dangerfile with the following content: danger.git.JSONDiffForFile("Map/map.json").then(diff => console.log(diff));
  4. stage the change in Map/map.json
  5. run yarn danger local --base gh-pages -s

Expected behavior

No exception.

Your Environment

software version
danger.js 10.7.0
node v12.21.0
npm 8.0.0
yarn 1.22.15
Operating System Ubuntu 21.04

keneanung avatar Oct 18 '21 19:10 keneanung

Yeah, seems like a reasonable bug 👍🏻 - I'm not too sure of a reasonable answer though

orta avatar Oct 19 '21 19:10 orta