Skip to content

AppConfig Constructor type mismatch causes crash (expects OCP\IAppConfig, OC\AllConfig given) #383

Description

@audioanton

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Update nextcloud to 33.0.5, community document server to 0.2.4, Only Office to 10.1.2

Expected behaviour

Community document server boots.

Actual behaviour

Constructor signature mismatch causes community document server to crash.
TypeError: OCA\Onlyoffice\AppConfig::__construct(): Argument #2 ($appConfig) must be of type OCP\IAppConfig, OC\AllConfig given, called in .../apps/documentserver_community/lib/AppInfo/Application.php on line 78 Could not boot documentserver_community

Server configuration

Web server: Apache

Database: MySQL

PHP version: 8.3

Nextcloud version: 33.0.5

List of activated apps
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

OUTPUT:
Enabled:
  - activity: 6.0.0
  - bruteforcesettings: 6.0.0
  - calendar: 6.5.0
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contactsinteraction: 1.14.1
  - dav: 1.36.0
  - deck: 1.17.3
  - federatedfilesharing: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0
  - files_pdfviewer: 6.0.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - fileslibreofficeedit: 2.0.1
  - forms: 5.3.2
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud_announcements: 5.0.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0
  - photos: 6.0.0
  - privacy: 5.0.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0
  - related_resources: 4.0.0
  - serverinfo: 5.0.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - side_menu: 5.3.0
  - support: 5.0.0
  - survey_client: 5.0.0
  - text: 7.0.1
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - workflowengine: 2.15.0
Disabled:
  - admin_audit: 1.23.0
  - app_api: 33.0.0 (installed 32.0.0)
  - dashboard: 7.13.0 (installed 7.11.0)
  - documentserver_community: 0.2.4 (installed 0.2.4) REPORTERS NOTE: this failed while enabled, I disabled to stop log being flooded by the same exception
  - encryption: 2.21.0
  - federation: 1.23.0 (installed 1.21.0)
  - files_external: 1.25.1
  - firstrunwizard: 6.0.0 (installed 4.0.0)
  - onlyoffice: 10.1.2 (installed 10.1.2) REPORTERS NOTE: this failed while enabled, I disabled to stop log being flooded by the same exception
  - richdocuments: 10.2.0 (installed 10.2.0)
  - richdocumentscode: 26.4.104 (installed 26.4.104)
  - suspicious_login: 11.0.0
  - systemtags: 1.23.0 (installed 1.23.0)
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Nextcloud configuration

Running nextcloud v.33.0.5 without docker on oderland web hosting.

OUTPUT:

NOTE: I removed a lot of json keys that was censored due to being sensitive "***REMOVED SENSITIVE VALUE***" and kept what seemed relevant.
{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.5.1",
        "dbport": "",
        "dbtableprefix": "oc_",
        "installed": true,
        "mysql.utf8mb4": true,
        "app_install_overwrite": [],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "maintenance_window_start": 1,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "default_phone_region": "SE",
        "allow_local_remote_servers": true
    }
}

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

Browser

Browser name: Firefox/Chrome/Safari/…

Browser version: 124/125/…

Operating system: Windows/Ubuntu/Mac/…

Browser log
Nextcloud Log:
(Repeated every second)
TypeError: OCA\Onlyoffice\AppConfig::__construct(): Argument #2 ($appConfig) must be of type OCP\IAppConfig, OC\AllConfig given, called in .../apps/documentserver_community/lib/AppInfo/Application.php on line 78
Could not boot documentserver_community

Analysis

documentserver_community constructs OCA\Onlyoffice\AppConfig directly in Application.php (line 78). The installed connector (10.1.2) declares argument #2 of that constructor as OCP\IAppConfig, but the document server passes OC\AllConfig, so boot fails.

Question

Could Application.php be updated to pass an OCP\IAppConfig instance (or otherwise match the connector 10.x constructor) so 0.2.4 pairs correctly with the current connector on NC33? Happy to test a patch or provide more logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions