Giter VIP home page Giter VIP logo

Comments (5)

mscdex avatar mscdex commented on July 17, 2024

That error is not coming from this module, so I can't help you there. You'll need to take it up with ssh2-sftp-client it seems.

from ssh2-streams.

scooper91 avatar scooper91 commented on July 17, 2024

Thanks for the reply.

The error is surfacing through the ssh2-sftp-client, but at the bottom of the stack, the error is coming from ssh2-streams. In the linked issue from the ssh2-sftp-client, the maintainer says it's not to do with their library. As I mentioned, we got the same error (with the stack originating from this ssh2-streams library) using a different library.

It looks like the ssh2-sftp-client library is calling fastPut in this library, and the error in the stack trace is just a formatted version of the underlying error from ssh2-streams.

Thanks!

from ssh2-streams.

mscdex avatar mscdex commented on July 17, 2024

Then I can only guess it's coming from the server because this module has never had an error message like that before. Is this a custom/specialty/uncommon sftp/ssh server?

from ssh2-streams.

scooper91 avatar scooper91 commented on July 17, 2024

It appears that we weren't doing a diligent enough check to ensure the files were uploading correctly. The file size is always correct when uploading the files, even when we get the error, but the start of the file is corrupted. We get a bunch of null characters (which show as ^@ in Vim), which represents zero-bytes.

e.g. When opening one of the files in Vim, it looks something like this (but with a lot more zero-byte characters)

@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@rest-of-the-data

Unfortunately, it's a third-party SFTP, which we're just integrating with, so we don't know much about it! We do not appear to have an issue when using SCP to upload files, and the owner of the SFTP has used FileZilla without any issues (although I don't know if they upload the file chunks concurrently).

from ssh2-streams.

mscdex avatar mscdex commented on July 17, 2024

Does the upload work when using sftp.createWriteStream() instead? That function does not send concurrent chunks.

from ssh2-streams.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.