Skip to content

[Bug]: After upgrade to NC 29.0.0.7 the upgrade mechanism seems to be broken #44157

@stefan-niedermann

Description

@stefan-niedermann

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrading to NC 29.0.0.2 Beta via CLI, trying to further upgrade the instance fails:

php updater/updater.phar --no-interaction --no-backup && php occ app:enable nextcloud-aio --force

Nextcloud Updater - version:  dirty

PHP Fatal error:  Uncaught Error: Class "OC" not found in /var/www/html/config/apps.config.php:5
Stack trace:
#0 phar:///var/www/html/updater/updater.phar/lib/Updater.php(66): require_once()
#1 phar:///var/www/html/updater/updater.phar/lib/UpdateCommand.php(90): NC\Updater\Updater->__construct('/var/www/html/u...')
#2 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Command/Command.php(298): NC\Updater\UpdateCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(NC\Updater\UpdateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 phar:///var/www/html/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#7 /var/www/html/updater/updater.phar(14): require('phar:///var/www...')
#8 {main}
  thrown in /var/www/html/config/apps.config.php on line 5

Steps to reproduce

  1. Install Nextcloud 27 AIO
  2. Switch to beta channel
  3. run php updater/updater.phar --no-interaction --no-backup && php occ app:enable nextcloud-aio --force twice

Expected behavior

Upgrading should work or simply detect no new versions. This looks more like a crash.

Installation method

Official All-in-One appliance

Nextcloud Server version

master

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

None

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "cloud.example.com",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.example.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "29.0.0.7",
        "overwrite.cli.url": "https:\/\/cloud.example.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": "2",
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": "10485760",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "updatedirectory": "\/nc-updater",
        "davstorage.request_timeout": 3600,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "appsallowlist": false,
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "nextcloud-aio",
            "news",
            "notify_push",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "files_fulltextsearch",
            "richdocuments",
            "polls",
            "files_rightclick"
        ],
        "maintenance_window_start": 1
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - app_api: 2.2.0
  - calendar: 4.7.0-beta.1
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0-alpha.1
  - contactsinteraction: 1.10.0
  - dav: 1.30.0
  - deck: 1.13.0-beta.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_fulltextsearch: 28.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - fulltextsearch: 28.0.1
  - fulltextsearch_elasticsearch: 28.0.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - news: 25.0.0-alpha4
  - nextcloud-aio: 0.4.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.9.2
  - notifications: 2.17.0
  - notify_push: 0.6.9
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - polls: 6.1.6
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recognize: 6.1.1
  - related_resources: 1.4.0
  - richdocuments: 8.4.0-beta.1
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - spreed: 19.0.0-beta.1
  - support: 1.12.0
  - systemtags: 1.19.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - viewer: 2.3.0
  - workflowengine: 2.11.0
Disabled:
  - bruteforcesettings: 2.9.0
  - dashboard: 7.9.0 (installed 7.7.0)
  - encryption: 2.17.0
  - files_external: 1.21.0
  - files_rightclick: 0.15.1 (installed 0.15.1)
  - recommendations: 2.1.0 (installed 1.6.0)
  - survey_client: 1.17.0 (installed 1.15.0)
  - suspicious_login: 7.0.0
  - user_ldap: 1.20.0
  - user_status: 1.9.0 (installed 1.7.0)
  - weather_status: 1.9.0 (installed 1.7.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

[
{"reqId":"IxrSWVpnKArTgRr2sOkB","level":3,"time":"2024-03-09T18:09:26+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Class \"OC\\BackgroundJob\\TimedJob\" not found","userAgent":"--","version":"29.0.0.7","exception":{"Exception":"Error","Message":"Class \"OC\\BackgroundJob\\TimedJob\" not found","Code":0,"Trace":[{"file":"/var/www/html/lib/composer/composer/ClassLoader.php","line":576,"function":"include"},{"file":"/var/www/html/lib/composer/composer/ClassLoader.php","line":427,"function":"Composer\\Autoload\\{closure}","args":["*** sensitive parameters replaced ***"]},{"function":"loadClass","class":"Composer\\Autoload\\ClassLoader","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"__construct","class":"ReflectionClass","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":146,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":469,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":64,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/public/Server.php","line":55,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":326,"function":"get","class":"OCP\\Server","type":"::","args":["OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":235,"function":"buildJob","class":"OC\\BackgroundJob\\JobList","type":"->","args":[[8625,"OCA\\Richdocuments\\Backgroundjobs\\ObtainCapabilities","null",0,1710007501,"And 4 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/cron.php","line":163,"function":"getNext","class":"OC\\BackgroundJob\\JobList","type":"->","args":[true]}],"File":"/var/www/html/custom_apps/richdocuments/lib/Backgroundjobs/ObtainCapabilities.php","Line":29,"message":"Class \"OC\\BackgroundJob\\TimedJob\" not found","exception":[],"CustomMessage":"Class \"OC\\BackgroundJob\\TimedJob\" not found"},"id":"65f036ef1f3bd"}
{"reqId":"poOmvdzB3Sxo2YxkzfLN","level":3,"time":"2024-03-09T18:07:46+00:00","remoteAddr":"79.225.81.230","user":"admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/predefined_statuses?format=json","message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.28.0","version":"29.0.0.7","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","Code":-1,"Trace":[{"file":"/var/www/html/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->","args":["OCA\\UserStatus\\Controller\\UserStatusController"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->","args":["user_status"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":286,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->","args":["user_status"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/user_status/api/v1/predefined_statuses"]},{"file":"/var/www/html/ocs/v1.php","line":66,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/user_status/api/v1/predefined_statuses"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","exception":[],"CustomMessage":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist"},"id":"65f036ef1f418"},
{"reqId":"zWRV1LrgNwu6KKwyiOKW","level":3,"time":"2024-03-09T18:05:10+00:00","remoteAddr":"79.225.81.230","user":"admin","app":"no app in context","method":"GET","url":"/apps/files","message":"App files_rightclick threw an error during app.php load and will be disabled: Call to undefined method OC\\Server::getEventDispatcher()","userAgent":"Mozilla/5.0 (Android 13; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0","version":"29.0.0.7","exception":{"Exception":"Error","Message":"Call to undefined method OC\\Server::getEventDispatcher()","Code":0,"Trace":[{"file":"/var/www/html/lib/private/App/AppManager.php","line":525,"function":"require_once"},{"file":"/var/www/html/lib/private/App/AppManager.php","line":416,"function":"requireAppFile","class":"OC\\App\\AppManager","type":"::","args":["/var/www/html/custom_apps/files_rightclick"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->","args":["files_rightclick"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->","args":[[]]},{"file":"/var/www/html/lib/base.php","line":1030,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/files_rightclick/appinfo/app.php","Line":8,"message":"App files_rightclick threw an error during app.php load and will be disabled: Call to undefined method OC\\Server::getEventDispatcher()","exception":[],"CustomMessage":"App files_rightclick threw an error during app.php load and will be disabled: Call to undefined method OC\\Server::getEventDispatcher()"},"id":"65f036ef1f495"},
{"reqId":"ah20b1Cq3Geug7pmpNqF","level":3,"time":"2024-03-09T17:37:38+00:00","remoteAddr":"79.225.81.230","user":"admin","app":"index","method":"GET","url":"/index.php/apps/news/api/v1-2/feeds?","message":"Class \"OCA\\News\\Controller\\FolderApiController\" does not exist","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.28.0","version":"29.0.0.7","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\News\\Controller\\FolderApiController\" does not exist","Code":-1,"Trace":[{"file":"/var/www/html/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->","args":["OCA\\News\\Controller\\FolderApiController"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->","args":["news"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":279,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->","args":["news"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->","args":["/apps/news/api/v1-2/feeds"]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/news/api/v1-2/feeds"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\News\\Controller\\FolderApiController\" does not exist","exception":[],"CustomMessage":"Class \"OCA\\News\\Controller\\FolderApiController\" does not exist"},"id":"65f036f019e90"},
{"reqId":"QR0Liwi05ez9diaNR1dO","level":3,"time":"2024-03-09T17:34:20+00:00","remoteAddr":"130.162.232.38","user":"--","app":"index","method":"GET","url":"/apps/richdocuments/settings/fonts.json","message":"Class \"OCA\\Richdocuments\\Controller\\FederationController\" does not exist","userAgent":"COOLWSD HTTP Agent 23.05.9.2","version":"29.0.0.7","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\Richdocuments\\Controller\\FederationController\" does not exist","Code":-1,"Trace":[{"file":"/var/www/html/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->","args":["OCA\\Richdocuments\\Controller\\FederationController"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->","args":["richdocuments"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":279,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->","args":["richdocuments"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/settings/fonts.json"]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/settings/fonts.json"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\Richdocuments\\Controller\\FederationController\" does not exist","exception":[],"CustomMessage":"Class \"OCA\\Richdocuments\\Controller\\FederationController\" does not exist"},"id":"65f036f019f3e"}
]

Additional info

I applied this patch without any effect.

I am absolutely aware that this version is tagged as Beta. However it might be an actual bug, therefore reporting it here 😉

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions