Open yashaswi2000 opened 4 years ago
It seems like your FTP Server does not understand the MLST Command to list files.
Please enable the debug Flag (FTPClient constructor) and attach the log (remove any sensitive information from the log).
What FTP Server Software do you use?
It seems to be working after I replace MLSD with LIST command
my server is windows iis
LIST normally responds with a human readable version, while MLST/MLSD respond with a machine readable response, so this is not a general solution.
ohh ok i will attach the log
I/flutter (13572): [26.03.2020 12:42:48.518] Connecting... I/flutter (13572): [26.03.2020 12:42:48.553] < 220 Microsoft FTP Service I/flutter (13572): [26.03.2020 12:42:48.554] > USER pbns I/flutter (13572): [26.03.2020 12:42:48.661] < 331 Password required I/flutter (13572): [26.03.2020 12:42:48.662] > PASS ndms@123 I/flutter (13572): [26.03.2020 12:42:48.767] < 230 User logged in. I/flutter (13572): [26.03.2020 12:42:48.768] Connected! I/flutter (13572): [26.03.2020 12:42:48.775] > PWD I/flutter (13572): [26.03.2020 12:42:48.879] < 257 "/" is current directory. I/flutter (13572): / I/flutter (13572): [26.03.2020 12:42:48.895] > TYPE A I/flutter (13572): [26.03.2020 12:42:48.998] < 200 Type set to A. I/flutter (13572): [26.03.2020 12:42:48.999] > PASV I/flutter (13572): [26.03.2020 12:42:49.102] < 227 Entering Passive Mode (183,82,120,238,200,219). I/flutter (13572): [26.03.2020 12:42:49.107] > MLST I/flutter (13572): [26.03.2020 12:42:49.122] < 500 Command not understood. E/flutter (13572): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FTPException: Can't get content of directory. (Response: 500 Command not understood.)
Thanks!
I will investigate this further.
Hi! I'm have the same problem. Is there any temporary solution?
well I had the problem because the windows servers don't support MLST/ MLSD commands so I used LIST command it only gives strings as output, not machine-readable output.
Thanks for the tip! But I don't know very much about List Command. So, can you explain me or indicate any tutorial?
Again... Thanks for the help!
This link is what helped me understand the command, it also has documentation for other FTP commands also, hope it will be helpful.
Thanks!
I have the same problem. LIST command is working too.
Could you please implement support for LIST command aslo instead of MLSD?
any way to allow folders and files to contain semicolons in their names?
Hello! 👋 The same happens with vsftpd
. I'm going to move to ProFTPd and that's it, as the README suggests, but... just for the info 😄
Hi again! Just installed a ProFTPd server, and it doesn't' work either. Same error 😢
I also had problems with the directory listings. In my case I had to switch transfer mode from ascii to binary in listDirectoryContent(). But error was "425 Can't open data connection."
I am trying to get the list of directories and files in FTP server and getting below error in flutter Unhandled Exception: FTPException: Can't get content of directory. (Response: 500 Command not understood.)