Tag id(s) not found [FIXED]

EDIT: Found the problem and kind of fixed it.
A lot of fiddling around gave me a workaround, more than a fix: The tags are not system tags per-se, as the error message lets you thik that way.
As I was going through the database and other things, it struc me: I removed the only file tag I had, because I didn’t use it anymore. Creating a new tag (same name, but I don’t know if that matters and set it on a few folders and files and voila it is working again.
It seems like a bug, so I’ll report one.

Here the original post:
Since a few days, my nextcloud installation is becoming unstable. It tells me it’s missing tags. Especially in the desktop and Android sync clients.
But also occ files:scan throws this error

The log shows:

OCP\SystemTag\TagNotFoundException: Tag id(s) not found

under the webdav app.

I’m running archlinux. Nextcloud as a archlinux package.
Versions:

  • php 7.4.9 (including fpm)
  • apache 2.4.46
  • nextcloud: 19.0.1

Full log entry:

“Code”:0,“Trace”:[{“file”:"/usr/share/webapps/nextcloud/lib/private/SystemTag/SystemTagObjectMapper.php",“line”:258,“function”:“getTagsByIds”,“class”:“OC\SystemTag\SystemTagManager”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/SystemTag/SystemTagObjectMapper.php",“line”:149,“function”:“assertTagsExist”,“class”:“OC\SystemTag\SystemTagObjectMapper”,“type”:"->"},{“file”:"/mnt/apps/files_automatedtagging/lib/Operation.php",“line”:89,“function”:“assignTags”,“class”:“OC\SystemTag\SystemTagObjectMapper”,“type”:"->"},{“file”:"/mnt/apps/files_automatedtagging/lib/CacheListener.php",“line”:45,“function”:“checkOperations”,“class”:“OCA\FilesAutomatedTagging\Operation”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",“line”:251,“function”:“onCacheEvent”,“class”:“OCA\FilesAutomatedTagging\CacheListener”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",“line”:73,“function”:“callListeners”,“class”:“Symfony\Component\EventDispatcher\EventDispatcher”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",“line”:86,“function”:“dispatch”,“class”:“Symfony\Component\EventDispatcher\EventDispatcher”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php",“line”:63,“function”:“dispatch”,“class”:“OC\EventDispatcher\EventDispatcher”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Cache.php",“line”:399,“function”:“dispatch”,“class”:“OC\EventDispatcher\SymfonyAdapter”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php",“line”:141,“function”:“update”,“class”:“OC\Files\Cache\Cache”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php",“line”:141,“function”:“update”,“class”:“OC\Files\Cache\Wrapper\CacheWrapper”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php",“line”:291,“function”:“update”,“class”:“OC\Files\Cache\Wrapper\CacheWrapper”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php",“line”:224,“function”:“addToCache”,“class”:“OC\Files\Cache\Scanner”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php",“line”:338,“function”:“scanFile”,“class”:“OC\Files\Cache\Scanner”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/lib/private/Files/Cache/Updater.php",“line”:125,“function”:“scan”,“class”:“OC\Files\Cache\Scanner”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/apps/dav/lib/Connector/Sabre/File.php",“line”:299,“function”:“update”,“class”:“OC\Files\Cache\Updater”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1143,“function”:“put”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:515,“function”:“updateFile”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“httpPut”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:474,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:251,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:319,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/apps/dav/appinfo/v1/webdav.php",“line”:82,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->"},{“file”:"/usr/share/webapps/nextcloud/remote.php",“line”:167,“args”:["/usr/share/webapps/nextcloud/apps/dav/appinfo/v1/webdav.php"],“function”:“require_once”}],“File”:"/usr/share/webapps/nextcloud/lib/private/SystemTag/SystemTagManager.php",“Line”:125,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Android) Nextcloud-android/3.13.0”,“version”:“19.0.1.1”,“id”:“5f3d2d467d4ca”}

I’m at a loss…

Does anyone experience the same issues?
Oh, by the way i’m running behind HAproxy (OPNsense appliance)