Android: Conflict promt on Auto Upload with "Overwrite remote version" checked

Created on 12 Sep 2020  Â·  25Comments  Â·  Source: nextcloud/android

Steps to reproduce

  1. Add a folder to auto upload (the Whatsapp folder in my case)
  2. Set the option "Overwrite remote version" on file conflicts
  3. replace file in that folder with new version

Expected behaviour

Nextcloud should automatically overwrite the old file with the new one

Actual behaviour

Nextcloud gives a notification for a File Conflict
After clicking on a notification I have to manually resolve the conflict

Environment data

Android version: Android 10 / MIUI12 and Android9 / LineageOS16.0

Device model: (POCO F2 Pro) and (Oneplus 3T)

Stock or customized system: Stock and Customized

Nextcloud app version: 3.13.1 RC1 / 1.13.1

Nextcloud server version:

Reverse proxy:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

bug needs infdiscussion

All 25 comments

I can confirm this! I think it started happening two updates ago...

same here...since update to 3.13.0 I am even not able to resolve conflict manually

Device: OnePlus6
Android: 10
Oxygen OS: 10.3.5

Failed uploads are piling up. If anyone has a workaround in the meantime please share !

This should be fixed with 3.13.1 RC1. You can try it via Google Play Beta version.
Stable 3.13.1 is planned for tomorrow.

I don't think this is accurate as I definitely have this issue on 3.13.1 RC1

Is this also happening for new files?
Can you try to set the resolve strategy on this folder to something else, save, then set it back to overwrite?

For me it happens for new files, and doing your manipulations doesn't change the behavior.

This error still exists with new files, as I posted here: https://github.com/nextcloud/android/issues/6963
Sorry, I didn't saw this thread here..

Can confirm this is happening with new files.

2020-09-17T00:10:33.927+0100;D;UploadFileOperation;normal upload
2020-09-17T00:10:33.930+0100;D;AdvancedSslSocketFactory;Creating SSL Socket with remote server:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@919d721
2020-09-17T00:10:33.930+0100;D;AdvancedSslSocketFactory; ... with connection timeout 0 and socket timeout 0
2020-09-17T00:10:33.931+0100;I;ServerNameIndicator;SSLSocket implementation: org.conscrypt.Java8EngineSocket
2020-09-17T00:10:33.931+0100;I;ServerNameIndicator;SNI done, hostname: server
2020-09-17T00:10:34.008+0100;D;UploadFileOperation;Checking name collision in server
2020-09-17T00:10:34.008+0100;D;OwnCloudClient #0;REQUEST HEAD /remote.php/webdav/InstantUpload/Camera/2020/09/IMG_20200916_141252.jpg
2020-09-17T00:10:34.008+0100;D;AdvancedSslSocketFactory;Creating SSL Socket with remote server:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@1c349a0
2020-09-17T00:10:34.008+0100;D;AdvancedSslSocketFactory; ... with connection timeout 50000 and socket timeout 50000
2020-09-17T00:10:34.009+0100;I;ServerNameIndicator;SNI done, hostname: server
2020-09-17T00:10:34.585+0100;D;ExistenceCheckRemoteOperation;Existence check for https://server/remote.php/webdav/InstantUpload/Camera/2020/09/IMG_20200916_141252.jpg targeting for  existence finished with HTTP status 404(FAIL)
2020-09-17T00:10:34.586+0100;D;UploadsStorageManager;QUERY: null ROWID: -1
2020-09-17T00:10:34.590+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 0, 100 rows total so far, last ID 841
2020-09-17T00:10:34.590+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 841
2020-09-17T00:10:34.594+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 1, 200 rows total so far, last ID 740
2020-09-17T00:10:34.594+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 740
2020-09-17T00:10:34.597+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 2, 300 rows total so far, last ID 640
2020-09-17T00:10:34.597+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 640
2020-09-17T00:10:34.600+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 3, 400 rows total so far, last ID 539
2020-09-17T00:10:34.600+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 539
2020-09-17T00:10:34.603+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 4, 500 rows total so far, last ID 438
2020-09-17T00:10:34.603+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 438
2020-09-17T00:10:34.605+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 5, 600 rows total so far, last ID 338
2020-09-17T00:10:34.605+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 338
2020-09-17T00:10:34.608+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 6, 700 rows total so far, last ID 238
2020-09-17T00:10:34.608+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 238
2020-09-17T00:10:34.611+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 7, 800 rows total so far, last ID 138
2020-09-17T00:10:34.611+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 138
2020-09-17T00:10:34.613+0100;V;UploadsStorageManager;getUploads() got 100 rows from page 8, 900 rows total so far, last ID 38
2020-09-17T00:10:34.613+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 38
2020-09-17T00:10:34.615+0100;V;UploadsStorageManager;getUploads() got 37 rows from page 9, 937 rows total so far, last ID 1
2020-09-17T00:10:34.615+0100;D;UploadsStorageManager;QUERY: _id < ? ROWID: 1
2020-09-17T00:10:34.617+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 10, 937 rows total so far, last ID 1
2020-09-17T00:10:34.617+0100;V;UploadsStorageManager;getUploads() returning 937 (937) rows after reading 11 pages
2020-09-17T00:10:34.617+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg with status=UPLOAD_IN_PROGRESS
2020-09-17T00:10:34.629+0100;D;UploadsStorageManager;updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg
2020-09-17T00:10:34.629+0100;D;UploadsStorageManager;notifyObserversNow
2020-09-17T00:10:34.630+0100;D;OwnCloudClient #0;REQUEST MKCOL /remote.php/dav/uploads/username/83d800a4fa19f41735fd2d33441eeb2e
2020-09-17T00:10:34.708+0100;D;OwnCloudClient #0;REQUEST PROPFIND /remote.php/dav/uploads/username/83d800a4fa19f41735fd2d33441eeb2e
2020-09-17T00:10:34.708+0100;D;AdvancedSslSocketFactory;Creating SSL Socket with remote server:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@b0f70a6
2020-09-17T00:10:34.708+0100;D;AdvancedSslSocketFactory; ... with connection timeout 5000 and socket timeout 40000
2020-09-17T00:10:34.709+0100;I;ServerNameIndicator;SNI done, hostname: server
2020-09-17T00:10:34.807+0100;D;OwnCloudClient #0;REQUEST MOVE /remote.php/dav/uploads/username/83d800a4fa19f41735fd2d33441eeb2e/.file
2020-09-17T00:10:34.961+0100;E;UploadFileOperation;Upload of /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg to /InstantUpload/Camera/2020/09/IMG_20200916_141252.jpg: Operation finished with HTTP status code 409 (fail)
2020-09-17T00:10:34.961+0100;D;UploadsStorageManager;updateDatabaseUploadResult uploadResult: RemoteOperationResult(mSuccess=false, mHttpCode=409, mHttpPhrase=Conflict, mException=null, mCode=CONFLICT, getLogMessage=Operation finished with HTTP status code 409 (fail)) upload: com.owncloud.android.operations.UploadFileOperation@4141800
2020-09-17T00:10:34.973+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg with status:UPLOAD_FAILED and result:CONFLICT_ERROR (old:/storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg status:UPLOAD_IN_PROGRESS result:-1)
2020-09-17T00:10:34.973+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg with status=UPLOAD_FAILED
2020-09-17T00:10:34.988+0100;D;UploadsStorageManager;updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/IMG_20200916_141252.jpg
2020-09-17T00:10:34.988+0100;D;UploadsStorageManager;notifyObserversNow
2020-09-17T00:10:34.990+0100;D;FileUploader;NotifyUploadResult with resultCode: CONFLICT
2020-09-17T00:10:34.995+0100;D;FileUploader;Stopping command after id 1
2020-09-17T00:10:35.039+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/IMG_20200916_140739.jpg with status:UPLOAD_IN_PROGRESS and result:UNKNOWN (old:/storage/emulated/0/DCIM/Camera/IMG_20200916_140739.jpg status:UPLOAD_IN_PROGRESS result:-1)
2020-09-17T00:10:35.039+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/IMG_20200916_140739.jpg with status=UPLOAD_IN_PROGRESS

Running 20200908 from F-Droid.

Seems to be fixed for me after manually cancelling all pending conflicts (manually resolving wouldn't work, as they would re-appear as a conflict for some reason)

Sorry, not for me. I can (manually resolve and then) cancel all pending conflicts, but next day this error (that the resolved conflicts won't be cleared) is coming again with other files.

Manually resolved conflict. Manually cancelled pending operations. Re-added the directory. "File upload conflict" persists with 3.13.1 RC1 from F-Droid.

logcat_09-28-2020_11-15-16.txt

The latest Versions of this app became ... sorry ... a complete mess.
3.13.1 is showing autoupload conflicts that need to be handled manually. But even after manually resolving the conflicting file is shown as conflict ... the conflicting file is getting uploaded but still shown as conflicting file ... not good.
Instead of solving that issue you make it worse ...
with 3.13.0 you able to solve the conflict manually ... the file got uploaded and the conflict was solved.

I needed to re-add an account and reconfigure the whole autoupload again, cause there is nowhere an option to export or import the settings ... great job :+1:
Now after having all that configured again the app is now trying to sync ALL files of the configured folder (in the past this used to be only new files being added to the folders) ...

  • why am I not asked if I want to sync ALL or just new files coming ?
  • why is the app so dumb and trying to upload everything instead of syncing ?
    ... ending up not being able to use the app cause of continously crashing and only showing black screen and showing the message nexcloud is not responding ...

From my point of view sync means:

  • check if the file exists before uploading
    not
  • uploading and then showing conflict that file exists

Disabled sync for the specific folder. Updated from 3.13.1 RC1 to 3.13.1 via F-Droid -- changelog mentions "fix conflict handling on auto upload". Re-Enabled sync for the specific folder. Haven't had a single file upload conflict in the last three days.

sync the WhatsApp database folder and you will have a conflict every morning cause of newly created msgstore.db.crypt12

sync the WhatsApp database folder and you will have a conflict every morning cause of newly created msgstore.db.crypt12

I cannot verify this.
I tried this

  • set up screenshot folder with "overwrite"
  • take a screenshot -> uploads directly
  • edit this screenshot
  • save -> uploads & overwrites

@computersalat are your settings correct?

@neurer says that it is working, or?

@neurer says that it is working, or?

Correct. Everything is in sync as of now and file upload conflict hasn't appeared ever since.

Strange. I have 3.13.1 from F-Droid and still the same sync troubles.

my settings

Can you provide us additional infos via logcat? https://github.com/nextcloud/android/blob/master/README.md#getting-debug-info-via-logcat

Maybe this helps?

Here you are:
logcatOutput.txt
I don't really know what to look for inside, only thing suspect I saw is this:

10-28 20:53:28.371  6624  6029 D ExistenceCheckRemoteOperation: Existence check for https://awak.mobi/nextcloud/remote.php/webdav/Call%20Recorder/2020-08-23%2014.59.45.ogg targeting for  existence finished with HTTP s
tatus 200
10-28 20:53:28.371  6624  6029 D UploadFileOperation: Name collision; asking the user what to do
10-28 20:53:28.372  6624  6029 E UploadFileOperation: Upload of /storage/emulated/0/Call Recorder/2020-08-23 14.59.45.ogg to /Call Recorder/2020-08-23 14.59.45.ogg: Synchronization conflict
10-28 20:53:28.373  6624  6029 D UploadsStorageManager: updateDatabaseUploadResult uploadResult: RemoteOperationResult(mSuccess=false, mHttpCode=-1, mHttpPhrase=null, mException=null, mCode=SYNC_CONFLICT, getLogMessag
e=Synchronization conflict) upload: com.owncloud.android.operations.UploadFileOperation@eee3ba7
10-28 20:53:28.378  6624  6029 V UploadsStorageManager: Updating /storage/emulated/0/Call Recorder/2020-08-23 14.59.45.ogg with status:UPLOAD_FAILED and result:SYNC_CONFLICT (old:/storage/emulated/0/Call Recorder/2020
-08-23 14.59.45.ogg status:UPLOAD_IN_PROGRESS result:-1)
10-28 20:53:28.379  6624  6029 V UploadsStorageManager: Updating /storage/emulated/0/Call Recorder/2020-08-23 14.59.45.ogg with status=UPLOAD_FAILED

Hm. I added debug output which should be outputted when instant upload is running.
Have you added new files to all of those auto upload folders and gave me the entire logcat?
It must include "AutoUpload" and "Absolute path"…

I don't really understand your question.
I'm using my phone regularly, especially the "DCIM" and "Call Recorder" folders get new files. The files do get uploaded to my server, but the conflict notifications continue to pile up.
What must include "AutoUpload" and "Absolute path" ? My settings ? The logcat command ? Something else ?

What must include "AutoUpload" and "Absolute path" ?

I gave you a custom APK, or?
And logcat creates a text file, in this there must be above strings, then I can have a better understanding of what is going on.

I'm sorry I must have missed something. Where is that custom APK ?

Ah, I mixed something up.
Let me have soon a more detailed look into it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

JSoko picture JSoko  Â·  3Comments

ThaDaVos picture ThaDaVos  Â·  3Comments

JSoko picture JSoko  Â·  3Comments

daywalk3r666 picture daywalk3r666  Â·  3Comments