-
Notifications
You must be signed in to change notification settings - Fork 30k
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
RangeError: Maximum call stack size exceeded: _stream_writable.js:274 #14778
Comments
Oh, it only started doing this error since like 8.2 i think, all before since like 6.7 it was working. |
I fixed it like this: const settings = require('./settings');
const utils = require('corifeus-utils')
module.exports = async (crypto, cipherPipe, password) => {
const { resolve, reject, promise} = utils.promise.deferred();
const roundCipher = (lastCipherPipe) => {
const newCipher = crypto(settings.cypher, password);
newCipher.on('error', (err) => {throw err} );
return lastCipherPipe.pipe(newCipher)
}
/*
let round = 0;
while(round++ < settings.rounds) {
cipherPipe = roundCipher(cipherPipe);
}
*/
let round = 0;
const tick = () => {
setTimeout(() => {
if (round++ > settings.rounds - 1) {
resolve(cipherPipe);
} else {
cipherPipe = roundCipher(cipherPipe);
tick();
}
}, 10)
}
tick();
return promise;
}
|
Well, the problem is if I want to encrypt a bigger folder like 25MB then I get the same error, so it is not a very good hack. Do you have an idea to make it work without this error? |
This looks like it should have been posted to the help repo instead. I'll close this out, can reopen if there is reason to believe it's a bug in node.js itself. |
Ciao!
How are you?
8.3.0
Linux workstation 4.10.0-30-generic fix LICENSE #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux Mint / Debian / Windows etc..
I have been using my own crypto based on AES, with an additional 512 rounds, but my program is not working anymore and have no idea to get around this, the error:
The not liking code is:
The text was updated successfully, but these errors were encountered: