liximomo / vscode-sftp

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

Invalid handle #944

Open Epizefiri opened 3 years ago

Epizefiri commented 3 years ago

Hi there, When i try to upload to a website hosted on wpengine.com i get the error "Invalid handle". This happens only on Visual Studio Code 1.56, on my laptop ( that is still running 1.55 ) everything works normally.

I know that this project is basically unmaintained, what can i do to solve this?

[06-01 07:55:40] [warn] Can't set modified time to the file because Invalid handle
[06-01 07:55:41] [error] Error: Invalid handle
    at SFTPStream._transform (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js:412:27)
    at SFTPStream.Transform._read (internal/streams/transform.js:205:10)
    at SFTPStream._read (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js:183:15)
    at SFTPStream.Transform._write (internal/streams/transform.js:193:12)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at SFTPStream.Writable.write (internal/streams/writable.js:303:10)
    at Channel.ondata (internal/streams/readable.js:719:22)
    at Channel.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Channel.Readable.push (internal/streams/readable.js:223:10)
    at SSH2Stream.<anonymous> (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2/lib/Channel.js:167:15)
    at SSH2Stream.emit (events.js:315:20)
    at parsePacket (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:3288:10)
    at SSH2Stream._transform (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:694:13)
    at SSH2Stream.Transform._read (internal/streams/transform.js:205:10)
    at SSH2Stream._read (/home/epizefiri/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:253:15)
    at SSH2Stream.Transform._write (internal/streams/transform.js:193:12)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at SSH2Stream.Writable.write (internal/streams/writable.js:303:10)
    at Socket.ondata (internal/streams/readable.js:719:22)
    at Socket.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23) when local ➞ remote /home/epizefiri/Projects/SUMUP/plexPayout/admin/partials/payout_settlement_master.php
IlanVivanco commented 3 years ago

I'm having the exact same problem.

IlanVivanco commented 3 years ago

Follow the #919 comment to fix it!

as1414 commented 3 years ago

919 worked for me as well... thank you, @IlanVivanco

Updating the SSH2 package has fixed the issue for me, just need to change the ssh2 version 1.1.0 in the package.json "extensions/liximomo.sftp-1.12.9/package.json, and run npm install ref: https://www.npmjs.com/package/ssh2

I'm on Win10 so I went to c:\users\username.vscode\extensions\liximomo.sftp-1.12.9\package.json changed "ssh2": "^x.x.x" to "ssh2": "^1.1.0" Then opened terminal in same directory (c:\users\username.vscode\extensions\liximomo.sftp-1.12.9) and ran> npm install restart vscode (didn't work until I restarted vscode)

senica commented 2 years ago

I can confirm that updating to 1.1.0 fixes the issue with wpengine invalid handle error.

iaroslavglodov commented 2 years ago

Update to "^1.1.0" helped, but only after restarting of vscode.

satiromarra commented 1 year ago

You can try my version, I have fixed bugs and added new features, maybe this will fix the problem you are having. https://marketplace.visualstudio.com/items?itemName=satiromarra.code-sftp