+1
Planned

Error: Transferred a partial file

Aleksander Lanes 10 years ago in General updated by Icke 2 months ago 30

I am getting an error when uploading files when using FTPS.

Errors occured
Error uploading "myfilename": Transferred a partial file

On the server the file is replaced with an empty file (if I enable "keep partial uploads" on the server)

I am running the 5.1.1 version on an iPad with iOS 8.1.1. I had exactly the same issue when running iOS7.

GOOD, I'M SATISFIED
Satisfaction mark by Aleksander Lanes 10 years ago
Under review
Please try to enable the "Debug Log" setting in the connection's settings screen. Tap on the (i) button on the right side of a connection to change its settings. This creates a log file when you try to connect to the server which might help you find out what's wrong.
I had a look at the log file, but I am not that much wiser. There are a few warnings about the certificate being issued for a different domain to where I am connecting (I am connecting via local IP), but I do not see how that can be related.

The actual errors related to the file seems to be the following:
"0000: 550 The system cannot find the file specified. .== info: Given file does not exists."

I can upload files via normal FTP using Textastic, and I can upload files via FTPS using Filezilla from a different computer. I am however seeing some strange behaviour in Filezilla where the file is uploaded and then I get a warning about overwriting the file I just uploaded.

Seems this may be a server issue, and not a Textastic bug. I need to investigate a bit more, but I may have reported a false positive here. Sorry if so :/
+1
It appears this was an issue with TLS 1.2 on Windows FTP servers. Hotfix available here: 
http://support.microsoft.com/kb/2888853

Not sure why Textastic gave a different error message than Filezilla, but the error in Filezilla (550: The supplied message is incomplete. The signature was not verified.) pointed me directly to the microsoft hotfix.
Not a bug
It's great to hear that you could figure out the problem.

This IS (likeyl) a bug and it has existed forever in Textastic… the fix used to be opening the files again inside Textastic and attempt uploading again, but now that doesn’t even work. Some files upload without any issue, while others absolutely refuse to be uploaded.

*edit*
I’ve tried EVERYTHING. I even changed from explicit auth over ssl to just plain FTP unencrypted. Changing to plain FTP fixed my issue, FINALLY, so it might have something to do with my server’s security certificate…?

*edit2*
Okay, so I realized Force HTTPS was not on, and I usually have it on. So I turned it on with Auth over SSL and got the same partial uploads. I switched back to plain FTP and tried uploading again and had no issue. I’m not sure why this is an issue, but I can’t fix it like I used to, and it seems just uploading without security is most reliable.

I'm not aware of a general problem with uploads to FTPS servers. 

What does the debug log say?

What FTPS server are you running?

As a workaround, have you considered switching to SFTP (SSH)?

I haven’t really had this issue in the past, and it seems to work for my other domains so I’m not sure… I’m using Siteground for some and others for others. But this one Siteground website has the issue I’m describing, and I’ve tried everything, including SFTP. I’ve tried ALL the options that Textastic has to offer. I also get weird formatting bugs where the HTML, CSS, and even PHP is just white and you have to make a change in order for it to fix, but the change usually has to be hitting enter or something, but even that doesn’t always work. I dunno… I keep using Textastic day-by-day, but it’s just not fun anymore… I really miss the good ole’ days of Notepad++ where I didn’t have issues and the text search and selection options were far more advanced and just worked. I might switch back to Notepad++ and just use Filezilla again cause Textastic drives me up the wall on a daily basis with the nuanced issues.

Also, it’s not like Textastic even has a Donate option, and I’ve communicated with you many times over what has now been years, and you really don’t seem to care about any of these issues. I’m really ready to just stop altogether and go back to where I was happy and didn’t need anything to be fixed or updated. That being said, if I don’t tell you my frustrations, you’ll never hear them, either.

And yes, you have fixed some annoying bugs and I thank you for that, but at the end of the day when the app doesn’t meet my standards, it only slows me down and the only option I have is to tell you where it’s annoying me. I would even go as far as to say that if I could hide certain buttons in Textastic, I certainly would, because it’s useful for more than developing. Textastic has the potential to replace most text-related apps in the App Store, but any time I suggest something you think it’s out of scope, dangerous (hence the upload dialogue ordeal I’ve been complaining about over what seems like FOREVER now), or outright not an issue.

*update*
The connection issue seems to be resolved… I don’t know if I had a spelling error or if the issue resolved on its own. Regardless, I look forward to either not using Textastic anymore, or Textastic being updated to resolve my grievances.

+1

I'm glad to hear that it seems to be resolved.

For the record, I'm not ignoring you. After your posts, I've tested FTPS connections and uploads with a server on my home server as well with another one on the internet and didn't have any problems. Textastic uses libcurl for its FTP/SFTP/FTPS connections which is in extremely wide-spread use, so it's not like this is untested software.

If you encounter this problem with partial uploads again, it would be great if you could give me access to the server that shows this problem and tell me exactly which file I need to upload to trigger the error. But we shouldn't do that on a public forum, but via mail.

+1
I also get weird formatting bugs where the HTML, CSS, and even PHP is just white and you have to make a change in order for it to fix, but the change usually has to be hitting enter or something, but even that doesn’t always work.

Please take screenshots when this happens! If you know what triggers this, please make a screen recording video and try to reproduce the bug, so I can try to see what might be going on. I don't see such an issue on my devices, so I can only fix it if I have an idea what might be causing it. Maybe you have different code editor settings, maybe it's related to the specific file you are editing, it could be specific to your device model or to the OS version. Without more information I cannot know and cannot fix this.

Ideally, include step-by-step instructions on how to reproduce the problem when you report an issue.

+1
Under review

Update: I just had the "partial file" upload problem on my iPhone when uploading a file stored in iCloud.

For some reason, the file size shown in the file properties was wrong and didn't update anymore when saving the file.

This sounds suspiciously like the problem you reported.

Unfortunately, I wasn't in a debug session with Xcode connected when this happened, and I couldn't reproduce it when I tried it again later with Xcode connected.

Just to confirm:

  • Are the files you uploaded when the error happened store in iCloud? If not, where were they stored?
  • Was this on iPhone or iPad?
  • How did you upload the file? Through the file transfer screen or from the "..." button?

After all, it might not be related to the FTPS connection at all, but rather be a problem related to reporting the correct file size for files stored in iCloud Drive.

1. I do store ALL my files in iCloud

2. Happens on iPad, however it has occurred on iPhone even with as little as I use it for iPhone. On rare occasion and if I don’t need to do immediate uploads, I might use my iPhone to update the files (pull down to refresh and then select and upload) while I use my iPad to make changes. The iPhone is a sort of assistive PDA.
3. I use the File Transfer window, the left and right arrow.

It is very difficult to reproduce these errors, and I’m more suspicious that it’s iOS/iPadOS rather than Textastic. I encounter weird issues with iOS all the time, especially unusual visual errors such as on the app drawer, and often the only fix is to restart my iPhone or iPad. Nonetheless, these issues do occur, and I’ll work to be more proficient at tracking and recording how these issues occur. Textastic is genuinely the most useful app on iOS, and it really makes or breaks iOS/iPadOS for me!

As for the file size not showing correctly in properties, I seem to have encountered that similar or same issue. When the file isn’t uploading, I notice sometimes it does update on the server, so then I get confused thinking maybe I have an error in my code, until I realize the file on the server hasn’t been updated for such a period of time and that the file size differs from the one I’m attempting to upload.

Thank you, those details are very helpful! Maybe I can reproduce it with this information.

+1

As for the “I feel like I’m being ignored” part, sorry I don’t mean to sound so harsh. I’m referencing the Dialogue Box that I *ALWAYS* have to click Overwrite on, sometimes hundreds sometimes thousands of times a day, and having to do so REALLY gets to me.

I look forward to the day Textastic can become fully customizable such that I can even customize the user interface and what does or doesn’t show, as I don’t always want everything there. SSH connections are one thing I would often hide. But other times I might not want to use Texstastic for web development but might just want to use it as if I’m using Notepad on windows, or in place of Pages for plain text, and in this case I would want to hide most of the UI, including the File Transfer button and drop menu, and even Symbols.

Basically, I really believe Textastic is an awesome plain text app for any use, but my biggest issue will always be that pesky Overwrite dialogue box.

Seems to me, that this bug is size-related. Smaller files are uploaded without problem. Bigger files (18 kb + in my case) fail to upload.

Could it be a memory issue?


iPhone 12 mini

Textastic 10.2

+1
Planned

We figured out that the "transferred a partial file" error happens when a file stored in iCloud Drive is edited on one device and then uploaded on another device. In this case, sometimes the wrong (outdated) size is used when uploading the file.

I don't know if that's the case for you as well.

I plan to implement a fix in a future update, but it requires a bigger restructuring of the code to use file coordination when uploading files.

I'm curious regarding more details. For the project I'm actively working on, I just looked and I'm using plain FTP (unencrypted). I just tested on FTPES with this specific project and I can transfer 18.6kb successfully but attempting to transfer a 20.8kb file fails and only transfers a partial file. I could care less how my files are transferred as long as it's accurate, successful, and someone can't interfere with my uploads, but it is odd to me that this error is only more recent, where in older versions of Textastic this issue only came up on occasion and was fixed by an app restart. The partial transfer (failed) uploads seem unbiased to specific file types, only file size. Also, I did this all on my iPad Pro only, but I sometimes do this on my iPad and upload from my iPhone. This issue seemed to be consistent for files downloaded from the server where after edit it would not be uploadable. 

Also, if you overwrite with a file that is going to be a failed upload, it now becomes a 0kb file on the server. 

Thanks for the additional info. I received the log file from "Icke" and while the upload itself is reported as successful in the log file, it is followed by "450 Transfer aborted. Link to file server lost".

I hope I can find out more and will try to reproduce it.

I download a file from my FTP-Server, edit it and can’t upload it again (exept the file is under a certain size).

No iCloud involved.

Ok, interesting, so that's probably a different issue.

Maybe there is a disk quota on your server that limits the size of files you can upload?

Please try to enable the "Debug Log" setting in the connection's settings screen. Tap on the (i) button on the right side of a connection to change its settings. This creates a log file when you try to connect to the server which might help to find out what's wrong.

Could i send you the logfile?


No quota on the server. I can upload whatever I want from my iMac.

Yes, we can continue by email - send it to support@textasticapp.com 

you have mail ;-)

+1

Textastic internally uses libcurl for FTP connections. 

I could reproduce this issue on the command line with curl 8.7.1 on my Mac.

It seems to be a problem with TLS 1.3 when connecting to certain FTP servers. When I add "--tls-max 1.2" to the command to limit the TLS version to 1.2, the upload works fine.

An upload command like this results in a 0 byte file on the server:

curl --ssl-reqd ftp://<redacted>.kasserver.com/test/ -u <redacted> --upload-file test.html


While adding "--tls-max 1.2" works and uploads the file as expected:


curl --ssl-reqd ftp://<redacted>.kasserver.com/test/ -u <redacted> --upload-file test.html --tls-max 1.2

I've reported this issue to the curl project at https://github.com/curl/curl/issues/13556

For now I can only recommend to instead use an SSH connection in Textastic if you encounter this problem.

FTP unencrypted gives me no issues so I'm happy. It also takes seconds to set up. 

+1

Yeah, that’s ok on an internal network, but not over the internet. 

Not gonna lie, I agree with you but I'm also not transferring sensitive data this way. 

The bigger problem is that someone might intercept your user name and password that is sent in clear text and would be able to do log in to your server with your credentials. 

Status update regarding the partial upload issue when using FTPS connections:

I'm working on an update that will let you set the minimum and maximum TLS version when connecting to FTPS server. Lowering the maximum TLS version from 1.3 to 1.2 prevents the partial upload issue mentioned in this thread.

I reported the issue to the Curl project and I think they are aware of it, but I haven't gotten any reply from them. So, until this is fixed in curl, I'll add this workaround to Textastic.

+1

In Textastic 10.3, which was released today, you can now set the minimum and maximum TLS version for FTPS connections.

If you encounter the "partial upload" error while uploading files using FTPS, please try setting the maximum TLS version to 1.2 as a workaround.

+1

Thank you!

Thank you!

Thank you!

☺️