vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

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

Open jianfengye opened this issue 1 year ago • 10 comments

Do you read the FAQ?

Describe the bug i use sftp, show error : Cannot set property closed of #<Writable> 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):

  • OS: [e.g. Mac, Win, Linux]
  • VSCode Version [e.g. 1.27.0]
  • Extension Version [e.g. 1.7.0]

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 avatar Sep 19 '24 07:09 jianfengye

{
    "name": "My dev Server",
    "host": "xxx",
    "protocol": "sftp",
    "port": 36000,
    "username": "root",
    "remotePath": "/home/xxxx",
    "uploadOnSave": false,
    "privateKeyPath": "/Users/xxx/.ssh/id_rsa"
}

jianfengye avatar Sep 19 '24 07:09 jianfengye

-19 15:12:56] [error] TypeError: Cannot set property closed of #<Writable> 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 avatar Sep 19 '24 07:09 jianfengye

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:[email protected],[email protected],[email protected],[email protected],[email protected]) [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 #<Writable> 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

jianfengye avatar Sep 19 '24 14:09 jianfengye

I have the same problem.

zhixuanli avatar Oct 06 '24 07:10 zhixuanli

I have the same problem.

Liuchunyangboy avatar Oct 24 '24 10:10 Liuchunyangboy

what they said

shr00mie avatar Oct 27 '24 06:10 shr00mie

...well. solution was rather simple. uninstall this extension and install the version by Kreare.

Kreare.kreare-sftp

shr00mie avatar Oct 27 '24 06:10 shr00mie

...well. solution was rather simple. uninstall this extension and install the version by Kreare.

Kreare.kreare-sftp

You are right, thanks guy

ghost avatar Feb 07 '25 10:02 ghost

...well. solution was rather simple. uninstall this extension and install the version by Kreare. Kreare.kreare-sftp

You are right, thanks guy

Fixed it for me too!

brianmcaudill avatar Mar 07 '25 21:03 brianmcaudill

...well. solution was rather simple. uninstall this extension and install the version by Kreare.

Kreare.kreare-sftp

This worked for me too. Thank you!!!

Gerg12 avatar Mar 13 '25 19:03 Gerg12

... колодец. Решение оказалось довольно простым. удалите это расширение и установите версию от Kreare.

Kreare.kreare-sftp

thanks !!!!!!

pierrrie avatar Oct 02 '25 14:10 pierrrie