theophilusx / ssh2-sftp-client

a client for SSH2 SFTP
Apache License 2.0
808 stars 199 forks source link

chunk call not supported #499

Closed jeeann02 closed 9 months ago

jeeann02 commented 1 year ago

Hi, I'm not sure if this is the right place to ask this but I just recently upgraded the version to 9.1.0 my previous version was 7.0.4. After the upgrade I suddenly got this error from 1 of the SFTP I'm connecting:

{
  "errorType": "Error",
  "errorMessage": "Could not download sftp default directory: get: HTTPResponseException : /chunk call not supported outgoing/file.gpg",
  "trace": [
    "Error: Could not download sftp default directory: get: HTTPResponseException : /chunk call not supported outgoing/file.gpg",
    "    at GP.fmtError (/var/task/index.js:21:65664)",
    "    at rf.<anonymous> (/var/task/index.js:21:69958)",
    "    at Object.onceWrapper (events.js:520:26)",
    "    at rf.emit (events.js:400:28)",
    "    at rf.emit (domain.js:475:12)",
    "    at /var/task/index.js:17:48650",
    "    at Object.cb (/var/task/index.js:17:29349)",
    "    at 101 (/var/task/index.js:17:37283)",
    "    at Hk.push (/var/task/index.js:17:4691)",
    "    at CHANNEL_DATA (/var/task/index.js:17:68408)",
    "    at 94 (/var/task/index.js:9:44778)",
    "    at Ik.$me (/var/task/index.js:14:29346)",
    "    at GB.decrypt (/var/task/index.js:6:49065)",
    "    at Ik.Wme [as _parse] (/var/task/index.js:14:28794)",
    "    at Ik.parse (/var/task/index.js:14:1718)",
    "    at Socket.<anonymous> (/var/task/index.js:17:70654)"
  ]
}

I tried to log the debug messages but could not find anything obvious.

Can you shed some light on possible cause of this issue and how to fix this?

Thanks!

theophilusx commented 1 year ago

That error message looks very strange. There are no HTTPResponse calls in ssh2-sftp-client or the underlying ssh2 library. However, the error does appear to be being thrown by the ssh2-sftp-client module. Possible that the error is being thrown by some other event emitter and being caught by the ssh2-sftp-client listener?

At any rate, jumping from 7.0.4 to 9.1.0 is a MAJOR upgrade with significant API changes. You will need to debug this issue more yourself and if necessary provide a minimal repeatable example before I could assist further.

This is not an error I have seen before or which has been reported by any other user. There is a known problem with downloadDir for very large directories relating to resource issues and too many concurrent promises, but that does not seem relevant to this error.

Note that there have been significant API changes relating to donwloadDir and other parts of the API. It is unlikely you can just update the package and expect it to work without also addressing the API changes between 7.0.4 and 9.1.0

theophilusx commented 11 months ago

Unless there is further input for this issue, I plan to close it as I don't beleive there is anything else that can be contributed based on available details.