nextcloud / groupfolders

📁👩‍👩‍👧‍👦 Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders

Home Page:https://apps.nextcloud.com/apps/groupfolders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions

jmechnich opened this issue · comments

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Upgrade to NC 29.0.0
  2. Make sure at least one group folder exists
  3. Wait for error to appear in log, triggered by hourly cron job

Expected behaviour

No error.

Actual behaviour

The following error shows up in log (see below for full backtrace).

"Exception": "TypeError",
"Message": "OCA\\Files_Versions\\Versions\\Version::__construct(): Argument #10 ($metadata) must be of type array, string given, called in /var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php on line 47",

Server configuration

Operating system:
Debian 12 (bookworm)

Web server:
nginx 1.22.1

Database:
mariadb 15.1

PHP version:
PHP 8.2.18

Nextcloud version: (see Nextcloud admin page)
Nextcloud Hub 8 (29.0.0)

Group folders version:
Group folders 16.0.6

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from NC 28.0.4

Are you using encryption: yes/no
no

Logs

Full error entry from Nextcloud log
{
  "reqId": "GiZkyjDaSMBPSGQqtkdE",
  "level": 3,
  "time": "2024-04-25T12:38:38+02:00",
  "remoteAddr": "",
  "user": "--",
  "app": "core",
  "method": "",
  "url": "--",
  "message": "Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 81, arguments: null)",
  "userAgent": "--",
  "version": "29.0.0.19",
  "exception": {
    "Exception": "TypeError",
    "Message": "OCA\\Files_Versions\\Versions\\Version::__construct(): Argument #10 ($metadata) must be of type array, string given, called in /var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php on line 47",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php",
        "line": 47,
        "function": "__construct",
        "class": "OCA\\Files_Versions\\Versions\\Version",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php",
        "line": 158,
        "function": "__construct",
        "class": "OCA\\GroupFolders\\Versions\\GroupVersion",
        "type": "->"
      },
      {
        "function": "OCA\\GroupFolders\\Versions\\{closure}",
        "class": "OCA\\GroupFolders\\Versions\\VersionsBackend",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php",
        "line": 142,
        "function": "array_map"
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php",
        "line": 80,
        "function": "getVersionsForFileFromDB",
        "class": "OCA\\GroupFolders\\Versions\\VersionsBackend",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php",
        "line": 81,
        "function": "getVersionsForFile",
        "class": "OCA\\GroupFolders\\Versions\\VersionsBackend",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php",
        "line": 60,
        "function": "expireFolder",
        "class": "OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php",
        "line": 43,
        "function": "expireAll",
        "class": "OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/Job.php",
        "line": 80,
        "function": "run",
        "class": "OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 102,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 92,
        "function": "start",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/cron.php",
        "line": 176,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/var/www/nextcloud/apps/files_versions/lib/Versions/Version.php",
    "Line": 32,
    "message": "Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 81, arguments: null)",
    "exception": {},
    "CustomMessage": "Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 81, arguments: null)"
  }
}

Looks like the required changes have already been added in bb59297 but a new release still has to be created.

I have the same issue.

Hello,
if you had the app installed and group folders active the app does not work anymore in 29 and the group folders are then deleted from users machines
Is there a way to compile the app since it seems that the code has already been written ?

Hello, if you had the app installed and group folders active the app does not work anymore in 29 and the group folders are then deleted from users machines Is there a way to compile the app since it seems that the code has already been written ?

@beankylla I do not think that your problem is related to this issue here. I can still access group folders in NC 29 using the Desktop app 3.13.0 on macOS. In any case, this repository has nothing to do with the Desktop application so the answer to your question is "no".

Edit: but maybe I misunderstand and you are not talking about the Desktop application (?)

Hi,
yes my bad i get the following error when trying to activaste it:
Error: This app cannot be enabled because it makes the server unstable
Will log this in a separate issue!
Thanks for the heads up!

After trying the current stable29 branch and getting a different error caused by #2910, I was able to get a working version based on bd47d01, just before the mentioned PR was merged.
In case it helps someone, here the created tarball: groupfolders-17.0.0-beta.1-stable29.bd47d012.tar.gz

Feedback for future upgrading consideration:

  • Docker container was taken down and up during unrelated maintenance ... (compose down, compose up).
  • Nextcloud was upgraded to 29 and GF disabled without any warning.
  • May or may not be relevant - either shortly before or shortly after, MacOS clients were upgraded to Nextcloud desktop client 3.13.0 (users randomly upgraded on receipt of upgrade offer).
  • Because GF had been disabled, users had all synced folders removed from their desktop client (no warning) - a somewhat heart stopping experience.
  • groupfolders-17.0.0-beta.1-stable29.bd47d012.tar.gz installed and GF re-enabled, seems to be working.
  • Users now re-syncing 250GB+ each to regain access to missing folders on desktop clients.

@gregjohnsonsaltaire

  • Docker container was taken down and up during unrelated maintenance ... (compose down, compose up).

If you have nextcloud:latest configured for the image in your compose file you might consider replacing it by a specific tag/version and make a conscious decision to upgrade.
In my experience, it is a major source of pain to immediately upgrade to a new NC version in a production environment. It usually takes a few patch releases until the major issues are resolved.

Edit: I just noticed in the list of supported tags that there are also stable and production tags which still point to 28.0.5-apache.