Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download on open fail #195

Closed
Slavenin opened this issue May 16, 2018 · 6 comments
Closed

Download on open fail #195

Slavenin opened this issue May 16, 2018 · 6 comments

Comments

@Slavenin
Copy link

Expected Behavior

Download file from server on open

Actual Behavior

When i open file vsc show error:
Error: No such file
Upload file work correctly. Error only on download

Requisites (important to diagnose the problem!)

config:

{
    "protocol": "sftp",
    "host": "host",
    "username": "user",
    "password": "pass",
    "remotePath": "/opt/proj/",
    "uploadOnSave": true,
    "downloadOnOpen": true
}

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

[info] download /mnt/C/Users/mbaru/IdeaProjects/proj/lib/proj/handlers/report.ex.git
[error]: Error: No such file
   at SFTPStream._transform (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2-streams/lib/sftp.js:410:27)
   at SFTPStream.Transform._read (_stream_transform.js:167:10)
   at SFTPStream._read (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2-streams/lib/sftp.js:181:15)
   at SFTPStream.Transform._write (_stream_transform.js:155:12)
   at doWrite (_stream_writable.js:329:12)
   at writeOrBuffer (_stream_writable.js:315:5)
   at SFTPStream.Writable.write (_stream_writable.js:241:11)
   at Channel.ondata (_stream_readable.js:557:20)
   at emitOne (events.js:96:13)
   at Channel.emit (events.js:191:7)
   at readableAddChunk (_stream_readable.js:178:18)
   at Channel.Readable.push (_stream_readable.js:136:10)
   at SSH2Stream.<anonymous> (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2/lib/Channel.js:166:15)
   at emitOne (events.js:96:13)
   at SSH2Stream.emit (events.js:191:7)
   at parsePacket (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2-streams/lib/ssh.js:3444:10)
   at SSH2Stream._transform (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2-streams/lib/ssh.js:669:13)
   at SSH2Stream.Transform._read (_stream_transform.js:167:10)
   at SSH2Stream._read (/home/max/.vscode/extensions/liximomo.sftp-1.1.7/node_modules/ssh2-streams/lib/ssh.js:251:15)
   at SSH2Stream.Transform._write (_stream_transform.js:155:12)
   at doWrite (_stream_writable.js:329:12)
   at writeOrBuffer (_stream_writable.js:315:5)
   at SSH2Stream.Writable.write (_stream_writable.js:241:11)
   at Socket.ondata (_stream_readable.js:557:20)
   at emitOne (events.js:96:13)
   at Socket.emit (events.js:191:7)
   at readableAddChunk (_stream_readable.js:178:18)
   at Socket.Readable.push (_stream_readable.js:136:10)
   at TCP.onread (net.js:560:20)

Specifications

  • Version: 1.1.7
  • Platform: Ubuntu 18.04
@liximomo
Copy link
Owner

You need set a right context value.

If the remote file is "/opt/proj/lib/proj/handlers/report.ex.git", you may set the context to /mnt/C/Users/mbaru/IdeaProjects/proj according to the logs.

@Slavenin
Copy link
Author

Slavenin commented May 16, 2018

nothing has changed

{
    "protocol": "sftp",
    "host": "host",
    "context": "/mnt/C/Users/mbaru/IdeaProjects/proj",
    "username": "user",
    "password": "pass",
    "remotePath": "/opt/proj/",
    "uploadOnSave": true,
    "downloadOnOpen": true
}
[info] download /mnt/C/Users/mbaru/IdeaProjects/proj/lib/proj/handlers/instructions_report.ex.git
[error] Error: No such file
	at SFTPStream._transform (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2-streams/lib/sftp.js:412:27)
	at SFTPStream.Transform._read (_stream_transform.js:167:10)
	at SFTPStream._read (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2-streams/lib/sftp.js:183:15)
	at SFTPStream.Transform._write (_stream_transform.js:155:12)
	at doWrite (_stream_writable.js:329:12)
	at writeOrBuffer (_stream_writable.js:315:5)
	at SFTPStream.Writable.write (_stream_writable.js:241:11)
	at Channel.ondata (_stream_readable.js:557:20)
	at emitOne (events.js:96:13)
	at Channel.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Channel.Readable.push (_stream_readable.js:136:10)
	at SSH2Stream.<anonymous> (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2/lib/Channel.js:166:15)
	at emitOne (events.js:96:13)
	at SSH2Stream.emit (events.js:191:7)
	at parsePacket (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2-streams/lib/ssh.js:3445:10)
	at SSH2Stream._transform (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2-streams/lib/ssh.js:671:13)
	at SSH2Stream.Transform._read (_stream_transform.js:167:10)
	at SSH2Stream._read (/home/max/.vscode/extensions/liximomo.sftp-1.1.8/node_modules/ssh2-streams/lib/ssh.js:253:15)
	at SSH2Stream.Transform._write (_stream_transform.js:155:12)
	at doWrite (_stream_writable.js:329:12)
	at writeOrBuffer (_stream_writable.js:315:5)
	at SSH2Stream.Writable.write (_stream_writable.js:241:11)
	at Socket.ondata (_stream_readable.js:557:20)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at TCP.onread (net.js:560:20)
[info] [file-open] download /mnt/C/Users/mbaru/IdeaProjects/proj/.vscode/sftp.json.git

@liximomo
Copy link
Owner

  1. What is your workspace directory path?
  2. Does /opt/proj/lib/proj/handlers/report.ex.git really exist on remote?

@Slavenin
Copy link
Author

Slavenin commented May 16, 2018

No. What the .git in end??? Upload on save work without problem. Error only on downloading.
I dont know what the .git add in the end. File is /opt/proj/lib/proj/handlers/report.ex

@liximomo liximomo changed the title Donload on open fail Download on open fail May 17, 2018
@liximomo
Copy link
Owner

Thanks for your information. I have made a fix. You could try it.

@Slavenin
Copy link
Author

After update extension file download correct! Tnx!

liximomo pushed a commit that referenced this issue May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants