Internal Error after update to 26 (due to deprecated function OCP\AppFramework\Db\Mapper\)

After upgrading to 26.0.0 I recieve an internal error related to OCP\AppFramework\Db\Mapper\ not being found. This module was deprecated in NC26. However, now I’m facing an internal server error, and I have no idea how to fix it :-/ any idea what this error might be related to? How could I fix it?

{"reqId":"i3wx2nd6OG9ODL6BZoMK","level":3,"time":"2023-04-07T15:13:35+00:00","remoteAddr":"2a02:8071:2c81:5b60:7654:60c4:5c09:952f","user":"root","app":"index","method":"GET","url":"/index.php/apps/theming/image/logo?v=41","message":"Class \"OCP\\AppFramework\\Db\\Mapper\" not found","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","version":"26.0.0.11","exception":{"Exception":"Error","Message":"Class \"OCP\\AppFramework\\Db\\Mapper\" not found","Code":0,"Trace":[{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/composer/composer/ClassLoader.php","line":578,"function":"include"},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/composer/composer/ClassLoader.php","line":432,"function":"Composer\\Autoload\\{closure}","class":"Composer\\Autoload\\ClassLoader","type":"::","args":["*** sensitive parameters replaced ***"]},{"function":"loadClass","class":"Composer\\Autoload\\ClassLoader","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"__construct","class":"ReflectionClass","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Db\\WopiMapper",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map","args":[["Closure"],[["ReflectionParameter","rootFolder"],["ReflectionParameter","shareManager"],["ReflectionParameter","urlGenerator"],["ReflectionParameter","wopiParser"],["ReflectionParameter","capabilitiesService"],["ReflectionParameter","UserId"],"*** sensitive parameters replaced ***",["ReflectionParameter","trans"],["ReflectionParameter","helper"],["ReflectionParameter","permissionManager"]]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Richdocuments\\TokenManager"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\TokenManager"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\TokenManager"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\TokenManager"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\TokenManager",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map","args":[["Closure"],[["ReflectionParameter","cacheFactory"],["ReflectionParameter","clientService"],["ReflectionParameter","logger"],"*** sensitive parameters replaced ***",["ReflectionParameter","appConfig"],["ReflectionParameter","request"],["ReflectionParameter","urlGenerator"]]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Richdocuments\\Service\\FederationService"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Service\\FederationService"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Service\\FederationService"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Service\\FederationService"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":97,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Service\\FederationService",true]},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"array_map","args":[["Closure"],[["ReflectionParameter","request"],["ReflectionParameter","config"],["ReflectionParameter","appManager"],"*** sensitive parameters replaced ***",["ReflectionParameter","globalScaleConfig"]]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[["ReflectionClass","OCA\\Richdocuments\\Listener\\CSPListener"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Utility/SimpleContainer.php","line":142,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Listener\\CSPListener"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":493,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Richdocuments\\Listener\\CSPListener"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/ServerContainer.php","line":155,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Richdocuments\\Listener\\CSPListener"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/EventDispatcher/ServiceEventListener.php","line":70,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\Richdocuments\\Listener\\CSPListener"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"],"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"],["Closure"]],"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/EventDispatcher/EventDispatcher.php","line":87,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"],"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/EventDispatcher/EventDispatcher.php","line":99,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/Security/CSP/ContentSecurityPolicyManager.php","line":60,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php","line":70,"function":"getDefaultPolicy","class":"OC\\Security\\CSP\\ContentSecurityPolicyManager","type":"->","args":[]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":142,"function":"afterController","class":"OC\\AppFramework\\Middleware\\Security\\CSPMiddleware","type":"->","args":[["OCA\\Theming\\Controller\\ThemingController"],"getImage",["OCP\\AppFramework\\Http\\FileDisplayResponse"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/Http/Dispatcher.php","line":175,"function":"afterController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[["OCA\\Theming\\Controller\\ThemingController"],"getImage",["OCP\\AppFramework\\Http\\FileDisplayResponse"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Theming\\Controller\\ThemingController"],"getImage"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Theming\\Controller\\ThemingController","getImage",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["logo","theming.Theming.getImage"]]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/lib/base.php","line":1055,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/theming/image/logo"]},{"file":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/vhosts/hosting154271.a2ed6.netcup.net/cloud.xxx.de/apps/richdocuments/lib/Db/WopiMapper.php","Line":35,"CustomMessage":"--"}}

Somehow the collabora app was not disabled, even though it was listed as “no longer supported”.

I removed the folder /apps/richtext/ and the instance works again :slight_smile:

Great! Happy to read that!

Did you realy have a directory called apps/richtext/ ?
or was that a typo while you meant apps/richdocuments/ ?

It would not have been necessary to delete the whole folder, simply disabling the app and re enabling after update to version 8.0.0 (which is supported under 26) would probably have done the same.

Nextcloud does not consist solely of files and folders, but also of the database in which everything is registered. That’s why the occ app:disable or occ app:remove function usually continues to work even with internal errors, so that apps can be deactivated or uninstalled cleanly, even if other occ commands are throwing error messages.

1 Like

I also receive this error after updating. I have tried deleting /apps/richdocuments but the problem still persists. Is there a better way to fix this issue? Maybe there’s another apps cause the problem

I have the same problem after upgrading to 26.0.1 in my docker-container.

On the webinterface, I only got the message

Interner Serverfehler
Der Server konnte die Anfrage nicht fertig stellen.

Sollte dies erneut auftreten, senden Sie bitte die nachfolgenden technischen Einzelheiten an Ihren Server-Administrator.

Weitere Details können im Server-Protokoll gefunden werden.

Technische Details
Entfernte Adresse: 176…
Anfragekennung: J85hu0klfgyqoNlbJLcL

… without any details in the log files.

But on the console I could find the cause when using occ:

docker exec --user www-data ${DOCKERIMAGE} php occ app:list

I got this error:

 Error: Class "OCP\AppFramework\Db\Mapper" not found in /var/www/html/custom_apps/deck/lib/Db/DeckMapper.php:36                                                                                                                       

So I removed the deck folder:

docker exec --user www-data ${DOCKERIMAGE} rm /var/www/html/custom_apps/deck/ /tmp/

And this worked!

after upgrading, you can download and activate Deck in your apps again and all data is still there

This works for me. Thanks for sharing.