Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nextcloud 28.0.5 Upgrade - Fail post Install - Unable to load Composer Autoload related file #45076

Closed
5 of 8 tasks
leegimblett opened this issue Apr 27, 2024 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug needs info

Comments

@leegimblett
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrading from 28.0.4 to 28.0.5 via the web upgrade interface all Nextcloud pages rerturn a server error.

Reviewing the Apache logs the error appears to be a type in the folder name composer. The cause is unclear, but causes the failure. The error log entry is below:
[Sat Apr 27 15:50:06.291751 2024] [php:error] [pid 3281627:tid 140551961876224] [remote 139.47.56.109:24799] PHP Fatal error: Uncaught Error: Failed opening required '/home/httpd/html/nextcloud/3rdparty/compnser/platform_check.php' (include_path='/home/httpd/html/nextcloud/apps') in /home/httpd/html/nextcloud/3rdparty/composer/autoload_real.php:25\nStack trace:\n#0 /home/httpd/html/nextcloud/3rdparty/autoload.php(25): ComposerAutoloaderInit2f23f73bc0cc116b4b1eee1521aa8652::getLoader()\n#1 /home/httpd/html/nextcloud/lib/base.php(622): require_once('...')\n#2 /home/httpd/html/nextcloud/lib/base.php(1200): OC::init()\n#3 /home/httpd/html/nextcloud/index.php(37): require_once('...')\n#4 {main}\n thrown in /home/httpd/html/nextcloud/3rdparty/composer/autoload_real.php on line 25

Steps to reproduce

  1. Upgrade from 28.0.4 to 28.0.4 using the web interface
  2. All page loads fail

Expected behavior

Nextcloud wepages would appear

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

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": [
            "cloudy.gdstech.com.au"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.5.1",
        "overwrite.cli.url": "https:\/\/cloudy.gdstech.com.au",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "app_install_overwrite": [
            "files_downloadactivity"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "default_phone_region": "AU",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - 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
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.10.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - bruteforcesettings: 2.8.0 (installed 2.4.0)
  - calendar: 4.6.7 (installed 4.6.7)
  - encryption: 2.16.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@leegimblett leegimblett added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 27, 2024
@leegimblett leegimblett changed the title [Bug]: Nextcloud 28.0.5 Upgrade - Fail - Unable to load Composer Autoload related file [Bug]: Nextcloud 28.0.5 Upgrade - Fail post Install - Unable to load Composer Autoload related file Apr 27, 2024
@joshtrichards
Copy link
Member

joshtrichards commented Apr 27, 2024

Failed opening required '/home/httpd/html/nextcloud/3rdparty/compnser/platform_check.php'

That... doesn't make sense. The directory is literally provided by PHP. It's the __DIR__ constant:

https://github.com/nextcloud/3rdparty/blob/cbcfacd52639b3201dd2cf507da3d440ea3344fe/composer/autoload_real.php#L25

And I can't find references to that typo anywhere.

Can you try running occ integrity:check-core please (though it may fail due to this)?

Can confirm that line 25 from this file in your environment looks like the linked one above:

/home/httpd/html/nextcloud/3rdparty/composer/autoload_real.php

Can you provide the output of:

ls -l /home/httpd/html/nextcloud/3rdparty/composer
ls -l /home/httpd/html/nextcloud/3rdparty

After upgrading from 28.0.4 to 28.0.5 via the web upgrade interface all Nextcloud pages rerturn a server error.

Did you do the entire update/upgrade from the web ui? Or did you do the code update manually then finish the upgrade via the web UI?

@leegimblett
Copy link
Author

Yes I couldn't figure out how the __DIR__was getting it wrong I also did a recursive grep across the whole nextcloud directory and couldn't found a reference to the mistype either.

The occ integrity:check-core returned no output just a newline which I assume is OK

I can confirm that I used the WebUI for the full upgrade. I did try the upgrade using occ after, but it just said that the system was already up to date.

I am getting on a plane in a few hours so there will be delay in my subsequent replies.

root@mail:/home/httpd/html/nextcloud# ls -l /home/httpd/html/nextcloud/3rdparty/composer
total 1256
-rw-r--r-- 1 daemon daemon 425123 Apr 25 08:28 autoload_classmap.php
-rw-r--r-- 1 daemon daemon  11701 Apr 25 08:28 autoload_files.php
-rw-r--r-- 1 daemon daemon    436 Apr 25 08:28 autoload_namespaces.php
-rw-r--r-- 1 daemon daemon   6745 Apr 25 08:28 autoload_psr4.php
-rw-r--r-- 1 daemon daemon   1898 Apr 25 08:28 autoload_real.php
-rw-r--r-- 1 daemon daemon 485928 Apr 25 08:28 autoload_static.php
-rw-r--r-- 1 daemon daemon  16378 Apr 25 08:28 ClassLoader.php
-rw-r--r-- 1 daemon daemon    292 Apr 25 08:28 include_paths.php
-rw-r--r-- 1 daemon daemon 255368 Apr 25 08:28 installed.json
-rw-r--r-- 1 daemon daemon  38178 Apr 25 08:28 installed.php
-rw-r--r-- 1 daemon daemon  16143 Apr 25 08:28 InstalledVersions.php
-rw-r--r-- 1 daemon daemon   1070 Apr 25 08:28 LICENSE
-rw-r--r-- 1 daemon daemon    925 Apr 25 08:28 platform_check.php

ls -l /home/httpd/html/nextcloud/3rdparty
total 420
-rw-r--r--  1 daemon daemon    771 Apr 25 08:28  autoload.php
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  aws
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  bantu
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  beberlei
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  brick
drwxr-xr-x  2 daemon daemon   4096 Apr 27 15:48  composer
-rw-r--r--  1 daemon daemon   1980 Apr 25 08:28  composer.json
-rw-r--r--  1 daemon daemon 242414 Apr 25 08:28  composer.lock
-rw-r--r--  1 daemon daemon    129 Apr 25 08:28  composer.patches.json
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  cweagans
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  deepdiver
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  deepdiver1975
drwxr-xr-x  7 daemon daemon   4096 Apr 27 15:18  doctrine
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  egulias
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  fgrosse
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  fusonic
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  giggsey
drwxr-xr-x  6 daemon daemon   4096 Apr 27 15:18  guzzlehttp
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  icewind
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  justinrainbow
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  laravel
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  league
-rw-r--r--  1 daemon daemon    543 Apr 25 08:28 'LICENSE INFO'
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  mexitek
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  microsoft
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  mlocati
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  mtdowling
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  nextcloud
drwxr-xr-x  6 daemon daemon   4096 Apr 27 15:18  pear
drwxr-xr-x  5 daemon daemon   4096 Apr 27 15:18  php-http
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  php-opencloud
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  phpseclib
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  pimple
drwxr-xr-x 10 daemon daemon   4096 Apr 27 15:18  psr
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  punic
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  ralouphie
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  ramsey
-rw-r--r--  1 daemon daemon   1938 Apr 25 08:28  README.md
drwxr-xr-x  8 daemon daemon   4096 Apr 27 15:18  sabre
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  scssphp
drwxr-xr-x  4 daemon daemon   4096 Apr 27 15:18  spomky-labs
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  stecman
drwxr-xr-x 25 daemon daemon   4096 Apr 27 15:18  symfony
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  thecodingmachine
drwxr-xr-x  3 daemon daemon   4096 Apr 27 15:18  wapmorgan
drwxr-xr-x  5 daemon daemon   4096 Apr 27 15:18  web-auth

@leegimblett
Copy link
Author

I have also searched the whole filesystem and there is no directory called or which the contains "compnser"

@leegimblett
Copy link
Author

I also have other PHP applications on the server that use composer that are working just fine.: as was Nextcloud before the minor upgrade. I am running composer version 2.7.4.

@leegimblett
Copy link
Author

I found some time to focus on this issue as I now urgently need my NextCloud instance for a client related task.

I first created a symbolic link 3rdparty/compnser to 3rdpary/composer . That didn't end well!

I then updated all the apps (only Calendar had one available) using the cli command

sudo -u www-data php occ app:update --all

And now everything works as it should. All very strange but there you go.

I have subsequently reviewed the Upgrading notes on the NextCloud website and it does instruct that you check all apps are compatible with the latest version. To be honest I have been lax in updating apps before the main updates so I now know going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug needs info
Projects
None yet
Development

No branches or pull requests

3 participants