Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same file already exists, no conflict detected toast infinitely #14402

Open
4 tasks done
bilogic opened this issue Jan 14, 2025 · 9 comments · May be fixed by #14410
Open
4 tasks done

Same file already exists, no conflict detected toast infinitely #14402

bilogic opened this issue Jan 14, 2025 · 9 comments · May be fixed by #14410
Assignees
Labels

Comments

@bilogic
Copy link

bilogic commented Jan 14, 2025

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Image

  1. Setup an auto upload
  2. Default is "Original file will be... kept in original folder"
  3. Upload a few files
  4. Uninstall and reinstall Nextcloud Android
  5. Setup the same auto upload
  6. Change "Original file will be... deleted"
  7. Toast will start appearing and never resolves itself

Expected behaviour

A = If the file already exists
B = If Original file will be... deleted

if A and B, then delete the file

Actual behaviour

A = If the file already exists
B = If Original file will be... deleted

Keep showing user Same file already exists, no conflict detected

Android version

Android 15

Device brand and model

Pixel 8

Stock or custom OS?

Stock

Nextcloud android app version

20250114

Nextcloud server version

30.0.4

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

Additional information

No response

@bilogic bilogic changed the title Same file already exists, no conflict detected toast keeps repeating and does not resolve itself Same file already exists, no conflict detected toast infinitely Jan 15, 2025
@tobiasKaminsky tobiasKaminsky self-assigned this Jan 15, 2025
@tobiasKaminsky
Copy link
Member

This was added with #12941

@alperozturk96 do you recall why you added it?
Code comment in L279 says that we do not want to notify.

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Jan 15, 2025

@tobiasKaminsky Right, message should not be there. I created PR for that.

By the way, this PR helps as well.

@bilogic
Copy link
Author

bilogic commented Jan 15, 2025

For these existing files on Android that failed, what is their treatment since I set "Original file will be... deleted"?

@alperozturk96
Copy link
Collaborator

For these existing files on Android that failed, what is their treatment since I set "Original file will be... deleted"?

If the upload fails or you are using the Google Play version, the file cannot be deleted. However, if the upload is successful, the original file will be deleted on non-Google Play version.

Google Play version can't delete the file after successful upload because of the missing permission for more detail about it you can check this issue.

@bilogic
Copy link
Author

bilogic commented Jan 15, 2025

I'm using non-Google play version, but you are still not explicitly covering my question

  1. File already auto upload previously with kept in original folder , now Nextcloud app was uninstalled and reinstalled
  2. This time, auto upload configured with deleted, toast keep saying there is no conflict detected (problem 1)
  3. And file not deleted... probably because there was no upload?
  4. But in the overall scheme of things, is it behavior reasonable? (problem 2)
  • The feature was worded as Auto upload - Manage folders for auto upload, read: manage folders (not files)
  • So if configured to deleted (for the folder), everything should be deleted once a match exists on remote, regardless if upload was successful or not, agree?
  • In addition, I propose using this wording instead: When match exists on server, local copy is... => retained, deleted, moved to app folder

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Jan 15, 2025

  1. A toast message should not be displayed for the same file repeatedly. This issue has been resolved via Don't Show Failed Upload Message For Same File and Handle Local Behavior #14410
  2. Files should not be re-uploaded after a successful upload. This issue has been resolved via BugFix - Auto Upload Check File Sent For Upload #14342
  3. It appears the delete mechanism is not being triggered as expected, potentially due to missing functionality. If a file has been successfully uploaded or already exists in the remote directory, and the user selects the “delete original file” option, the file should be deleted. We will investigate this further.
  4. If you have suggestions regarding the wording, please feel free to create a pull request.

While the first two issues may not seem directly related to the problem at hand, they are interconnected. Multiple issues are affecting each other.

For example, users who prefer to use Google Play version may encounter situations where, even with proper logic implemented to delete files under the correct conditions, files still not be deleted. This is why I inquired about the version in use.

The feature was worded as "Auto upload - Manage folders for auto upload" and yes you are managing the folder as indicated.
Image

For example, "Bb, cd, DCIM" are folder not files.

"If configured to deleted (for the folder)" You can not configure to delete whole folder once if everything is matching on remote.

I'm saying file because the option you choose will delete, move or keep the files one by one for folder. It will not delete whole folder.

Image

@bilogic
Copy link
Author

bilogic commented Jan 15, 2025

  1. Thanks, as long as your point 3 is rectified that would be good
  2. The google version does not allow choosing how the local file is treated since it is read-only, so no issues there
  3. Wording is meant to more clearly define how the app behaves, I will look into a PR but I'm certainly not talking about deleting the folder, basically your point 3 captured the behavior I want (and find reasonable)

The current Original file will be... does not make the condition clear, the following have clearer conditions

  • When (file) match exists on server, local copy is...
  • If server has same file, local copy is...

There might be even clearer wording, let me sleep on it. Thanks!

@bilogic
Copy link
Author

bilogic commented Jan 17, 2025

  1. It appears the delete mechanism is not being triggered as expected, potentially due to missing functionality. If a file has been successfully uploaded or already exists in the remote directory, and the user selects the “delete original file” option, the file should be deleted. We will investigate this further.

Managed to find the cause?

@alperozturk96
Copy link
Collaborator

  1. It appears the delete mechanism is not being triggered as expected, potentially due to missing functionality. If a file has been successfully uploaded or already exists in the remote directory, and the user selects the “delete original file” option, the file should be deleted. We will investigate this further.

Managed to find the cause?

Yes. The PR is ready for review. As soon as PR is tested and approved by @tobiasKaminsky @ZetaTom we can include the fix in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants