nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.22k stars 1.75k forks source link

Cannot resolve conflicts #10581

Open renatobellotti opened 2 years ago

renatobellotti commented 2 years ago

When I tap on a conflicted upload in the uploads overview or press the three dots -> "resolve conflicts", the client tries to re-upload the file, of course causing another conflict. The resolution dialogue does not pop up.

Client version (fdroid): 3.20.3

Android version: 12 (lineage 19.1)

I recently upgraded to Android 12. Perhaps popups are handled differently there?

palvarez89 commented 2 years ago

I've been seeing this for a while now, do you get also messages saying Error creating conflict dialog!?

There's actually a few related issues:

I hit the issue regularly. Somehow my automatic camera uploads generate conflicts without editing the local version, but that's an unrelated issue.

renatobellotti commented 2 years ago

I don't get any error message, but the client just tries to reupload the file.

AlvaroBrey commented 2 years ago

Somehow my automatic camera uploads generate conflicts without editing the local version

Slightly off topic: although I have to dig more into this, I believe this is caused by some camera apps saving a "quick version" of the picture, then later doing some postprocessing and overwriting it. No idea how we would go about this other than delaying autouploads somehow.

palvarez89 commented 2 years ago

Slightly off topic: although I have to dig more into this, I believe this is caused by some camera apps saving a "quick version" of the picture, then later doing some postprocessing and overwriting it. No idea how we would go about this other than delaying autouploads somehow.

Thanks for going off topic :) I'm not saying this is not the issue (I could investigate next time this happens), but the file size always matches.

Additionally, last time this has happened to me I was without Wi-Fi (so, no auto upload with my current settings), and then uploaded a bunch of photos at once when I had a Wi-Fi connection.

renatobellotti commented 2 years ago

For me this happens when I try to synchronise a NeoBackup backup. Perhaps they do something similar? IMHO it happens when my wifi is shortly interrupted and then reconnects, but I have no hard evidence on this.

poltpolt commented 2 years ago

Somehow my automatic camera uploads generate conflicts without editing the local version

Slightly off topic: although I have to dig more into this, I believe this is caused by some camera apps saving a "quick version" of the picture, then later doing some postprocessing and overwriting it. No idea how we would go about this other than delaying autouploads somehow.

I also get it only for videos, the resolve conflict just closes the window and nothing happens - probably due to video file size

renatobellotti commented 2 years ago

Ok, I tried to collect some logs. I found an error that might be relevant:

Error during Nextcloud request
java.lang.IllegalStateException: CE_5
    at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:455)
    at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
    at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
    at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
    at android.os.Binder.execTransactInternal(Binder.java:1179)
    at android.os.Binder.execTransact(Binder.java:1143)
Caused by: java.lang.IllegalStateException: 304
    ... 6 more
Caused by: java.lang.IllegalStateException: No response body
    ... 6 more

And a warning:

Foreground service started from background can not have location/camera/microphone access: service com.nextcloud.client/com.owncloud.android.files.services.FileUploader

Perhaps this helps? I'm happy to collect more logs, but I don't know for what to filter.

AlvaroBrey commented 2 years ago
Error during Nextcloud request
java.lang.IllegalStateException: CE_5
  at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:455)
  at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
  at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
  at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
  at android.os.Binder.execTransactInternal(Binder.java:1179)
  at android.os.Binder.execTransact(Binder.java:1143)
Caused by: java.lang.IllegalStateException: 304
  ... 6 more
Caused by: java.lang.IllegalStateException: No response body
  ... 6 more

This looks like a crash in our SSO code which is only used by other apps (like Deck and Notes) to connect to the Nextcloud server through the main app, it doesn't look related to conflicts. Do you use any of that?

renatobellotti commented 2 years ago

Yes, I use both Deck and Notes. I know that at least notes works, though.

l-mb commented 2 years ago

I also see this. Part of the problem is that opening a file.md in the mobile app always opens it in edit mode, which always saves it, and creates a conflict with other edits and collaboration - even if all I want is to just browse/read. I'll create a separate issue for this, but the workflow seems related.

renatobellotti commented 2 years ago

Is there progress on this issue? To me, conflict resolution is a crucial feature.

poltpolt commented 1 year ago

Still impacted for photo uploads half a year later, I'd even pay to get this one resolved

CoryChaplin commented 1 year ago

+1 totally annoying. Drains battery too.