FTP_ListCompleted Exceptions

tony2socks

Member
Licensed User
Longtime User
When calling the 'FTP_ListCompleted' event, the following exception is thrown.

(ParserInitializationException) org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser type: MACOS Peter's Server

Any insites into this?
 
Thanks for your reply.

Here's what I'm attempting:



Code: Copy
Sub Activity_Resume
Main.FTP.List("/")
end sub


Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
        Log(ServerPath)
      
        If Success = False Then
            Log(LastException)
        Else
            For i = 0 To Folders.Length - 1
            ToastMessageShow(Folders(i).Name,False)
            Log(Folders(i).Name)
            Next
            For i = 0 To Files.Length - 1
                Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
                   ToastMessageShow(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp),False)
                     
        
        Next
        End If

End Sub
 
Upvote 0
The code you have looks fine. I don't think it will matter but I would comment out the toastmessageshow lines and just watch the log. You might also check these two commands and their settings. Try the PassiveMode and confirm the Port value.

Code: Copy
FTP.Initialize("FTP", FTPSite, Port, FTPUser, FTPPass)
FTP.PassiveMode
 
Upvote 0
I am using passive mode and my FTP is initialized correctly, I'm downloading files without issue.
The exception is leading me to believe there's something on the FTP server side throwing errors. I was able to point this at another FTP server and it work's correctly.
Something in the library isn't catching whatever this atypical server is throwing back.

Thanks for your help!
 
Upvote 0
No error, just the exception.
I took the loops out of the conditional and it runs still without errors, just no results.
Nothing in the log other than my own LOG() entries

Code: Copy
set: Alarm{47f3d530 type 1 android}


/


Ulight 3->7|0


Delivering toWindow{47feed30 com.idlww.offlinesam/com.idlww.offlinesam.actupdateapk paused=false}
Delivering toWindow{47feed30 com.idlww.offlinesam/com.idlww.offlinesam.actupdateapk paused=false}


Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@47f65e78


GC_EXPLICIT freed 643 objects / 41864 bytes in 202ms


Timer 0x7->0x3|0x1


Ulight 7->3|0


GC_EXPLICIT freed 470 objects / 25280 bytes in 161ms


GC_EXPLICIT freed 69 objects / 3304 bytes in 159ms


GC_EXPLICIT freed 239 objects / 15816 bytes in 187ms


GC_EXPLICIT freed 1247 objects / 40288 bytes in 135ms


GC_EXPLICIT freed 7840 objects / 752000 bytes in 196ms


set: Alarm{480aea98 type 1 android}
 
Upvote 0
Back
Top