question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sftp.get is missing a chunk

See original GitHub issue

We’re using this lib to get a few files from our SFTP server.

As of v2.2.0, the sftp.get method doesn’t seems to work as intended.

After looking around, I came across the following commit: https://github.com/jyu213/ssh2-sftp-client/commit/08b96f1eebd8610459705186c37d40a5389eafb7

Calling stream.read() will remove a chunk of the buffer. Once you return the stream, a chunk is missing.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
yonguelinkcommented, Apr 29, 2018

@akdixit1 If it’s too much of an issue for you, you can:

  1. Fix your working version to something prior to 2.2.0 (i.e.: 2.1.1)
  2. Fork this repo and revert the commit I linked in my first comment (08b96f1)

@jyu213 marked v2.2.0 as ‘deprecated’ on NPM, so there’s that. I’m pretty sure we’ll get a fix soon enough!

0reactions
jyu213commented, May 2, 2018

It’s designed for chained call at the beginning, so you don’t have to use promise in get, but it seems like not good enough. And I decide to and other method if need, just like fastGet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SFTP-SSH Get file content: Can't set "override chunk size"
I have the strong feeling this is because after the first chunk is downloaded, the remote servers believes the whole file was received....
Read more >
SFTP - Chunk Mode - Splitting files randomly - SAP Community
Hi, Working on splitting a large input file (~1 GB) using SFTP Adapter (provided by Secure Connectivity add-on). Enabled EOIO & specified the...
Read more >
Download file chunks with offset from SFTP server using ...
NET assembly to interact with SFTP servers. Our use case involves fetching parts of a file in chunks. I see that TransferResumeSupportState ...
Read more >
Fix missing chunks - How-to - Duplicacy Forum
One common cause of missing chunks is a stale cache. This can happen for example when a revision is manually removed from the...
Read more >
SFTP - Paramiko documentation
Copy a remote file ( remotepath ) from the SFTP server to the local host as ... If a non-zero block_size is given,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found