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

stdout maxBuffer exceeded #679

Closed
kvker opened this issue Jun 26, 2017 · 8 comments
Closed

stdout maxBuffer exceeded #679

kvker opened this issue Jun 26, 2017 · 8 comments
Labels

Comments

@kvker
Copy link

kvker commented Jun 26, 2017

electron-packager ./ 'myapp1' --platform=darwin --arch=x64

Packaging app for platform darwin x64 using electron v1.6.11

then

stdout maxBuffer exceeded...

any issues solve this?

@malept malept added the needs info Issue reporter needs to provide more information for maintainers to take action label Jun 26, 2017
@malept
Copy link
Member

malept commented Jun 26, 2017

Thanks for filing an issue! In order to help you with your problem, we're going to need more information about it. In particular:

  • Console output when you run electron-packager with the environment variable DEBUG=electron-packager. Please include the stack trace if one exists.

  • Please provide either a failing minimal testcase (with code) or detailed steps to reproduce your
    problem. Using electron-quick-start is a good starting point.

@malept
Copy link
Member

malept commented Jul 9, 2017

Since the original issue reporter has not responded to the request for additional information in about two weeks, I'm going to assume that they either found the answer in another manner or decided not to pursue this issue. If I'm incorrect, they can respond with answers to the questions posed, and I'll reopen.

@malept malept closed this as completed Jul 9, 2017
@bengotow
Copy link

bengotow commented Aug 14, 2017

Hey folks I just ran into this as well and it's making it difficult for me to diagnose the underlying issue. It seems that when you call child_process.exec there's an implicit limit to the amount of output that the exec'd process can emit - by default 200kb (https://stackoverflow.com/questions/23429499/stdout-buffer-issue-using-node-child-process).

This happened after I enabled verbose logging on a bunch of stuff by setting DEBUG=electron-download,electron-packager,extract-zip.

In my case, it looks like npm prune --production is the command that is emitting more than 200kb of log output.

@malept
Copy link
Member

malept commented Aug 14, 2017

What are the implications of increasing the limit? Does it increase the amount of memory Packager allocates? (I don't have time to look into it right now and would appreciate it if someone else could.)

@Nowaker
Copy link

Nowaker commented Sep 29, 2017

Reported again in #734.

@malept
Copy link
Member

malept commented Sep 29, 2017

Reopening since there's a potential solution in #734.

@malept malept reopened this Sep 29, 2017
@malept malept added bug 🐛 and removed needs info Issue reporter needs to provide more information for maintainers to take action labels Sep 29, 2017
@Nowaker
Copy link

Nowaker commented Sep 29, 2017

From #734:

Non-code workaround:

  • export NPM_CONFIG_LOGLEVEL=info before calling electron-packager. This reduces the output of npm commands significantly.

A better code-based workaround / provisional fix:

Proper fix:

  • spawn should be used for executing any commands. Otherwise, if the output is too long, packaging will always be prone to an error like stdout maxBuffer exceeded or stderr maxBuffer exceeded.

@malept
Copy link
Member

malept commented Sep 29, 2017

I'm actually considering replacing this code entirely so that Packager doesn't call any package managers to prune, so this is not very high on my list of things to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants