Sublime Forum

Sublime SFTP - Error parsing remote folder listing

#1

Hello, I need some help with the SFTP plugin for sublime. I installed it a few days ago because I wanted a better solution than sshfs for my remote coding work, however I cannot seem to get it to work with my archlinux based remote machines. I always get “Error parsing remote folder listing” when trying to download the folder from the remote machine. I made sure that the encoding is configured correctly in sftp-config.json. SFTP does work when I test it with my raspberry pi running some debian variant (and an older version of openssh…).
I did already open a ticket on https://codexns.io/, but no response so far. I’m hoping someone else had/has this issue and knows an easy fix for it. Pinging @wbond, just in case. sftp from the command line and filezilla both work with the remotes in question.

Here are some potentially useful dumps:

  • sftp cmd line output:
Connecting to SFTP server "robot-pc-oort" as "felix" .... success
Validating remote folder "/home/felix/git/libfranka/" .. failure (Error parsing remote folder listing)
  • uname -a (on remote):
Linux oort 6.0.0.11.realtime1-1-rt #1 SMP PREEMPT_RT Fri, 07 Oct 2022 11:42:56 +0000 x86_64 GNU/Linux
  • sftp-config.json:
{
    // The tab key will cycle through the settings when first created
    // Visit https://codexns.io/products/sftp_for_subime/settings for help
    
    // sftp, ftp or ftps
    "type": "sftp",

    "save_before_upload": true,
    "upload_on_save": false,
    "sync_down_on_open": false,
    "sync_skip_deletes": false,
    "sync_same_age": true,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,
    
    "host": "robot-pc-oort",
    "user": "felix",
    //"password": "password",
    //"port": "22",
    
    "remote_path": "/home/felix/test",
    "ignore_regexes": [
        "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
        "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
        "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
    ],
    //"file_permissions": "664",
    //"dir_permissions": "775",
    
    //"extra_list_connections": 0,

    "connect_timeout": 30,
    //"keepalive": 120,
    //"ftp_passive_mode": true,
    //"ftp_obey_passive_host": false,
    //"ssh_key_file": "~/.ssh/id_rsa",
    //"sftp_sudo": false,
    //"sftp_flags": ["-F", "/path/to/ssh_config"],
    
    //"preserve_modification_times": false,
    //"remote_time_offset_in_hours": 0,
    "remote_encoding": "utf-8",
    "remote_locale": "en_US",
    //"allow_config_upload": false,
}
  • SFTP.errors.log:
2023-02-17 13:37:32
Error parsing remote folder listing:
  drwxr-xr-x    ? felix    felix        4096 Feb 17 13:35 .
  drwx------    ? felix    felix        4096 Feb 17 13:36 ..
  -rw-r--r--    ? felix    felix          49 Feb 17 13:37 __sublime_sftp_offset
  -rw-r--r--    ? felix    felix           0 Feb 17 13:35 test
  • locale (on remote):
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
  • openssh version info:
Name            : openssh
Version         : 9.1p1-1
Description     : SSH protocol implementation for remote login, command execution and file transfer
Architecture    : x86_64
URL             : https://www.openssh.com/portable.html
Licenses        : custom:BSD
Groups          : None
Provides        : None
Depends On      : glibc  krb5  libkrb5.so=3-64  libgssapi_krb5.so=2-64  ldns  libedit  libxcrypt  libcrypt.so=2-64  openssl  pam  libpam.so=0-64  zlib
Optional Deps   : libfido2: FIDO/U2F support
                  x11-ssh-askpass: input passphrase in X
                  xorg-xauth: X11 forwarding [installed]
Required By     : None
Optional For    : openmpi
Conflicts With  : None
Replaces        : None
Installed Size  : 4.22 MiB
Packager        : David Runge <dvzrv@archlinux.org>
Build Date      : Mon 10 Oct 2022 08:52:32 PM CEST
Install Date    : Thu 13 Oct 2022 04:24:41 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
  • subl --version
Sublime Text Build 4143

Let me know if I can provide additional info that could help.

0 Likes

#2

Update:

I got a reply from @wbond on codexns.io stating that it is an issue with the SFTP plugin and will most likely be fixed with the next release.

1 Like

#3

@ffrank I’m encountering the same exact bug connecting to Arch Linux. I assume this has yet to be fixed considering the last update was 1/13/23. https://codexns.io/products/sftp_for_sublime/changelog

@wbond I submitted a bug report linked to this post on https://codexns.io/. It’s going on 5 days now, and I have yet to receive a response. I paid for the SFTP v2 upgrade license earlier this year to help support your development of this valuable Sublime Text plugin, but I’m now regretting that decision.

0 Likes

Warning! Codex SFTP not working! No support! Sublime Staff WAKE UP!
#4

Hello everyone. Having the same issue now. Currently I’m using sublime 4152 build. Also using the latest SFTP package. It seems this issue was raised 8 months ago, does anyone here managed to fix the issue?

0 Likes

#5

I’m also having the same issue using Sublime 4152 build. Has anyone found a fix?
I’ve noticed that my connection to Debian 11 servers works, but Debian 12 does not.

0 Likes

#6

Same problem here. We upgrades our servers from Debian 11 to 12 and now SFTP craps out. Seems like perhaps the format of directory output changed slightly and SFTP’s parsing is brittle? Would love to know if anyone else has found a workaround.

0 Likes

#7

I moved on to another package. I was using the Remote (mapping a local folder to a remote folder) workflow for the SFTP package, so the transition to the sublime-rsync-ssh package has been pretty seamless. I wrote a blog post for those interested.

1 Like

#8

Same issue here, almost 50% of servers are unaccessible via sftp now… :confused: Looking at errors it seems number of directories could be the issue at least in my case - it is replaced with question marks ?

This field specifies the number of links or directories inside this directory.

2023-12-04 10:14:19
Error parsing remote folder listing:
  drwxr-xr-x    ? root     wheel          17 Dec  4 10:14 .
  drwxr-xr-x    ? root     wheel          14 Nov 28 14:29 ..
  drwxr-xr-x    ? root     wheel          16 Nov 28 15:43 .git
  -rw-r--r--    ? root     wheel          15 Feb 10  2021 .gitignore
  -rw-r--r--    ? root     wheel         204 Nov 28 15:43 .gitmodules
  -rw-r--r--    ? root     wheel          49 Dec  4 10:14 __sublime_sftp_offset
  drwxr-xr-x    ? root     wheel           4 Feb 17  2021 api
  drwxr-xr-x    ? root     wheel          27 Mar  3  2021 app
  -rw-r--r--    ? root     wheel        4051 Oct  3 13:59 config.php
  drwxr-xr-x    ? root     wheel           6 Mar 16  2017 css
  drwxr-xr-x    ? root     wheel           4 Jun 28  2021 db
  drwxr-xr-x    ? root     wheel          10 Nov 28 15:43 functions
  -rwxr-xr-x    ? root     wheel        7013 Jun 17  2021 index.php
  drwxr-xr-x    ? root     wheel          13 Feb 17  2021 js

Original:

-rw-r--r--   1 root  wheel    49 Dec  4 10:14 __sublime_sftp_offset
drwxr-xr-x  10 root  wheel    17 Dec  4 10:14 .
drwxr-xr-x  14 root  wheel    14 Nov 28 14:29 ..
drwxr-xr-x   9 root  wheel    16 Nov 28 15:43 .git
-rw-r--r--   1 root  wheel    15 Feb 10  2021 .gitignore
-rw-r--r--   1 root  wheel   204 Nov 28 15:43 .gitmodules
drwxr-xr-x   2 root  wheel     4 Feb 17  2021 api
drwxr-xr-x  24 root  wheel    27 Mar  3  2021 app
-rw-r--r--   1 root  wheel  4051 Oct  3 13:59 config.php
drwxr-xr-x   6 root  wheel     6 Mar 16  2017 css
drwxr-xr-x   2 root  wheel     4 Jun 28  2021 db
drwxr-xr-x   7 root  wheel    10 Nov 28 15:43 functions
-rwxr-xr-x   1 root  wheel  7013 Jun 17  2021 index.php
drwxr-xr-x   4 root  wheel    13 Feb 17  2021 js
0 Likes

#9

I recently upgraded my iMac to OSX to Sonoma and when I did I started having this issue. Prior to upgrade I was able to connect to my server perfectly fine, and it wasn’t until the upgrade that I started having these issues. The only possible(?) difference I can fathom between pre- and post-upgrade is my local SSH version. I believe (if my research is correct) the Mac version I was using had OpenSSH_8* vs. now OpenSSH_9* similar to @ffrank

I, too, added my issue to a ticket on codexns.io with no response so far.

This is putting a huge damper on my development process as I now have to manually upload files in FileZilla, which connects perfectly fine.

2 Likes

#10

Same issue here on Sonoma. Purchased this plugin about two weeks ago and started having the problem a few days later. I raised a ticket at codexns.io over a week ago with no response. What a joke.

Looking into using sublime-rsync-ssh as a replacement.

0 Likes

#11

Having the same issues on Sonoma.
Before upgrading to Sonoma, i tested all my workflows including SFTP for Sublime Text and it seemed to work fine, but i haven’t tested all hosts - which was a mistake.
It only seems to affect certain Webhosts and not all of them.

The biggest Webhost in my country with “OpenSSH_9.3p2, OpenSSL 1.1.1t-freebsd 7 Feb 2023” doesn’t work anymore, while another Webhost with “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017” works just fine.

A quick fix for me was to change from SFTP to FTP.
Its also possible to use FTP via a SSH tunnel, but its a bit more work to setup.

I hope the issue gets fixed. it seems/its possible that newer OpenSSH servers causing this problem?

1 Like

#12

Thanks, I also switched to FTP instead of SFTP and that seems to work for my server environment too. Not ideal, but it’s a workaround for now.

0 Likes

#13

@wbond - can you hint us what we are doing wrong? Look, I have SFTP plugin + ST4, from MacOS Sonoma 14.2.1,

all the same SFTP config connects well towards Debian 10 (sshd -v):
OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1n 15 Mar 2022

but towards Debian 12:
OpenSSH_9.2p1 Debian-2+deb12u2, OpenSSL 3.0.11 19 Sep 2023

it fails with:
Validating remote folder “/opt/data/” … failure (Error parsing remote folder listing)

SFTP.errors.log

2024-01-05 18:31:10
Error parsing remote folder listing:
  drwxr-xr-x    ? root     root         4096 Jan  5 18:30 .
  drwxr-xr-x    ? root     root         4096 Jan  4 22:50 ..

but all the same, and I get used to that SFTP that it usually works well on all mine (mostly Ubuntus 20 and 22) around… What is this and why? How to workaround? I need sftp and fix the server files, survival thing! :slight_smile:

0 Likes

#14

Today, I finally resolved this issue, but it feels a bit foolish. I downgraded OpenSSH to version 9.0p1 and used OpenSSL 1.1.1, and everything has returned to its original functionality. However, there may be security concerns with this approach, so further observation is needed.

1 Like

#15

This is happening to me. Seriously screwing with an otherwise quite acceptable work flow.

I will not downgrade OpenSSH, and for security reasons switching from SFTP to FTP is also unacceptable.

Any word when the next release will come out, with this fix?

1 Like

#16

Same here. Upgraded to Debian 12 and lost SFTP ability. Seems they will not be responding on this issue, and I can’t imagine the amount of people that will drop Sublime because of this issue. What a shame.

0 Likes

#17

SFTP is a product of @wbond, and can be purchased from codexns.io; it is not a product of SublimeHQ and the developers of Sublime have no power to resolve the problem.

The correct place to report the issue (or add to the existing one) would be the support page for the plugin, which has instructions for gathering a debug log and where to submit it.

This information is also outlined in posts above, but it seems like it might bear repeating.

1 Like

#18

Hello !

The fix is easy and it looks like its not related to the plugin.
I have PUTTY installed and also there are psftp.exe in the folder. Somehow the plugin tries to use the file.

Just rename or delete the psftp.exe from the PUTTYs installation directory, set remote_encoding to UTF8 or cp1251 (cyrillic) for example and everything will goes well.

Weird problem , weird solution

Regards,

0 Likes

#19

@zadro Hi,

Yes I agree! The eco system of the packages for Sublime Text is a joke! All basic stuff you pay extra for to developers that don’t carry any responsibility! When something go’s wrong your simply on your own!

I paid for the Codex SFTP plugin from day one and purchased all the licenses I need during the years. The so called “top-notch support” on their website is simply nonsense.

I’m using FileZilla now to be able to use SFTP and it works without any modification in the preferences already in the Free version.

There seems to be a lack of any quality control or responsibility between Sublime Text staff and the developers. So Sublime Text staff will always say: It is not our responsibility!

David

0 Likes