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]: Cannot obtain the list of apps #42042

Closed
4 of 8 tasks
ostasevych opened this issue Dec 5, 2023 · 8 comments · Fixed by #42044
Closed
4 of 8 tasks

[Bug]: Cannot obtain the list of apps #42042

ostasevych opened this issue Dec 5, 2023 · 8 comments · Fixed by #42044
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@ostasevych
Copy link

ostasevych commented Dec 5, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

Today I found that the lists of apps is empty: none of categories is shown. There are errors in the log file, see below.

Steps to reproduce

  1. Proceed at /settings/apps
  2. Observe empty area

Expected behavior

There should be lists of apps

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

27

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?

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Signing status

No response

Nextcloud Logs

[PHP] Error: Undefined array key "en" at /var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php#373

GET /settings/apps/list

[PHP] Error: Undefined array key "en" at /var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php#374

GET /settings/apps/list

[PHP] Error: Undefined array key "en" at /var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php#375

GET /settings/apps/list

[PHP] Error: Trying to access array offset on value of type null at /var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php#375

GET /settings/apps/list

Additional info

No response

@ostasevych ostasevych added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 5, 2023
@harddrive67
Copy link

Same here with Nextcloud 6 (27.1.3) via snap

@stondino00
Copy link

stondino00 commented Dec 5, 2023

Same here on snap 27.1.4.

@ostasevych
Copy link
Author

ostasevych commented Dec 5, 2023

Same here on snap 27.1.4.

That is strange, as yesterday it worked fine. The only page displayed is App Bundles /settings/apps/app-bundles.
The rest are just empty.

CLI occ app:list is working fine.

@harddrive67
Copy link

Same here on snap 27.1.4.

That is strange, as yesterday it worked fine. The only page displayed is App Bundles /settings/apps/app-bundles. The rest are just empty.

CLI app:list is working fine.

this worked 4 hours ago :D
CLI is working, yes

@ostasevych
Copy link
Author

ostasevych commented Dec 5, 2023

May that be resulted by the app API at apps.nextcloud.com?

UPD: Probably it is. Place this config line to your config.php

'has_internet_connection' => false,

and you will see your apps, though you will not be able to install other apps from the appstore, and the categories will disappear.

@mschmitt
Copy link

mschmitt commented Dec 5, 2023

Same error here. PHP installer, version 27.1.4.

Server configuration detail

Operating system: Linux 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64

Webserver: Apache (apache2handler)

Database: mysql 10.11.4

PHP version: 8.2.7

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 27.1.4 - 27.1.4.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

[]

List of activated apps
Enabled:
 - activity: 2.19.0
 - bruteforcesettings: 2.7.0
 - calendar: 4.6.0
 - circles: 27.0.1
 - cloud_federation_api: 1.10.0
 - comments: 1.17.0
 - contacts: 5.4.2
 - dashboard: 7.7.0
 - dav: 1.27.0
 - deck: 1.11.2
 - federatedfilesharing: 1.17.0
 - federation: 1.17.0
 - files: 1.22.0
 - files_pdfviewer: 2.8.0
 - files_reminders: 1.0.0
 - files_rightclick: 1.6.0
 - files_sharing: 1.19.0
 - files_trashbin: 1.17.0
 - files_versions: 1.20.0
 - firstrunwizard: 2.16.0
 - integration_dropbox: 2.1.0
 - integration_github: 2.0.6
 - logreader: 2.12.0
 - lookup_server_connector: 1.15.0
 - mail: 3.4.5
 - nextcloud_announcements: 1.16.0
 - notes: 4.8.1
 - notifications: 2.15.0
 - oauth2: 1.15.1
 - password_policy: 1.17.0
 - photos: 2.3.0
 - privacy: 1.11.0
 - provisioning_api: 1.17.0
 - recommendations: 1.6.0
 - related_resources: 1.2.0
 - richdocuments: 8.2.3
 - richdocumentscode: 23.5.602
 - serverinfo: 1.17.0
 - settings: 1.9.0
 - sharebymail: 1.17.0
 - spreed: 17.1.3
 - support: 1.10.0
 - survey_client: 1.15.0
 - systemtags: 1.17.0
 - text: 3.8.0
 - theming: 2.2.0
 - twofactor_backupcodes: 1.16.0
 - updatenotification: 1.17.0
 - user_status: 1.7.0
 - viewer: 2.1.0
 - weather_status: 1.7.0
 - workflowengine: 2.9.0
Disabled:
 - admin_audit
 - contactsinteraction: 1.8.0
 - encryption
 - files_external
 - integration_mastodon: 2.0.3
 - llm: 1.2.1
 - news: 24.0.0
 - suspicious_login
 - twofactor_totp
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nextcloud.***.de"
    ],
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": true,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "27.1.4.1",
    "overwrite.cli.url": "https:\/\/nextcloud.***.de",
    "htaccess.RewriteBase": "\/",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "default_phone_region": "DE",
    "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_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "theme": "",
    "loglevel": 2
}

Cron Configuration: Array
(
[backgroundjobs_mode] => cron
[lastcron] => 1701798580
)

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database

Talk configuration:

STUN servers

  • no custom server configured

TURN servers

  • no custom server configured

Signaling servers (mode: default):

  • no custom server configured

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0

@joshtrichards
Copy link
Member

Duplicate of #42037

Please subscribe/monitor there (and also only use a thumbs up 👍 (there) rather than commenting unless you have useful information to add. Thanks!

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@1manprojects
Copy link
Contributor

I'm having the same Problem and i think i found the problem.
There appears to be a bug in the AppSettingsController.php

Starting from line 357 the currentVersion is being set, however in the else block as seen in the code snippet below the currentLanguage is being overwritten by the version number. This will set the currentLanguage to a version string like 0.7.2 thus the code below it will use the wrong variable as the language. This will cause the expected behaviour and the Apps are no longer shown in the App overview.

			$currentVersion = '';
			if ($this->appManager->isInstalled($app['id'])) {
				$currentVersion = $this->appManager->getAppVersion($app['id']);
			} else {
				$currentLanguage = $app['releases'][0]['version'];
			}

			$formattedApps[] = [
				'id' => $app['id'],
				'name' => $app['translations'][$currentLanguage]['name'] ?? $app['translations']['en']['name'],
				'description' => $app['translations'][$currentLanguage]['description'] ?? $app['translations']['en']['description'],
				'summary' => $app['translations'][$currentLanguage]['summary'] ?? $app['translations']['en']['summary'],
				'license' => $app['releases'][0]['licenses'],
				'author' => $authors,
				'shipped' => false,
				'version' => $currentVersion,
				'default_enable' => '',
				'types' => [],

The Fix is quite simple replace currentLanguage in Line 371 with currentVersion.

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

Successfully merging a pull request may close this issue.

6 participants