After update to 5.2.0 get template error missing admin.php

Exception: Call to undefined method OCA\Memories\Util::callerNativeVersion() in file ‘/var/www/nextcloud/apps/memories/lib/Controller/PageController.php’ line 41

full log says

[index] Fehler: Exception: Call to undefined method OCA\Memories\Util::callerNativeVersion() in file ‘/var/www/nextcloud/apps/memories/lib/Controller/PageController.php’ line 41 at <>

  1. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
  2. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
  3. /var/www/nextcloud/lib/base.php line 1060
    OC\Route\Router->match()
  4. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

Error: Call to undefined method OCA\Memories\Util::callerNativeVersion() at <>

  1. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Memories\Controller\PageController->main()
  2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
  3. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
  4. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
  5. /var/www/nextcloud/lib/base.php line 1060
    OC\Route\Router->match()
  6. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /apps/memories/
from CLIENT-IP by USERNAME at 2023-07-01T06:52:29+02:00

after updating the app.

Line 41 says

 // Check native version if available
        $nativeVer = Util::callerNativeVersion();
        if (null !== $nativeVer && version_compare($nativeVer, BinExt::NX_VER_MIN, '<')) {
            return new PublicTemplateResponse($this->appName, 'native-old');
        }

Any ideas what cause this problem or a bug?
Opening the memories app in nextcloud delivers

Internal Server Error → failed to load config

log says

[index] Fehler: Exception: template file not found: template:admin at <>

  1. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 151
    OC\Template\TemplateFileLocator->find()
  2. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 88
    OC_Template->findTemplate()
  3. /var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php line 207
    OC_Template->__construct()
  4. /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php line 130
    OCP\AppFramework\Http\TemplateResponse->render()
  5. /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php line 83
    OCA\Settings\Controller\AdminSettingsController->formatSettings()
  6. /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php line 149
    OCA\Settings\Controller\AdminSettingsController->getSettings()
  7. /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php line 68
    OCA\Settings\Controller\AdminSettingsController->getIndexResponse()
  8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Settings\Controller\AdminSettingsController->index()
  9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
  10. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
  11. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
  12. /var/www/nextcloud/lib/base.php line 1060
    OC\Route\Router->match()
  13. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /settings/admin/memories
from CLIENT-IP by USERNAME at 2023-07-01T06:59:37+02:00

Downloaded the tar.gz file for the 5.1.0 from github and recognized that the template folder in meories contain an admin.php → the 5.2.0 comes only with native-old.php and main.php

Copying the admin.php to the template dir in memories app 5.2.0 and restart does not help.
The log concerning the missing admin template seems to be gone but the error concerning
PageController.php’ line 41 at <> still resist and opening memories app also delivers internal server error.

The issue on github can be found here

Reboot the Nextcloud instance.

not that easy in my case!

No reboot / no systemctl restart php8.2-fpm helped. So i investigated that in some cases the database table “memories_…” can be corrupted.

That might had happened. So i droped the nc db and created a new one and restored my dump file from late 30 June 2023 into that db. Then i installed the 5.1.0 version manually from github zip file and re-enabled the memories app. After that i rebooted the server and updated the apps via

sudo -u www-data php /var/www/nextcloud/occ app:update --all

so the memories app gets again the update to 5.2.0 and after another reboot all worked again.

So the hint on github to make an update advice (those things can happen during or after update …) is highly recommended in my opinion!!
In my case i never had this kind of trouble with the photos app…