Android Question FTP upload file troubles

peacemaker

Expert
Licensed User
Longtime User
HI, All

My head is broken. I'm uploading a screenshot file into FTP server. Android 8. B4A9.3 and now 9.5.
NET lib v.1.8

By TotalCommander FTP-client manually - all is fully OK, via any Internet connection.
But from Android app - the uploading process looks fully OK, but the file is always of 0 size uploaded. This picture file is OK - visible on the screen, in file manager, and on notebook after transcieving, size is not zero.
After uploading B4A9.3 during FTP-listing showed the file size as 0, but now just after update - in B4A9.5 FTP-listing has empty Files() As FTPEntry at all

Any suggestion ?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Passive mode is always.
The test project is attached. The uploaded file is always of 0 bytes.
Please, try with your FTP-hosting, using your host, login and password in ftpsrv service. And subfolder also.

B4X:
Log:
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (ftpsrv) Create ***
** Service (ftpsrv) Start **
ph_ConnectivityChanged: CONNECTED,WIFI
Init_Ftp...
FTP inited OK
file size = 681025
ph_ConnectivityChanged: CONNECTED,WIFI
Init_Ftp...
FTP inited OK
FTP1_ListCompleted = true for screenshots
FTP uploading...scr.png
FTP uploaded OK
ListCompleted: screenshots, ListingSuccess=true
FTP logged in OK: screenshots
** Service (ftpsrv) Destroy **

And even file is not listed now :(
 

Attachments

  • ftpUploadTest_project.zip
    42.8 KB · Views: 268
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Extra test results:
Input: the same FTP-server, the same B4A 9.5 with NET lib v.1.80, the same WiFi, the same test project.
Output:
1) Android emulator v.10: FTP WORKS ! Upload OK ! Files listing OK !
2) Android emulator v.9: FTP WORKS ! Upload OK ! Files listing OK !
3) Android emulator v.8: FTP WORKS ! Upload OK ! Files listing OK !
B4X:
Logger connected to: emulator-5554
--------- beginning of main
--------- beginning of system
--------- beginning of crash
Copying updated assets files (2)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (ftpsrv) Create ***
** Service (ftpsrv) Start **
ph_ConnectivityChanged: CONNECTED,WIFI
Init_Ftp...
FTP inited OK
file size = 131688
ph_ConnectivityChanged: CONNECTED,WIFI
Init_Ftp...
FTP inited OK
FTP1_ListCompleted = true for screenshots
FTP uploading...scr.png
FTP uploaded OK
ListCompleted: screenshots, ListingSuccess=true
FTP logged in OK: screenshots
scr.png, 131688, 09/11/2019
** Service (ftpsrv) Destroy **

4) Samsung device Android v8: FTP connected, but upload file is 0-sized. No FTP files after listing, but listing_success = true.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Hmm, also i have found that my Samsung device Android v8 has "VPN Adguard" installed. Maybe it may be a reason ... o_O
 
Upvote 0
Top