liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 264 forks source link

Cannot set property closed of #<Writable> which has only a getter #1032

Open jianfengye opened 2 days ago

jianfengye commented 2 days ago

Do you read the FAQ?

Describe the bug i use sftp, show error : Cannot set property closed of # which has only a getter but my .sftp has been checked.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Run command '....'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Extension Logs from Startup - required

  1. Open User Settings.

    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
  2. Set sftp.debug to true and reload vscode.
  3. Reproduce the problem, get the logs from View > Output > sftp.
jianfengye commented 2 days ago
{
    "name": "My dev Server",
    "host": "xxx",
    "protocol": "sftp",
    "port": 36000,
    "username": "root",
    "remotePath": "/home/xxxx",
    "uploadOnSave": false,
    "privateKeyPath": "/Users/xxx/.ssh/id_rsa"
}
jianfengye commented 2 days ago

-19 15:12:56] [error] TypeError: Cannot set property closed of # which has only a getter at new WriteStream (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:3585:15) at SFTP.createWriteStream (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:311:12) at /Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:131256 at new Promise () at a._put (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:131218) at a. (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:129943) at Generator.next () at s (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:128197) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) when local ➞ remote /Users/xxxx/static_not_start.go

jianfengye commented 1 day ago

this is my debug info :

[09-19 22:15:37] [debug] Inbound: CHANNEL_SUCCESS (r:0) [09-19 22:15:37] [debug] Outbound: Sending CHANNEL_DATA (r:0, 9) [09-19 22:15:37] [debug] Inbound: CHANNEL_DATA (r:0, 154) [09-19 22:15:37] [debug] SFTP: Inbound: Received VERSION (v3, exts:posix-rename@openssh.com,statvfs@openssh.com,fstatvfs@openssh.com,hardlink@openssh.com,fsync@openssh.com) [09-19 22:15:37] [debug] Outbound: Sending CHANNEL_DATA (r:0, 72) [09-19 22:15:37] [debug] SFTP: Outbound: Buffered MKDIR [09-19 22:15:37] [debug] Inbound: CHANNEL_DATA (r:0, 28) [09-19 22:15:37] [debug] SFTP: Inbound: Received STATUS (id:0, 4, "Failure") [09-19 22:15:37] [debug] Outbound: Sending CHANNEL_DATA (r:0, 68) [09-19 22:15:37] [debug] SFTP: Outbound: Buffered LSTAT [09-19 22:15:37] [debug] Inbound: CHANNEL_DATA (r:0, 41) [09-19 22:15:37] [debug] SFTP: Inbound: Received ATTRS (id:1) [09-19 22:15:37] [debug] Outbound: Sending CHANNEL_DATA (r:0, 103) [09-19 22:15:37] [debug] SFTP: Outbound: Buffered OPEN [09-19 22:15:37] [debug] Inbound: CHANNEL_DATA (r:0, 17) [09-19 22:15:37] [debug] SFTP: Inbound: Received HANDLE (id:2) [09-19 22:15:37] [debug] Outbound: Sending CHANNEL_DATA (r:0, 17) [09-19 22:15:37] [debug] SFTP: Outbound: Buffered FSTAT [09-19 22:15:38] [debug] Inbound: CHANNEL_DATA (r:0, 41) [09-19 22:15:38] [debug] SFTP: Inbound: Received ATTRS (id:3) [09-19 22:15:38] [debug] Outbound: Sending CHANNEL_DATA (r:0, 25) [09-19 22:15:38] [debug] SFTP: Outbound: Buffered FSETSTAT [09-19 22:15:38] [debug] Inbound: CHANNEL_DATA (r:0, 28) [09-19 22:15:38] [debug] SFTP: Inbound: Received STATUS (id:4, 0, "Success") [09-19 22:15:38] [debug] Outbound: Sending CHANNEL_DATA (r:0, 17) [09-19 22:15:38] [debug] SFTP: Outbound: Buffered CLOSE [09-19 22:15:38] [debug] Inbound: CHANNEL_DATA (r:0, 28) [09-19 22:15:38] [debug] SFTP: Inbound: Received STATUS (id:5, 0, "Success") [09-19 22:15:38] [error] TypeError: Cannot set property closed of # which has only a getter at new WriteStream (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:3585:15) at SFTP.createWriteStream (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/node_modules/ssh2/lib/protocol/SFTP.js:311:12) at /Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:131256 at new Promise () at a._put (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:131218) at a. (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:129943) at Generator.next () at s (/Users/jianfengye/.cursor/extensions/liximomo.sftp-1.12.10/dist/extension.js:70:128197) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) when local ➞ remote /Users/jianfengye/Documents/UGit/.../static_record_not_start.go