Skip to content

[Bug]: Unable to update configuration: conflict between new type (mixed) and old type (array)  #47898

Open
@boxinegmbh

Description

⚠️ This issue respects the following points: ⚠️

Bug description

I have normally made configuration changes on nextcloud via the occ config:import command i.e.
sudo -u www-data php occ config:import config.json
However after upgrading from 29.0.0 and above, the command keeps failing with the following error

In AppConfig.php line 823:
                                                          
  conflict between new type (mixed) and old type (array)  
                                                          

config:import [<file>]

At first the issue looked similar to this but it did not get fixed by upgrading to the latest version.
I am currently running 29.0.6
I also attempted to debug the issue by exporting the current configuration and re-importing it i.e.

sudo -u www-data php occ config:list > /tmp/config_all.json
sudo -u www-data php occ config:import /tmp/config_all.json

This produced un-ending value type errors like:

Invalid app config value for "core":"files_metadata". Only integers, strings and null (delete) are allowed.
Invalid app config value for "core":"metadataGenerationDone". Only integers, strings and null (delete) are allowed.

Based on some comments on the Nextcloud forum, using the config:import command was mentioned as deprecated but could not find it explicitly mentioned in the release notes.
Any help would be much appreciated

Steps to reproduce

1.Define configuration in a json file and grant necessary permissions
2. Go to the the nextcloud config directory
3.Try to import your configuration as defined in the json file using the occ command

Expected behavior

I was trying to persist preview_* configuration settings since preview_max_(y/x) defaults to null. wanted to set this at 2048
Adding the preview setting to my configuration file and running the command should be sufficient

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

PostgreSQL

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

Updated from a MINOR version (ex. 28.0.1 to 28.0.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

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "29.0.6.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "log_type": "file",
        "loglevel": 0,
        "logdateformat": "F d, Y H:i:s",
        "maintenance": false,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpauth": "0",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "ldapUserCleanupInterval": "51"
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - checksum: 1.2.4
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - event_update_notification: 2.4.0
  - federatedfilesharing: 1.19.0
  - files: 2.1.1
  - files_accesscontrol: 1.19.1
  - files_automatedtagging: 1.19.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_retention: 1.18.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - groupfolders: 17.0.3
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - quota_warning: 1.20.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.6
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - twofactor_webauthn: 1.4.0
  - updatenotification: 1.19.1
  - user_ldap: 1.20.0
  - user_saml: 6.2.0
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.16 (installed 4.7.16)
  - circles: 29.0.0-dev (installed 24.0.0)
  - collectives: 2.14.3 (installed 2.14.3)
  - contacts: 6.0.0 (installed 6.0.0)
  - deck: 1.13.1 (installed 1.13.1)
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.13.0)
  - impersonate: 1.16.0 (installed 1.16.0)
  - metadata: 0.20.0 (installed 0.20.0)
  - notes: 4.10.1 (installed 4.10.1)
  - oidc_login: 3.1.1 (installed 3.1.1)
  - photos: 2.5.0 (installed 1.5.0)
  - richdocumentscode: 24.4.502 (installed 24.4.502)
  - sharelisting: 1.2.0 (installed 1.2.0)
  - support: 1.12.0 (installed 1.9.0)
  - suspicious_login: 7.0.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions