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]: Applications menu empty after fresh install of Nextcloud Server v25 #34716

Closed
6 of 9 tasks
Tracked by #1280
Nyalnara opened this issue Oct 21, 2022 · 12 comments · Fixed by #34937
Closed
6 of 9 tasks
Tracked by #1280

[Bug]: Applications menu empty after fresh install of Nextcloud Server v25 #34716

Nyalnara opened this issue Oct 21, 2022 · 12 comments · Fixed by #34937
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug high

Comments

@Nyalnara
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

After fresh install of Nextcloud Server 25, "Applications" page does not load properly. Log page shows the following error:

[index] Erreur: Exception: OC\App\PlatformRepository::normalizeVersion(): Argument #1 ($version) must be of type string, null given, called in /home/qamydtds/drive/lib/private/App/PlatformRepository.php on line 53 in file '/home/qamydtds/drive/lib/private/App/PlatformRepository.php' line 148 at <>

  1. /home/qamydtds/drive/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
  2. /home/qamydtds/drive/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
  3. /home/qamydtds/drive/lib/base.php line 1047
    OC\Route\Router->match()
  4. /home/qamydtds/drive/index.php line 36
    OC::handleRequest()

GET /index.php/settings/apps/list
from 81.251.75.201 by ******************** at 2022-10-21T01:57:46+00:00

Seems to be a problem with the way the exception is handled in the following code:

			$ext = new \ReflectionExtension($name);
			try {
				$prettyVersion = $ext->getVersion();
				$prettyVersion = $this->normalizeVersion($prettyVersion);
			} catch (\UnexpectedValueException $e) {
				$prettyVersion = '0';
				$prettyVersion = $this->normalizeVersion($prettyVersion);
			}

Steps to reproduce

  1. Do a fresh install using the web installer
  2. Go the the "Applications" page

Expected behavior

Applications page should load list of installed apps.

Installation method

Community Web installer on a VPS or web space

Operating system

Other

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MariaDB

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

Fresh Nextcloud Server install

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": [
            "drive.brassbanddulaonnois.fr"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.0.18",
        "overwrite.cli.url": "https:\/\/drive.brassbanddulaonnois.fr",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "FR"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.0
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - text: 3.6.0
  - theming: 2.0.0
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - encryption
  - files_external
  - suspicious_login
  - twofactor_totp
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"Y1IGzjFupGkiWxMNgsXoGQAAUQo","level":3,"time":"2022-10-21T02:41:19+00:00","remoteAddr":"81.251.75.201","user":"Mathieu Desmidt","app":"index","method":"GET","url":"/index.php/settings/apps/list","message":"OC\\App\\PlatformRepository::normalizeVersion(): Argument #1 ($version) must be of type string, null given, called in /home/qamydtds/drive/lib/private/App/PlatformRepository.php on line 53 in file '/home/qamydtds/drive/lib/private/App/PlatformRepository.php' line 148","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:105.0) Gecko/20100101 Firefox/105.0","version":"25.0.0.18","exception":{"Exception":"Exception","Message":"OC\\App\\PlatformRepository::normalizeVersion(): Argument #1 ($version) must be of type string, null given, called in /home/qamydtds/drive/lib/private/App/PlatformRepository.php on line 53 in file '/home/qamydtds/drive/lib/private/App/PlatformRepository.php' line 148","Code":0,"Trace":[{"file":"/home/qamydtds/drive/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/qamydtds/drive/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/qamydtds/drive/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/qamydtds/drive/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/qamydtds/drive/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"TypeError","Message":"OC\\App\\PlatformRepository::normalizeVersion(): Argument #1 ($version) must be of type string, null given, called in /home/qamydtds/drive/lib/private/App/PlatformRepository.php on line 53","Code":0,"Trace":[{"file":"/home/qamydtds/drive/lib/private/App/PlatformRepository.php","line":53,"function":"normalizeVersion","class":"OC\\App\\PlatformRepository","type":"->"},{"file":"/home/qamydtds/drive/lib/private/App/PlatformRepository.php","line":37,"function":"initialize","class":"OC\\App\\PlatformRepository","type":"->"},{"file":"/home/qamydtds/drive/lib/private/App/Platform.php","line":79,"function":"__construct","class":"OC\\App\\PlatformRepository","type":"->"},{"file":"/home/qamydtds/drive/lib/private/App/DependencyAnalyzer.php","line":276,"function":"getLibraryVersion","class":"OC\\App\\Platform","type":"->"},{"file":"/home/qamydtds/drive/lib/private/App/DependencyAnalyzer.php","line":70,"function":"analyzeLibraries","class":"OC\\App\\DependencyAnalyzer","type":"->"},{"file":"/home/qamydtds/drive/apps/settings/lib/Controller/AppSettingsController.php","line":285,"function":"analyze","class":"OC\\App\\DependencyAnalyzer","type":"->"},{"function":"OCA\\Settings\\Controller\\{closure}","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/qamydtds/drive/apps/settings/lib/Controller/AppSettingsController.php","line":251,"function":"array_map"},{"file":"/home/qamydtds/drive/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"listApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/home/qamydtds/drive/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/qamydtds/drive/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/qamydtds/drive/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/qamydtds/drive/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/qamydtds/drive/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/qamydtds/drive/lib/private/App/PlatformRepository.php","Line":148},"CustomMessage":"--"}}

Additional info

Just going to mention that the error was reproducible with php 7.4 and 8.1 too.

@Nyalnara Nyalnara added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 21, 2022
@Nyalnara
Copy link
Author

It is likely a duplicate of issue #34690, just encountered from different steps. Probably easier to reproduce with those listed here though.

@tflidd
Copy link
Contributor

tflidd commented Oct 24, 2022

There was a suggestion for a fix on the forum (probably just a dirty workaround by disabling type hints):
https://help.nextcloud.com/t/apps-page-error-after-update-to-25/148083

@Skatox
Copy link

Skatox commented Oct 25, 2022

I'm having the same problem. I disabled types in the method's arguments and works.

@PVince81
Copy link
Member

@come-nc can you have a look ?

@come-nc
Copy link
Contributor

come-nc commented Nov 3, 2022

I'm having the same problem. I disabled types in the method's arguments and works.

Hello @Skatox
Since you seem comfortable with modifying source files, could you try https://github.com/nextcloud/server/pull/34937/files and confirm it fixes the problem?

@Nyalnara
Copy link
Author

Nyalnara commented Nov 3, 2022

Just reinstalled on my dev-env (because the one where I originally had the problem needed to work so installed a 24), web installer now pull version 25.0.1 which doesn't encounter the problem.
Will see about installing 25.0.0 from archive to reproduce and give feedback on pull linked above this week-end.

@ghost
Copy link

ghost commented Nov 5, 2022

Upgraded from 24.0.7 to 25.0.1 = same issue

@come-nc
Copy link
Contributor

come-nc commented Nov 7, 2022

This depends on which PHP extensions are installed/active, as it crashes when a PHP extension have no version.
I do not know which extension does that, I only know it’s one that we do not use in our testing :-)

The PR #34937 should fix it.

@ghost
Copy link

ghost commented Nov 7, 2022

Yes, perfect 👍

@Skatox
Copy link

Skatox commented Nov 13, 2022

I'm having the same problem. I disabled types in the method's arguments and works.

Hello @Skatox Since you seem comfortable with modifying source files, could you try https://github.com/nextcloud/server/pull/34937/files and confirm it fixes the problem?

Hello I found out that the application with the problem is litespeed. I print the variable $name before calling the normalizeVersion method and fails with that app. I don't remember installing it but my server is running under a litespeed server.

@szaimen
Copy link
Contributor

szaimen commented Nov 13, 2022

This will get fixed with 25.0.2

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 25-feedback bug high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@Skatox @PVince81 @Nyalnara @tflidd @szaimen @come-nc and others