vscode-sftp: FTPS not working

Do you read the FAQ?

Describe the bug FTPS does not work, although it should be supported since February 2nd of last year as stated here: Issue 41

To Reproduce Steps to reproduce the behavior:

  1. set protocol to FTPS (warning)
  2. try to upload a file (error: protocol not supported)
  3. set protocol to FTP (no warning)
  4. try to upload a file again (error: must use encryption)

Expected behavior FTPS should work without errors.

Desktop (please complete the following information):

  • OS: Win
  • VSCode Version: 1.31.1
  • Extension Version: 1.9.5

Extension Logs from Startup - required

Protocol set to ftps:

[debug] register command "Config" from "./commandConfig.ts"
[debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[debug] register command "Set Profile" from "./commandSetProfile.ts"
[debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[debug] register command "Diff" from "./fileCommandDiff.ts"
[debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[debug] register command "Download" from "./fileCommandDownload.ts"
[debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[debug] register command "List" from "./fileCommandList.ts"
[debug] register command "List All" from "./fileCommandListAll.ts"
[debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[debug] register command "Upload" from "./fileCommandUpload.ts"
[debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[info] config at d:\Documents\experia\demo {"remotePath":"/","uploadOnSave":false,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"ftps","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"demo","host":"demo.experia.eu","port":115,"username":"******","password":"******","encryption":true}
[trace] run command 'Upload File'
[error] Error: Config validation fail: prop "protocol" fails because ["protocol" must be one of [sftp, ftp, local]].
	at module.exports.t.default.getConfig (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:70:64343)
	at Object.u [as handleCtxFromUri] (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:41708)
	at module.exports.t.createFileCommand.<anonymous> (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:4045)
	at Generator.next (<anonymous>)
	at module.exports.r (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:3325)
	at new Promise (<anonymous>)
	at module.exports.r (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:3102)
	at module.exports.t.createFileCommand.doCommandRun.a.map.t (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:3987)
	at Array.map (<anonymous>)
	at module.exports.t.createFileCommand.<anonymous> (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:3980)
	at Generator.next (<anonymous>)
	at s (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:1:3158)

Protocol set to ftp:

[debug] register command "Config" from "./commandConfig.ts"
[debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[debug] register command "Set Profile" from "./commandSetProfile.ts"
[debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[debug] register command "Diff" from "./fileCommandDiff.ts"
[debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[debug] register command "Download" from "./fileCommandDownload.ts"
[debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[debug] register command "List" from "./fileCommandList.ts"
[debug] register command "List All" from "./fileCommandListAll.ts"
[debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[debug] register command "Upload" from "./fileCommandUpload.ts"
[debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[info] config at d:\Documents\experia\demo {"remotePath":"/","uploadOnSave":false,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"demo","host":"demo.experia.eu","port":115,"username":"******","password":"******","encryption":true}
[trace] run command 'Upload File'
[trace] handle upload file for d:\Documents\experia\demo\website\themes\kits\scss\_custom.scss
[debug] < '220 Monitored experia FTP service.\r\n'
[debug] > USER demo
[debug] < '530 Non-anonymous sessions must use encryption.\r\n'
[error] Error: Non-anonymous sessions must use encryption.
	at v (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:70:110272)
	at d.<anonymous> (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:70:110995)
	at d.emit (events.js:182:13)
	at d.module.exports.d._write (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:70:123817)
	at doWrite (_stream_writable.js:410:12)
	at writeOrBuffer (_stream_writable.js:394:5)
	at d.Writable.write (_stream_writable.js:294:11)
	at Socket.p (C:\Users\Tobi\.vscode\extensions\liximomo.sftp-1.9.5\dist\extension.js:70:113366)
	at Socket.emit (events.js:182:13)
	at addChunk (_stream_readable.js:279:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at TCP.onread (net.js:636:20)

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

@trashbytes,

having those lines in sftp.json should work (and work for me):

"protocol": "ftp",
"secure": true

If you’re having certificate problems, include (and you already have, but just in case):

"secureOptions": {
    "rejectUnauthorized": false
}

and FTPS should work. Apart from that, make sure your hostname and port are set correctly.

If you’re still unable to connect, there might be a server-side issue. In that case inspect the server logs to see what is happening.

@trashbytes,

having those lines in sftp.json should work (and work for me):

"protocol": "ftp",
"secure": true

If you’re having certificate problems, include (and you already have, but just in case):

"secureOptions": {
    "rejectUnauthorized": false
}

and FTPS should work. Apart from that, make sure your hostname and port are set correctly.

If you’re still unable to connect, there might be a server-side issue. In that case inspect the server logs to see what is happening.

Saved Hell lot of time.