Upload of a specific File always fails

I have one file on my phone that will never sync. It should be uploaded via direct upload sync but the upload process always fails.

It is a simple .mp4 video file, recorded on the phone, with a size of about 45MB. This should not be a problem at all.

All the other file got uploaded, but this one will fail every time at about 86% or 87%. It then tells me, the upload failed because there was an error while waiting for the server.

What can be done? Automatic file synchronization should be reliable!

Thanks in advance

If it were written there why this is the case, you could find out. But unfortunately it doesn’t say that. (This as a hint for the app developers). :thinking:

Sometimes it’s there for me too. The upload only works if you restart the phone. Sometimes you have to do this several times before it finally works. Sometimes you just have to wait long enough for the upload to take place.

This should not be a thing!

Yeah, shouldn’t, couldn’t, wouldn’t, but unfortunately in your case it is a thing.

Now we can either try to work around it or maybe even solve it, or we can continue to express our frustration with the way things are.

The former requires us to be pragmatic and methodical, the latter involves emotions that are not usually helpful in solving problems. So what’s it going to be? :wink:

Well, to be honest - I am not emotional at all. Just pointing out the obvious. Since @Sanook said, this is something that happens occasionally, I thought there was no solution.
But if you say there might be one, let’s go ahead.

They have been working on it since the year 2017.

It would be helpful if it said why it says “waiting for the server”.

Well, since the Android client has been working pretty well for me lately, and I can’t reproduce your problem, I can’t offer a simple or straightforward solution, just some general tips:

The first thing I do when things like this happen is to check GitHub issues and the forum, which you probably have already done.

Beyond that, if the problem only happens occasionally, and it works again after e.g. restarting your phone, it will be difficult to find a definitive solution. In this case, it depends on how often it happens, or how much it bothers you, whether it is even worth pursuing :wink:

If a restart doesn’t help at all, it might also be worth trying a reset, i.e. clearing the cache and local memory, reinstalling the app, and logging in again.

I If that still doesn’t help, I would try collecting more parameters to see if there are any repeatable patterns. For example:

  • Does it only happen with files over a certain size?
  • Does it only happen with certain files or file types?
  • Does it happen during auto-upload, two-way sync, or manual upload?

It would also be interesting to know if the problem is actually limited to the Nextcloud mobile app, or in other words, can you completely rule out other factors? It might help to check what happens on the server when an upload fails (e.g. CPU and memory load) or if there are any errors in the server logs.

Based on these findings, you might consider creating a bug report on GitHub, or adding your findings to an existing bug report, and/or posting them here so that someone can possibly help you, or at least point you in the right direction.

Well, the error message popped up several times during the first sync of my files (about 11k photos/videos). Nevertheless all files but one were synced - some just needed retries.

I understand that things like this can happen. Connection issues, server issues, timeouts… But to be honest - there should not even be an error message popping up if the upload of one file failes once. It should be retried in the background and only if it still fails after several retries, there should be an error message.

But the real problem is, that this one file cannot be uploaded. It is not a filesize issue (bigger files were uploaded fine) nor a filename issue (other files with similar names uploaded fine).

The issue occurs while auto-uploading or manually uploading the file from the Android phone. I do not have two-way-sync enabled.

Btw. The same file can be uploaded from a PC to the same folder. Then of course, the mobile app tells me there is an issue because the file already exists. If I click on the option to resolve the issue, I get a message saying that the dialog could not be created.

The real problem is - as @Sanook wrote - that the error messages are completely useless. If you bother the user with an error message each time something fails, you should at least include some useful information. An error code for example.

1 Like

Well, as non-developer, I can only say this. Error handling and error output is something that can almost always be improved in any software product, so that alone might be worth reporting on GitHub or up-voting an existing issue, if there is already one.

However, I strongly disagree with you that you shouldn’t bother the user with an error message just because it doesn’t mention the exact reason for the error, as without a message the user may not even notice that certain files were never fully uploaded.

So, while I agree with you that the error handling and the error message should be improved in this case, no message at all would be worse, because it could lead to data loss if the user is under the impression that all photos and videos have been automatically uploaded to Nextcloud and then, for whatever reason, decides to delete the local files or to factory reset the phone.

Please read my post again. I never said there should be no error messages.

Well, no, but you did say that the error messages are completely useless in their current form, which isn’t entirely true either. :wink:

They might be useless for solving the actual problem, but they’re still useful for alerting the user that a certain file could not be uploaded, I just wanted to make that clear. As for the other part about error handling and the message itself, I agreed with you that it should be improved, so what more do you want me to say?

Ultimately, only the developers can change/improve this, and if you want to bring this to their attention, please open an issue on GitHub.

If you still want us to try to help you solve the problem with that one file, then I have to say that the chances of success are probably rather low, and probably not worth the effort. If it keeps happening with more files, then please try first to narrow down the issue like I mentioned here. We would then likely also need more information about your instance, so you should probably fill out the support template.

If your post was just about expressing your dissatisfaction, that’s fine too. But in that case, I won’t participate any further, because that’s not what I’m here for.

this one file on this one device has a high probability of a local problem.
rename (or copy) the problematic sourcefile and then try re-uploading; see how it behaves.
maybe adb logcat has more info.
GOOD LUCK!

1 Like

People have been doing this for 8 years, but they are not correcting the mistakes, they are becoming more instead of less.

The fact that some files are not uploaded is a known bug, but I don’t know how to fix it. You just have to live with it.

It would be helpful, for example, if you could switch to an expert view in the app that shows the exact error description.

And an easier way to report bugs instead of making a post on GitHub. Because many users don’t even know what a “Gitt Hupp” is.

Why wasn’t this done eight years ago? :thinking:

It seems to me that the actual problem with this one file has already been solved or worked around. So as long as it doesn’t happen repeatedly with new files, I’d say @GaRv3 doesn’t need to do anything, except maybe submit a feature request for better error handling :wink:

Not helpful! :stuck_out_tongue_winking_eye:

Yes, auto-upload has worked sometimes better and sometimes worse over the years. At the moment with the current version 3.31.0 it works fine for me.

1 Like

Well please get ready for this:

The Client app even lies to me, saying everything has been synced though 87% of the files have not been uploaded at all!
If I now would rely on the info and think everything had been synced, I could loose almost all of my data!

Files in the nextcloud folder: 615.939 in 52.418 folders
image

Files on the server: 80.048 in 52.259 folders
image

I tried to go to the client settings and just saved the list of the ignored files (which was empty). This was suggested in another thread.
Now the client says it is syncing file 0 of 2. This did not change for about 30 minutes
image

The list of ignored files suddenly contains all the default entries.

Then, out of the sudden, the client says “Everything synced”.
image
But it is not!
Still no additional files uploaded. There are tons of olders showing the cloud icon in Windows Explorer and all files inside show the sync icon but are not synced and the client says, it is done.

So honestly: What is this all about? The one and only purpose of a cloud solution like this is to have copies of you files in the cloud which you have to be able to rely on.

We can only guess unless you’re willing to fill out the support template. Most interesting to see would be:

  • the web server log entry associated with this upload (particularly error logs)
  • the reverse proxy log entry associated with this upload (ditto)
  • Any Nextcloud log entries from the time period

I do not really care about this one file any more since there are thousands of other files that are not being synced while no error is thrown.

I have now removed the snyc folder from the settings, deleted the hidden .sync… files and added the folder again.

The client is collecting file information, seems to be finding more files than it uploaded last time. But this info “File 0 of X” seems really strange to me. I will wait patiently.
image

But now we are talking about the desktop client, not the mobile client.

Or maybe you were talking about the desktop client the whole time, and I and @Sanook were wrongly assuming you were referring to the auto-upload on mobile, because of the following sentence in your opening post.

Okay, so now it is syncing 541.120 files. Together with the 80.048 it adds up to 621.168 which is more than the 615.939 that are really in the folder.

Maybe the client counts folders as files…
Who knows? I will randomly check afterwards, if everything has been uploaeded. I see no way to check if actually every file has been uploaded. Way too many folders and files.

Yeah, that’s actually true. This is the desktop client.
I have uploaded the file manually. Maybe, if everything on the desktop works fine, I will try to sync the video file with the mobile client again.

1 Like