icetee / remote-ftp

FTP/FTPS/SFTP client for Atom.io
MIT License
555 stars 102 forks source link

[updated] Display error on partial upload/download #886

Open sircon-john opened 7 years ago

sircon-john commented 7 years ago

[Updated info] It seems that unstable networking can cause incomplete file upload/download. New speculation in my first answer.

[original post] There is a critical problem with Atom, Remote-ftp or the combination of them. I'm unable to properly reproduce the problem consistently (it only happens when least expected), so I cannot say for sure if this is related to remote-ftp.

When opening a large enough file (remotely), sometimes, the entire file is not loaded into the editor immediately. It seems to load in chunks. Something fails, or I interrupt the file-loading-into-editor process somehow. Perhaps, by editing the file too soon or triggering an autoupload-to-server before the file is entirely loaded (this is speculation).

The problem: I sometimes upload just the beginning part of a file (unknowingly). CTRL+z does not revert to the "full version" of the file, probably because it was never loaded fully in the editor. It is hard to detect, because if something is missing, it's the bottom part of the file that's usually found far below the bottom of the editor window.

This essentially permanently deletes a lot of important code, leading to restoring last nights backup and potentially losing a lot of work. Is there a chance or possibility that this is related to remote-ftp?

sircon-john commented 7 years ago

We finally saw some new indications on what this problem may actually be.

Problem 1: The office network seems unstable, it keeps dropping the connection every now and then. I saw errors in Atom regarding "Disconnected from server" and soon after I saw that the fully loaded file in Atom had not been uploaded completely. This means that the originally claimed problem of incomplete file transfers probably affects both uploads and downloads. Office network is getting an upgrade.

Problem 2: We have no clear indication that the file was only partially uploaded, or that the file was only partially downloaded. Perhaps the tiny status in the bottom left shows something useful, but I have not paid enough attention to it to really tell I would suggest a big red warning that shows if the "File was not fully down/uploaded".

icetee commented 7 years ago

Thanks for reported issue. I still have to think how to solve it. It is likely that it will be color if different from the local and remote file size and last modify date.

sircon-john commented 7 years ago

Further speculation: Could this be due to poor package loss handling?

exidas88 commented 7 years ago

I have the same problem. I have just lost part of critical file system structure so the project could not work properly and died with the fatal error message.

uberubert commented 7 years ago

Temporary solution/remedy: As a windows-user, I've activated Windows file version backups on the folder that contains all my atom-projects. (they all use remote-ftp) Hourly backups have already save a project twice :)

icetee commented 7 years ago

Very, very uncommon that it does not fill full contents of the entire file. I do not know if it could be debug.

javicorvus commented 6 years ago

Just happened to me today. Moved to Atom+remote-ftp from VS Code and FreeFileSync, I edited a large PHP file and saved, I was not aware that the file was not saved properly. The file got trimmed by more than 4000 lines of code at the end. The network was working fine without any issue as I was editing other files of similar length without a problem.

Very disappointed. I think I'll just go back to VS Code + FreeFileSync or Komodo Edit.

icetee commented 6 years ago

Okay. Anyway SOLID.

javicorvus commented 6 years ago

@icetee You are right, legacy projects are not always what we expect. However putting aside the best practices, that could only help to reduce the amount of trimmed code. I felt very comfortable with this plugin so I hope it improves in the future, I may do a few tests later and give you heads up If I notice that the file is not being downloaded completely or if it's the upload the one that is failing.

mertasan commented 6 years ago

I have the same problem. At least 20 css files could not be uploaded and the content disappeared.

oscarrock commented 6 years ago

Frequently incomplete files with Remote FTP. Double click on remote file to open it, so file opens in the editor but you cant notice if its complete or 100* lines of code are missing at the end of the file. Very DANGEROUS issue. I would not recommend any one to use this plugin. My Enviroment is OS X 10.12.6 Atom v 1.30.0 Electron 2.0.5 Chrome 61.0.3163.100 Node: v8.9.3