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

Recursion in asar. createPackageFromFiles won't handle very large file lists #78

Closed
johnhaley81 opened this issue Jul 21, 2016 · 5 comments

Comments

@johnhaley81
Copy link

Introducted in #73.

asar.createPackageFromFiles now uses recursion to handle the list of files which is ok for a reasonable number of files but over in GitKraken we have an unreasonable number of files we're putting into the asar (~100k) which causes a Maximum call stack size exceeded.

As unreasonably large as the that number is, when using node/npm for a large project that no longer really becomes an edge case.

@mingyuan-xia
Copy link

This does not need to be a large number. I tested two folders, one with 9.5k and another with 4.7k files. Both failed. Finally, it works with 1.5k files.
I am packing an electron app with asar 0.12.0. With some bower dependencies, the number of files could easily grow to crash asar.

@develar
Copy link

develar commented Jul 22, 2016

@gerhardberger Please fix it ASAP. electron-userland/electron-builder#606

@cmroanirgo
Copy link

I am here because of the exact same issue. I use cheerio and jszip in a project. Result: "Call Stack Exceeded", when using electron builder.
I agree that the recursion must go.

@gerhardberger
Copy link
Contributor

@develar I submitted a PR with a fix. I tested with 104k files and it worked.

@kevinsawicki
Copy link
Contributor

Closing as fixed by #80

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

No branches or pull requests

6 participants