nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.5k stars 4.08k forks source link

[Bug]: Update to NC28 (from 27) seems to remove `SymfonyAdapter.php` #42239

Closed blwtxc closed 11 months ago

blwtxc commented 11 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

I just upgraded to NC28.0.0 from NC27.1.4 and saw the NC logs flooded with the error message

Could not resolve SymfonyAdapter! Class "symfonyAdapter" does not exist at .../private/AppFramework/Utility/SimpleContainer.php line 135

After searching the web and even trying to rewrite 'symfonyAdapter' to 'SymfonyAdapter' (typos happen), I found that the upgrader removed SymfonyAdapter.php and GenericEventWrapper.php. At least SymfonyAdapter.php is still registered in 'core/signature.json', what give me the hint into the right direction.

SOLUTION:
Copy both files from archive or previous install (if still available) to the expected dir.

cp <archive>/lib/private/EventDispatcher/GenericEventWrapper.php <nc28>/lib/private/EventDispatcher/GenericEventWrapper.php
cp <archive>/lib/private/EventDispatcher/SymfonyAdapter.php <nc28>/lib/private/EventDispatcher/SymfonyAdapter.php

Steps to reproduce

  1. Upgrade to NC28.0.0
  2. Tail your NC logs

Expected behavior

Everything works

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?

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

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

joshtrichards commented 11 months ago

SymfonyAdapter.php is still registered in 'core/signature.json', what give me the hint into the right direction.

SymfonyAdapter was intentionally removed (see #39605) and it's definitely no longer in core/signature.json (I just double-checked to make sure we didn't overlook something). So it sounds like you have old files in your installation.

Since you did a manual installation, perhaps you missed a few files/folders?

As this sounds like a local matter, if you need further help please post over at the Nextcloud Help Forum - https://help.nextcloud.com. I'm going to close this out on that basis, but don't hesitate to follow-up if you discover this is actually a bug.

dennishohmann commented 11 months ago

I got similar logs, maybe from the "bookmarks"-app. After disabling it, messages stopped. Could not boot bookmarks: Could not resolve symfonyAdapter! Class "symfonyAdapter" does not exist

joshtrichards commented 11 months ago

@dennishohmann Indeed your situation looks to be this one: https://github.com/nextcloud/bookmarks/issues/2102