nextcloud / nextcloud/ios

Cached files inside favorited folders fail to update

Open
#904 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

Expected behaviour

When the app is opened and you navigate to a favorited subfolder, cached (previously opened) files inside that subfolder should automatically download any changes, just like files inside non-favorited subfolders do.

Actual behaviour

Cached (previously opened) files inside a favorited subfolder do not update themselves with new versions. A manual sync needs to be forced.

This bug is made more severe by the fact that no conflicting file management is performed if you make edits to one of these outdated files. I elaborate on this in the Other Notes section below. I have also created a feature request for conflict resolution which would have helped mitigate this issue. (#903)

Steps to reproduce
  1. Create a folder inside your main Nextcloud file store. Add it to your favorites.
  2. Create a text file inside this subdirectory.
  3. Verify that the file has been cached. It should have the green check mark.
  4. Tap the back arrow to return to your main Nextcloud directory. Required. Without this step, the bug does not happen
  5. Exit the iOS app by returning to your iOS home screen.
  6. Edit the test file from another device and make sure it has synced up to your Nextcloud server.
  7. Re-open the iOS app and navigate into the test subfolder. Notice that the text file's thumbnail has updated to display the changes.
  8. View the test file and notice that the changes were not downloaded. You are viewing an outdated version of this file.
Other notes
  • Step 4 is required to reproduce this bug. If the app is sent to the background and re-opened directly to the subfolder, changes to the file will be correctly re-downloaded. It only appears to happen when the Nextcloud app re-opens to your root directory, either because you tapped the back arrow before exiting the app or you force quit it.
  • If, at step 8, you edit the outdated file, the app ignores the fact that different changes have been made to both the local cached copy and the server's copy of the file. Your local iOS edits will be synced up to your Nextcloud server, overwriting the version stored there . No conflicting file management will happen and the edits from your other device will be lost.
  • I have been able to reproduce this reliably for favorited folders, but it does not seem to happen for regular non-favorited folders. Whether the test file itself is favorited or not doesn't seem to have an effect on this bug either way; it appears to only be caused by favorited folders.
iOS version

12.3.1

App version

2.23.7.9

Server configuration

Operating system:
Ubuntu Server 18.04

Web server:

Database:
mysql 5.7.26

PHP version:
7.2.19

Nextcloud version: (see Nextcloud admin page)
16.0.2 installed from snap

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing the issue with a favorited subfolder while reopening the app at the root, then trace the cached-file update path for favorited folders. Done means cached files download server changes after reopening, without overwriting newer remote edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.