You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execCommand provides streaming ability via onStdout/onStderr option.
However, even if the option is provided, it still collects the output to own array:
RangeError: Invalid string length
at Array.join (<anonymous>)
at Channel.<anonymous> (redacted/node_modules/node-ssh/lib/esm/index.mjs:302:47)
at Channel.emit (node:events:526:35)
at Channel.doClose (redacted\node_modules\ssh2\lib\utils.js:101:21)
at Object.onceWrapper (node:events:628:28)
at Channel.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1408:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Besides the error, I think it wastes resources and defeats the purpose of using streams.
The text was updated successfully, but these errors were encountered:
urugator
changed the title
execCommand fails on large outputs
execCommand throws on large outputs
Jan 5, 2024
execCommand
provides streaming ability viaonStdout
/onStderr
option.However, even if the option is provided, it still collects the output to own array:
node-ssh/src/index.ts
Line 394 in 6c57d8f
When the output is very large it fails to convert the array to string:
https://github.com/steelbrain/node-ssh/blob/main/src/index.ts#L423-L424
Besides the error, I think it wastes resources and defeats the purpose of using streams.
The text was updated successfully, but these errors were encountered: