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

#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.

0 Likes