No application can connect to my nextcloud (browser works)

Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version: Ubuntu Linux 20.04.3
Apache or nginx version (eg, Apache 2.4.25): apache
PHP version (eg, 7.4): PHP 7.4.3

The issue you are facing:

I executed a command which removed all emty files 0KB from ./nextcloud and probably recursively. I knew that i will remove .ocdata which i promptly recreated. (I executed that command because i put there several thousands of files in root directory of nc “nextcloud/”.
Everything now works throught the browser but no application will connect, tried linux sync client, nextcloud app on ios, nextcloud app on android, nextcloud talk on android, nextcloud talk on IOS. Only normal error message was shown on linage os android in nextcloud app, othe apps just printed me to resubmit credentials. Tried logging in with credentials and also QR code (same result).

Is this the first time you’ve seen this error? Y

Steps to replicate it:

  1. be in nextcloud/
  2. find . -name ‘*’ -size 0 -print0 | xargs -0 rm
  3. touch data/.ocdata


Changing stuff in the data folder is not recommended, your oc_filecache-table gets out of sync. You can manually trigger a resync:
sudo -u www-data occ files:scan --all

With your login problems, do you see any errors on the server side?

I’d try to use a recent version ( of the NC 21-branch that has fixed many issues since 21.0.1 and prevents you from debugging already resolved bugs.

Like this, I don’t see a direct link between authentication problems and the missing files. Did you delete the empty files just in the data folder or in the whole nextcloud folder?

I fixed it today by manually updating version of nextcloud throught terminal bcs online updater crashed. Yes I scanned all files with occ command, wasn t helping.

So, how to solved that problem, in case somebody come across it:

  1. remove update log and update-(random string) files from data folder
    *2. manually backup db and configs
  2. execute from nextcloud root folder sudo -u "your-user" php updater/updater.phar --no-interaction
  3. after that everything updated and work without problems