Latest Desktop app is crashing during first sync

PROBLEM RESOLVED - WORKAROUND FOUND

PART 1

Following the script from user zisuu about 2/3 of the way down this page, I was able to resolve the lock. The desktop client is now working fine.

My script was slightly different from zisuu’s since I use docker. My command sequence looked like this:

docker exec -it --user www-data nextcloud php occ files:scan --all
docker exec -it --user www-data nextcloud php occ files:cleanup
docker exec -it --user www-data nextcloud php occ maintenance:mode --on
docker exec -it --user root nextcloud-mariadb mysql -u root -p'<DatabaseRootPassword>' -D nextcloud -e 'delete from oc_file_locks where 1'
docker exec -it --user www-data nextcloud php occ maintenance:mode --off

then I rebooted the server.

PART 2

HOWEVER,

I am now back to the original problem, which is a conflict that refuses to resolve. I tried to tell it that I want the local version of the file, and it simply won’t allow it.

I notice that the server version of the file, once it is downloaded to me again, is marked readonly.
And when I try to replace it with the local version, the conflict arises again.

I even tried to

  • Let it restore the server version
  • Clear the readonly flag
  • Let it sync
  • Then overwrite with the local version.

That led to the same result.

Finally I tried what I had seen someone else suggest, which is to

  • Create a new folder
  • Move all the contents of the folder with the problem file into it (except for the offending file)
  • Blow away the old folder.

Now both the file scan on the server, and the sync on the desktop client, are successful.