Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Can not pull a file via cloudron cli from a app

Can not pull a file via cloudron cli from a app

Scheduled Pinned Locked Moved Unsolved Support
1 Posts 1 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tobiasb
    wrote last edited by
    #1

    Cloudron-Version: 9.1.5
    Cli-Version: 8.0.1
    Node-Version: v20.20.2

    Full 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.
    
    1 Reply Last reply
    0

    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
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search