Help, Apps page doesn't work after update to 25

Support intro

Hello to all, i have my nextcloud working fine yesterday but i make the updater to the lastest version and now my apps page dont works more in the logs show me this

Nextcloud version 25
PHP Versión: 7.4.32
Memory limit: 1 GB
Max execution time: 3600
Tamaño máximo de carga: 2 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, i360, bcmath, dom, enchant, fileinfo, gd, imagick, imap, intl, json, ldap, exif, memcache, mysqlnd, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, soap, sockets, ssh2, timezonedb, xmlreader, xmlrpc, xmlwriter, xsl, zip, ionCube Loader, Zend OPcache

The issue you are facing:

{“reqId”:“Kfbo7SlcK9SUaY8mFNPu”,“level”:3,“time”:“2022-10-20T19:32:08+00:00”,“remoteAddr”:“189.130.57.128”,“user”:“rsosa”,“app”:“index”,“method”:“GET”,“url”:“/index.php/settings/apps/list”,“message”:“Argument 1 passed to OC\App\PlatformRepository::normalizeVersion() must be of the type string, null given, called in /home/asasuste/files/lib/private/App/PlatformRepository.php on line 53 in file ‘/home/asasuste/files/lib/private/App/PlatformRepository.php’ line 148”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”,“version”:“25.0.0.18”,“exception”:{“Exception”:“Exception”,“Message”:“Argument 1 passed to OC\App\PlatformRepository::normalizeVersion() must be of the type string, null given, called in /home/asasuste/files/lib/private/App/PlatformRepository.php on line 53 in file ‘/home/asasuste/files/lib/private/App/PlatformRepository.php’ line 148”,“Code”:0,“Trace”:[{“file”:“/home/asasuste/files/lib/private/AppFramework/App.php”,“line”:172,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”,“args”:[{“class”:“OCA\Settings\Controller\AppSettingsController”},“listApps”]},{“file”:“/home/asasuste/files/lib/private/Route/Router.php”,“line”:298,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:“::”,“args”:[“OCA\Settings\Controller\AppSettingsController”,“listApps”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},[“settings.AppSettings.listApps”]]},{“file”:“/home/asasuste/files/lib/base.php”,“line”:1047,“function”:“match”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“/settings/apps/list”]},{“file”:“/home/asasuste/files/index.php”,“line”:36,“function”:“handleRequest”,“class”:“OC”,“type”:“::”,“args”:}],“File”:“/home/asasuste/files/lib/private/AppFramework/Http/Dispatcher.php”,“Line”:165,“Previous”:{“Exception”:“TypeError”,“Message”:“Argument 1 passed to OC\App\PlatformRepository::normalizeVersion() must be of the type string, null given, called in /home/asasuste/files/lib/private/App/PlatformRepository.php on line 53”,“Code”:0,“Trace”:[{“file”:“/home/asasuste/files/lib/private/App/PlatformRepository.php”,“line”:53,“function”:“normalizeVersion”,“class”:“OC\App\PlatformRepository”,“type”:“->”,“args”:[null]},{“file”:“/home/asasuste/files/lib/private/App/PlatformRepository.php”,“line”:37,“function”:“initialize”,“class”:“OC\App\PlatformRepository”,“type”:“->”,“args”:},{“file”:“/home/asasuste/files/lib/private/App/Platform.php”,“line”:79,“function”:“__construct”,“class”:“OC\App\PlatformRepository”,“type”:“->”,“args”:},{“file”:“/home/asasuste/files/lib/private/App/DependencyAnalyzer.php”,“line”:276,“function”:“getLibraryVersion”,“class”:“OC\App\Platform”,“type”:“->”,“args”:[“ldap”]},{“file”:“/home/asasuste/files/lib/private/App/DependencyAnalyzer.php”,“line”:70,“function”:“analyzeLibraries”,“class”:“OC\App\DependencyAnalyzer”,“type”:“->”,“args”:[[“ldap”,[[“25”,“25”]]]]},{“file”:“/home/asasuste/files/apps/settings/lib/Controller/AppSettingsController.php”,“line”:285,“function”:“analyze”,“class”:“OC\App\DependencyAnalyzer”,“type”:“->”,“args”:[“*** sensitive parameters replaced “,false]},{“function”:“OCA\Settings\Controller\{closure}”,“class”:“OCA\Settings\Controller\AppSettingsController”,“type”:”->“,“args”:[” sensitive parameters replaced ***”]},{“file”:“/home/asasuste/files/apps/settings/lib/Controller/AppSettingsController.php”,“line”:251,“function”:“array_map”,“args”:[{“class”:“Closure”},[[“bruteforcesettings”,“Brute-force settings”,“Brute Force Protection is meant to protect Nextcloud servers from attempts to\nguess user passwords in various ways. Besides the obvious "let’s try a big\nlist of commonly used passwords" attack, it also makes it harder to use\nslightly more sophisticated attacks via the reset password form or trying to\nfind app password tokens.\n\nIf triggered, brute force protection makes requests coming from an IP on a\nbruteforce protected controller with the same API slower for a 24 hour period.\n\nWith this app, the admin can exempt an IP address or range from this\nprotection which can be useful for testing purposes or when there are false\npositives due to a lot of users on one IP address.”,“Whitelist IPs”,[“agpl”],“And 40 more entries, set log level to debug to see all entries”],[“nextcloud_announcements”,“Nextcloud announcements”,“Nextcloud announcements brings the latest news of Nextcloud into your notifications”,“Nextcloud announcements brings the latest news of Nextcloud into your notifications”,“1.14.0”,“And 27 more entries, set log level to debug to see all entries”],[“survey_client”,“Usage survey”,“Sends anonymized data to Nextcloud to help us to improve Nextcloud.”,“Sends anonymized data to Nextcloud to help us to improve Nextcloud. You\n\t\talways have full control over the content sent to Nextcloud and can disable\n\t\tit again at any time.”,“1.13.0”,“And 26 more entries, set log level to debug to see all entries”],[“notifications”,“Notifications”,“This app provides a backend and frontend for the notification API available in Nextcloud.”,“This app provides a backend and frontend for the notification API available in Nextcloud.\n\t\tThe API is used by other apps to notify users in the web UI and sync clients about various things. Some examples are:\n\n\ud83d\udcec Federated file sharing: You received a new remote share\n\n\ud83d\udcd1 Comments: Another user mentioned you in a comment on a file\n\n\ud83d\udea2 Update notification: Available update for an app or nextcloud itself\n\n\ud83d\udce3 Announcement center: An announcement was posted by an admin”,“2.13.1”,“And 26 more entries, set log level to debug to see all entries”],[“user_ldap”,“LDAP user and group backend”,“This application enables administrators to connect Nextcloud to an LDAP-based user directory.”,“This application enables administrators to connect Nextcloud to an LDAP-based user directory for authentication and provisioning users, groups and user attributes. Admins can configure this application to connect to one or more LDAP directories or Active Directories via an LDAP interface. Attributes such as user quota, email, avatar pictures, group memberships and more can be pulled into Nextcloud from a directory with the appropriate queries and filters.\n\nA user logs into Nextcloud with their LDAP or AD credentials, and is granted access based on an authentication request handled by the LDAP or AD server. Nextcloud does not store LDAP or AD passwords, rather these credentials are used to authenticate a user and then Nextcloud uses a session for the user ID. More information is available in the LDAP User and Group Backend documentation.”,“1.15.0”,“And 26 more entries, set log level to debug to see all entries”],“And 367 more entries, set log level to debug to see all entries”]]},{“file”:“/home/asasuste/files/lib/private/AppFramework/Http/Dispatcher.php”,“line”:225,“function”:“listApps”,“class”:“OCA\Settings\Controller\AppSettingsController”,“type”:“->”,“args”:},{“file”:“/home/asasuste/files/lib/private/AppFramework/Http/Dispatcher.php”,“line”:133,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”,“args”:[{“class”:“OCA\Settings\Controller\AppSettingsController”},“listApps”]},{“file”:“/home/asasuste/files/lib/private/AppFramework/App.php”,“line”:172,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”,“args”:[{“class”:“OCA\Settings\Controller\AppSettingsController”},“listApps”]},{“file”:“/home/asasuste/files/lib/private/Route/Router.php”,“line”:298,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:“::”,“args”:[“OCA\Settings\Controller\AppSettingsController”,“listApps”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},[“settings.AppSettings.listApps”]]},{“file”:“/home/asasuste/files/lib/base.php”,“line”:1047,“function”:“match”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“/settings/apps/list”]},{“file”:“/home/asasuste/files/index.php”,“line”:36,“function”:“handleRequest”,“class”:“OC”,“type”:“::”,“args”:}],“File”:“/home/asasuste/files/lib/private/App/PlatformRepository.php”,“Line”:148},“CustomMessage”:“–”}}

Is this the first time you’ve seen this error? (Y/N): YES

Steps to replicate it:

  1. Update my version of nextcloud

To add on that bug: just made a fresh install from the web installer, exact same exception happenning.

So, alternative steps to replicate:

  1. Properly finish a fresh install from the web installer

Did test that on PHP 7.4, 8.0 and 8.1, all configured with required modules.

Hi friend i have the same error whit new installation, here add some screen shot

Had the same problem, app page not accessible…

Solution

Change PlatformRepository.php line 148

from

public function normalizeVersion(string $version, ?string $fullVersion = null): string {

to

public function normalizeVersion($version, $fullVersion = null) {

1 Like

WOW fríend, this works, really fix the error, maybe some setence is bad

Fixed it for me, too. Thanks !
For others reading this, the full path is /lib/private/app/PlatformRepository.php

very well, fixed in the line 147 in /lib/private/app/PlatformRepository.php. Thanks verry much

This is only a temporary solution.

A fix for this is posted on Github

The file will be updated 25.0.2

See this post if you like to implement it now