karikera / ftp-kr

My FTP Extension For VSCode!
MIT License
69 stars 16 forks source link

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

Open TheMacros opened 1 year ago

TheMacros commented 1 year ago

Recently I started to get the error message when I trying to upload or download the file from FTP (manually or automatically). This is the full error stack:

/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5

[ftp-kr Reporting]
Task: upload /src/db/models/LiveChatConfig.js
platform: darwin
arch: arm64

[TypeError]
message: Cannot set property closed of #<Readable> which has only a getter

[Stack Trace]
TypeError: Cannot set property closed of #<Readable> which has only a getter
    at new ReadStream (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/node_modules/ssh2/lib/protocol/SFTP.js:3390:14)
    at SFTP.createReadStream (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/node_modules/ssh2/lib/protocol/SFTP.js:305:12)
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/vsutil/sftp.ts:225:27
    at new Promise (<anonymous>)
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/vsutil/sftp.ts:224:6
    at promiseErrorWrap (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/util/util.ts:211:16)
    at SftpConnection.download (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/vsutil/fileinterface.ts:127:26)
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpmgr.ts:388:11
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpmgr.ts:181:49
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpcacher.ts:793:6
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpcacher.ts:556:19
    at promiseErrorWrap (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/util/util.ts:211:16)
    at FtpManager._blockTestWrap (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpmgr.ts:174:26)
    at FtpManager.download (/Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpmgr.ts:387:15)
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpcacher.ts:793:24
    at /Users/some-user/.vscode/extensions/ruakr.ftp-kr-1.4.5/src/ftpcacher.ts:556:19

[ftp-kr.json]
{
    "host": "*****.******.***",
    "username": "dev",
    "password": "********",
    "remotePath": "/var/www/backend/",
    "protocol": "sftp",
    "port": 0,
    "fileNameEncoding": "utf8",
    "autoUpload": true,
    "autoDelete": true,
    "autoDownload": false,
    "ignore": [
        ".git",
        "/.vscode",
        "/node_modules"
    ]
}

I'm using macOS 13.5.1 (Apple M1)

aaxbas commented 1 year ago

I'm recently experiencing the same issue on windows 10. Error stack:

c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5

[ftp-kr Reporting]
Task: Download
platform: win32
arch: x64

[TypeError]
message: Cannot set property closed of #<Readable> which has only a getter

[Stack Trace]
TypeError: Cannot set property closed of #<Readable> which has only a getter
    at new ReadStream (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\node_modules\ssh2\lib\protocol\SFTP.js:3390:14)
    at SFTP.createReadStream (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\node_modules\ssh2\lib\protocol\SFTP.js:305:12)
    at c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\vsutil\sftp.ts:225:27
    at new Promise (<anonymous>)
    at c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\vsutil\sftp.ts:224:6
    at promiseErrorWrap (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\util\util.ts:211:16)
    at SftpConnection.download (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\vsutil\fileinterface.ts:127:26)
    at c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpmgr.ts:388:11
    at c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpmgr.ts:181:49
    at TaskImpl.task (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpcacher.ts:629:6)
    at promiseErrorWrap (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\util\util.ts:211:16)
    at FtpManager._blockTestWrap (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpmgr.ts:174:26)
    at FtpManager.download (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpmgr.ts:387:15)
    at TaskImpl.task (c:\Users\user\.vscode\extensions\ruakr.ftp-kr-1.4.5\src\ftpcacher.ts:629:24)
pntrinh commented 1 year ago

I have same issue too. then I found solution: add option ignoreRemoteModification: true to ftp-kr.json file so it works

aaxbas commented 1 year ago

I have same issue too. then I found solution: add option ignoreRemoteModification: true to ftp-kr.json file so it works

Still having the same issue, unfortunately

pntrinh commented 1 year ago

I have same issue too. then I found solution: add option ignoreRemoteModification: true to ftp-kr.json file so it works

Still having the same issue, unfortunately

My solution only work for upload, Download still error,

wireinet commented 1 year ago

Same issue: ...harina/home.php, Cannot set property closed of # which has only a getter

pau1phi11ips commented 1 year ago

Same issue. Pretty annoying, it was working so well before.

aaxbas commented 1 year ago

I forked the repo and changed the dependencies so that node installs the most recent version of ssh2 rather than the author's fork of it. I don't know much about nodejs, but it seems to be working for now at least.

Feel free to give it a try:

https://github.com/aaxbas/ftp-kr

zomerstm commented 12 months ago

I forked the repo and changed the dependencies so that node installs the most recent version of ssh2 rather than the author's fork of it. I don't know much about nodejs, but it seems to be working for now at least.

Feel free to give it a try:

https://github.com/aaxbas/ftp-kr

Can you provide any instruction, how can I switch ftp-kr in my Windows Visual Style Code, to your fork?

TomBraider42 commented 6 months ago

Can you provide any instruction, how can I switch ftp-kr in my Windows Visual Style Code, to your fork?

Same question here. Could you provide a VSIX file? @aaxbas

WADS94 commented 6 months ago

Same issue here, it happens quite often. Any news regarding the fix for this?

pau1phi11ips commented 6 months ago

@WADS94 I switched to SFTP by Natizyskunk and that's had no issues whatsoever.

fmurdeni commented 3 months ago

I have same issue too. then I found solution: add option ignoreRemoteModification: true to ftp-kr.json file so it works

Works for me. Thank you