Skip to content

[Bug]: Undefined variable $result at /PATH/core/Command/App/Update.php#114 (and #117) #42476

@nursoda

Description

@nursoda

⚠️ This issue respects the following points: ⚠️

Bug description

Today, on a NC28.0.1 instance I ran occ app:update --all. It yielded

Exception App "Element for Nextcloud" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required. Failure during update of app "riotchat"

That is to be expected. However, with the same timestamp, I also see two additional log entries that I think should not occur:

Undefined variable $result at /PATH/core/Command/App/Update.php#114
Undefined variable $result at /PATH/core/Command/App/Update.php#117

Steps to reproduce

  1. Have a v27/Hub6 instance
  2. Install "Element for Nextcloud" (riotchat)
  3. Upgrade the instance to v28/Hub7 → incompatible are deactivated, including riotchat
    (correct since there is no NC28 compatible app release yet on apps.nextcloud.com)
  4. Run occ app:update --all
  5. View Log

Expected behavior

  1. I expect occ to throw a warning, not an error, since it is no error.
  2. I expect no additional technical errors be thrown and shown to users (in /settings/admin/overview → logging.

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Other

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MariaDB

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "test.seyfarth.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.1.1",
        "overwrite.cli.url": "https:\/\/test.seyfarth.de",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 7,
            "timeout": 1.5
        },
        "logtimezone": "Europe\/Berlin",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "trashbin_retention_obligation": "7,30",
        "versions_retention_obligation": "auto,366",
        "skeletondirectory": "",
        "default_language": "de_DE",
        "default_locale": "de_DE",
        "default_phone_region": "DE",
        "theme": "",
        "loglevel": 2,
        "simpleSignUpLink.shown": false,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [
            "2FA-Ausnahme"
        ],
        "has_rebuilt_cache": true,
        "updater.release.channel": "beta",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "blacklisted_files": [],
        "htaccess.IgnoreFrontController": true,
        "maintenance": false,
        "memories.exiftool_no_local": true,
        "memories.vod.path": "\/server\/www\/seyfarth\/test\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe"
    }
}

List of activated Apps

// Note: Test instance with MANY apps installed

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - analytics: 4.12.0
  - announcementcenter: 6.7.0
  - approval: 1.2.0
  - audioplayer: 3.4.1
  - bookmarks: 13.1.3
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.1
  - calendar_resource_management: 0.6.0
  - camerarawpreviews: 0.8.4
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - collectives: 2.9.2
  - comments: 1.18.0
  - contacts: 5.5.0
  - contactsinteraction: 1.9.0
  - cospend: 1.5.13
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.0
  - dicomviewer: 1.2.5
  - drop_account: 2.4.0
  - duplicatefinder: 1.1.4
  - eidlogin: 1.0.15
  - external: 5.3.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_accesscontrol: 1.18.0
  - files_automatedtagging: 1.18.0
  - files_external: 1.20.0
  - files_frommail: 0.4.0
  - files_lock: 28.0.1
  - files_mindmap: 0.0.30
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - forms: 4.0.0
  - groupfolders: 16.0.1
  - groupquota: 0.1.12
  - guests: 3.0.1
  - health: 2.2.2
  - impersonate: 1.15.0
  - integration_github: 2.0.6
  - integration_gitlab: 1.0.18
  - integration_mastodon: 2.0.3
  - integration_mattermost: 1.0.5
  - integration_openstreetmap: 1.0.11
  - integration_peertube: 1.0.2
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - mail: 3.5.0
  - maps: 1.3.1
  - mediadc: 0.3.8
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.1
  - notifications: 2.16.0
  - notify_push: 0.6.6
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - passwords: 2023.12.32-build5262
  - phonetrack: 0.7.7
  - photos: 2.4.0
  - polls: 6.0.1
  - previewgenerator: 5.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - quota_warning: 1.18.0
  - recognize: 6.0.1
  - recommendations: 2.0.0
  - registration: 2.3.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - sharelisting: 1.2.0
  - side_menu: 3.11.2
  - snappymail: 2.31.0
  - sociallogin: 5.6.1
  - socialsharing_diaspora: 3.0.1
  - socialsharing_email: 3.0.1
  - socialsharing_facebook: 3.0.1
  - socialsharing_telegram: 3.0.1
  - socialsharing_twitter: 3.0.1
  - spreed: 18.0.1
  - support: 1.11.0
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - tables: 0.6.5
  - tasks: 0.15.0
  - terms_of_service: 2.3.2
  - text: 3.9.1
  - theming: 2.3.0
  - theming_customcss: 1.15.0
  - transfer: 0.6.3
  - twofactor_admin: 4.4.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_email: 2.7.4
  - twofactor_gateway: 0.20.0
  - twofactor_nextcloud_notification: 3.8.0
  - twofactor_totp: 10.0.0-beta.2
  - twofactor_webauthn: 1.3.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflow_pdf_converter: 1.13.0
  - workflow_script: 1.13.0
  - workflowengine: 2.10.0
Disabled:
  - appointments: 1.15.4 (installed 1.15.4)
  - backup: 1.2.0 (installed 1.2.0)
  - carnet: 0.25.2 (installed 0.25.2)
  - cfg_share_links: 4.2.0 (installed 4.2.0)
  - data_request: 1.14.0 (installed 1.14.0)
  - emlviewer: 1.0.8 (installed 1.0.8)
  - encryption: 2.16.0 (installed 2.14.0)
  - end_to_end_encryption: 1.14.0 (installed 1.14.0)
  - epubreader: 1.4.7 (installed 1.4.7)
  - extract: 1.3.6 (installed 1.3.6)
  - files_antivirus: 5.4.0 (installed 5.4.0)
  - files_linkeditor: 1.1.16 (installed 1.1.16)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - flowupload: 1.1.3 (installed 1.1.3)
  - gestion: 2.4.1 (installed 2.4.1)
  - holiday_calendars: 0.3.0 (installed 0.3.0)
  - integration_deepl: 1.1.1 (installed 1.1.1)
  - integration_whiteboard: 0.0.15 (installed 0.0.15)
  - memories: 6.1.5 (installed 6.0.1)
  - metadata: 0.19.0 (installed 0.19.0)
  - music: 1.9.1 (installed 1.9.1)
  - news: 25.0.0-alpha3 (installed 25.0.0-alpha3)
  - ocr: 6.0.58 (installed 6.0.58)
  - passman: 2.4.7 (installed 2.4.7)
  - quicknotes: 0.8.10 (installed 0.8.10)
  - riotchat: 0.16.5 (installed 0.16.3)
  - social: 0.6.1 (installed 0.6.1)
  - talk_matterbridge: 1.27.0-0 (installed 1.27.0-0)
  - talk_simple_poll: 1.3.1 (installed 1.3.1)
  - twofactor_reminder: 1.1.0 (installed 1.1.0)
  - user_external: 3.2.0 (installed 3.2.0)
  - user_ldap: 1.19.0
  - video_converter: 1.0.6 (installed 1.0.6)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"44ntbDUgCE6T56vcfZqC","level":3,"time":"2023-12-25T10:18:25+01:00","remoteAddr":"","user":"--","app":"app:update","method":"","url":"--","message":"Failure during update of app \"riotchat\"","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Exception","Message":"App \"Element for Nextcloud\" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.","Code":0,"Trace":[{"file":"/PATH/lib/private/legacy/OC_App.php","line":764,"function":"checkAppDependencies","class":"OC_App","type":"::"},{"file":"/PATH/lib/private/Installer.php","line":202,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/PATH/core/Command/App/Update.php","line":104,"function":"updateAppstoreApp","class":"OC\\Installer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/PATH/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\App\\Update","type":"->"},{"file":"/PATH/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/PATH/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/PATH/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/PATH/lib/private/Console/Application.php","line":206,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/PATH/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/PATH/occ","line":11,"args":["/PATH/console.php"],"function":"require_once"}],"File":"/PATH/lib/private/legacy/OC_App.php","Line":967,"message":"Failure during update of app \"riotchat\"","exception":{},"CustomMessage":"Failure during update of app \"riotchat\""}}
{"reqId":"44ntbDUgCE6T56vcfZqC","level":3,"time":"2023-12-25T10:18:25+01:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined variable $result at /PATH/core/Command/App/Update.php#114","userAgent":"--","version":"28.0.1.1","data":{"app":"PHP"}}
{"reqId":"44ntbDUgCE6T56vcfZqC","level":3,"time":"2023-12-25T10:18:25+01:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined variable $result at /PATH/core/Command/App/Update.php#117","userAgent":"--","version":"28.0.1.1","data":{"app":"PHP"}}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions