nextcloud / groupfolders

πŸ“πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
288 stars 87 forks source link

`Class 'OCP\Constant' not found` in version 9.0.4 #1867

Closed TP75 closed 2 years ago

TP75 commented 2 years ago

Steps to reproduce

Update existing Nextcloud 21 install for GroupFolders App from 9.0.3 to 9.0.4

Expected behaviour

no such error

Actual behaviour

Recurring error during cron or similar presumed.
Error: Class 'OCP\Constant' not found

Please see the Nextcloud log section below.

Server configuration detail

Operating system: Debian 11.2 - Linux 5.10.0-10-amd64 - SMP Debian 5.10.84-1 (2021-12-08) x86_64

Webserver: Apache2 - 2.4.52-1~deb11u2 amd64

Database: mysql 10.5.12

PHP version:

7.4.25 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, json, ldap, exif, mysqli, pdo_mysql, apc, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Phar, Zend OPcache

Nextcloud version: 21.0.7 - 21.0.7.0

Updated from an older Nextcloud/ownCloud or fresh install: updated from 21.0.5 and long running NC install

Where did you install Nextcloud from: Nextcloud Updater Web GUI

Signing status Array ( )
List of activated apps ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - admin_audit: 1.11.0 - announcementcenter: 5.0.1 - apporder: 0.14.0 - bruteforcesettings: 2.3.0 - calendar: 3.0.4 - circles: 0.21.4 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 4.0.7 - contactsinteraction: 1.2.0 - dashboard: 7.1.0 - dav: 1.17.1 - deck: 1.4.7 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_accesscontrol: 1.11.1 - files_mindmap: 0.0.25 - files_pdfviewer: 2.1.1 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_texteditor: 2.14.0 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - forms: 2.4.0 - groupfolders: 9.0.4 - issuetemplate: 0.7.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - nextcloud_announcements: 1.10.0 - notes: 4.3.0 - notifications: 2.9.0 - oauth2: 1.9.0 - password_policy: 1.11.0 - photos: 1.3.0 - polls: 3.4.2 - privacy: 1.5.0 - provisioning_api: 1.11.0 - quota_warning: 1.13.0 - recommendations: 1.0.0 - richdocuments: 4.2.3 - richdocumentscode: 21.11.6 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - tasks: 0.14.2 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - workflowengine: 2.3.1 Disabled: - encryption - files_external - support - user_ldap - weather_status ```
Configuration (config/config.php) ``` { "debug": false, "trusted_domains": [ "cloud.xxx", "192.168.xxx" ], "overwrite.cli.url": "https:\/\/cloud.xxx", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "forwarded_for_headers": [ "HTTP_X_FORWARDED_FOR", "X-Forwarded-For" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "updater.release.channel": "stable", "instanceid": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "21.0.7.0", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "mysql.utf8mb4": true, "logtimezone": "Europe\/Berlin", "logdateformat": "Y-m-d H:i:s", "log_rotate_size": 52428800, "loglevel": 2, "activity_expire_days": 190, "maintenance": false, "installed": true, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "filelocking.enabled": "true", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "dbindex": 0, "timeout": 0 }, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "theme": "", "mail_smtpmode": "smtp", "mail_smtpauthtype": "PLAIN", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "simpleSignUpLink.shown": false, "default_phone_region": "DE", "app_install_overwrite": [ "issuetemplate" ] } ```

Are you using external storage, if yes which one: n.a.

Are you using encryption: no

Are you using an external user-backend, if yes which one: n.a.

Client configuration

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36

Operating system: macOS

Logs

Web server error log ``` n.a. ```
Nextcloud log ``` Error: Class 'OCP\Constant' not found /var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 67: OCA\GroupFolders\Versions\VersionsBackend->getAllVersionedFiles() /var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 58: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 40: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /var/www/nextcloud/lib/private/BackgroundJob/Job.php - line 52: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php - line 59: OC\BackgroundJob\Job->execute() /var/www/nextcloud/cron.php - line 128: OC\BackgroundJob\TimedJob->execute() ```
Browser log n.a.
TP75 commented 2 years ago

Stub entry made available to the Nextcloud Support Forum as:

https://help.nextcloud.com/t/version-9-0-4-error-class-ocp-constant-not-found/130904

CarlSchwan commented 2 years ago

Can you test https://github.com/nextcloud/groupfolders/pull/1868?

TP75 commented 2 years ago

@CarlSchwan Thanks for the prompt reply.

The test is running. So far so good.

I made the proposed changes taken from your a.m. fix and turned maintenance mode off again. However, the respective cron job is called once an hour only and I am unsure if the cron job may have changed in time. Will come back in 2 hours for further details of the test, I presume.

TP75 commented 2 years ago

The fix holds as expected. No error messages in the logging.

@CarlSchwan THX

TP75 commented 2 years ago

However, awaiting official 9.0.5 version or later of Group Folders App.

h4knet commented 2 years ago

I've the same issue. I've tried the fix provided by @CarlSchwan ; I will update if the errors are still appearing.

kokotko1337 commented 2 years ago

working