Skip to content

stdout maxBuffer length exceeded #4

Closed

Description

@Conor-clicktech

Hi, I'm getting the below error when running inkdrop in my TF directory.
Running inkdrop just hangs forever
Running inkdrop --from-plan plan.out produces the below error.

NPM: 10.4.0
OS: Ubuntu 20.04

$: inkdrop --from-plan plan.out

`Diagram renderer running on localhost:3000
node:child_process:490
ex = new ERR_CHILD_PROCESS_STDIO_MAXBUFFER('stdout');
^

RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
at Socket.onChildStdout (node:child_process:490:14)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
code: 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER',
cmd: 'terraform show -json .../terraform/plan.out',
stdout:... 1038570 more characters`

Activity

  1. self-assigned this
    on Jan 31, 2024
  2. albschi commented on Jan 31, 2024

    @albschi
    Contributor

    Hi, thanks for reporting the issue.

    I've increased the maxBuffer size to 10MB, which should solve the problem. Please update the package and try running the command again.

    Let me know if it's fixed now!

  3. Conor-clicktech commented on Feb 1, 2024

    @Conor-clicktech
    Author

    Hi,

    Thanks for that, seems to have solved the buffer issue, but now getting the following error:

    No AWS Terraform resources found in graph. Please ensure that you have run Inkdrop inside your Terraform project directory, or specify the path to your Terraform project using the --path argument

    Even though I definitely am running inkdrop inside of my Terraform directory, this is the same directory where I run terraform init and terraform plan

    Thanks

  4. albschi commented on Feb 1, 2024

    @albschi
    Contributor

    We can only render resources from the official TF AWS provider for now. Also, we don't support Terragrunt or other Terraform wrappers yet.

    If that is not your case, are you able to run terraform graph in your directory?

    It might also help to know the logs you get when you run inkdrop --debug

  5. Conor-clicktech commented on Feb 1, 2024

    @Conor-clicktech
    Author

    I am using the official AWS provider for TF.

    terraform graph runs successfully and produces the expected output

    inkdrop --debug produces

    Diagram renderer running on localhost:3000
    Processing raw graph...
    LOG Detailed view is off.
    LOG No Terraform plan detected. Using static data.
    LOG Adding main resources...
    LOG Adding main resources... Done.
    LOG Aggregating secondary resources...
    LOG Aggregating secondary resources... Done.
    LOG Computing connections...
    LOG Computing connections... Done.
    No AWS Terraform resources found in graph.
    Please ensure that you have run Inkdrop inside your Terraform project directory, or specify the path to your Terraform project using the --path argument.
    

    Note LOG No Terraform plan detected. Using static data. even though there is a plan present, I've tried files called plan and plan.out

    Also specifying the path with the --path argument does nothing, I've tried from inside the TF directory and outside

    Cheers

  6. albschi commented on Feb 6, 2024

    @albschi
    Contributor

    Hi,

    This could happen when the generated graph contains no resources, or for some reason inkdrop can't read it correctly.

    If it does not contain anything sensitive, would you mind sharing your terraform graph output?

    Thank you

  7. albschi commented on Feb 14, 2024

    @albschi
    Contributor

    Terraform formats the output of terraform graph differently since v1.7.0, and this caused the graph parser to not work properly.

    The bug should be fixed in the latest Inkdrop release.

  8. Conor-clicktech commented on Feb 15, 2024

    @Conor-clicktech
    Author

    Yep that's done it, all sorted 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions