Can not pull a file via cloudron cli from a app
-
Cloudron-Version: 9.1.5
Cli-Version: 8.0.1
Node-Version: v20.20.2Full error message:
file:///usr/lib/node_modules/cloudron/src/actions.js:1507 stdout.resume(); // drain readable side of Duplex/Transform streams so autoDestroy emits 'close' ^ TypeError: stdout.resume is not a function at TLSSocket.<anonymous> (file:///usr/lib/node_modules/cloudron/src/actions.js:1507:32) at TLSSocket.emit (node:events:536:35) at endReadableNT (node:internal/streams/readable:1698:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)I do not speak so much JavaScript, therefore I ask my computer (claude ;-)), so do not trust 100% the cause/fix.
Steps to reproduce
cloudron pull --app <location> /tmp/somefile.gz . Any pull of a single file (remote path without trailing /) crashes with: TypeError: stdout.resume is not a function at TLSSocket.<anonymous> (file:///usr/lib/node_modules/cloudron/src/actions.js:1507:32) Root cause In src/actions.js, runExecSession is called with a fs.createWriteStream as stdout. When the socket closes, the code does: if (stdout !== process.stdout && typeof stdout.end === 'function') { stdout.on('close', () => resolve()); stdout.end(); stdout.resume(); // drain readable side of Duplex/Transform streams } The comment acknowledges that resume() is only meaningful on Duplex/Transform streams. However, the guard condition only checks for stdout.end, which is true for any Writable — including fs.WriteStream. Since fs.WriteStream is a plain Writable and not a Duplex, it has no resume() method. Fix Add a check before calling resume(): if (typeof stdout.resume === 'function') stdout.resume(); Workaround Downgrade to v7.1.2.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login