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]: 27.0.0.6 (27.0.0 RC3) Internal server error after upgrade : OC\\App\\AppManager::checkAppForUser(): Argument #2 ($user) must be of type ?OCP\\IUser, string given #221

Closed
6 of 9 tasks
Tracked by #2686
mate1213 opened this issue Jun 3, 2023 · 2 comments · Fixed by #227

Comments

@mate1213
Copy link

mate1213 commented Jun 3, 2023

⚠️ 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

I Upgraded my nextcloud server to 27.0.0 RC3 after that I've got Internal srver error

Steps to reproduce

  1. Upgrade Nextcloud server from 26 to 27 RC3
  2. Load the webpage
  3. Error message appears in the browser look in to log files

Expected behavior

It should load the dashboard, or any other page.

Installation method

Community Manual installation with Archive

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

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

None

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": [
            "cloud.zsolyahome.com",
            "172.16.1.89"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "HU",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.0.6",
        "overwrite.cli.url": "https:\/\/cloud.zsolyahome.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 0,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "app_install_overwrite": [
            "activitylog",
            "files_bpm",
            "spreed",
            "files_texteditor",
            "talk_simple_poll",
            "files_markdown",
            "breezedark",
            "socialsharing_facebook",
            "files_fulltextsearch_tesseract",
            "files_fulltextsearch",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "event_update_notification"
        ],
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Imaginary"
        ],
        "preview_imaginary_url": "http:\/\/172.16.1.94:5648",
        "updater.release.channel": "beta",
        "data-fingerprint": "f73dc831633a092bcdaa54861dd227fd",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - breezedark: 26.0.0
  - bruteforcesettings: 2.7.0
  - calendar: 4.4.0-rc.3
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.0-rc.3
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - end_to_end_encryption: 1.13.1-beta.1
  - event_update_notification: 2.2.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_fulltextsearch: 26.0.0
  - files_fulltextsearch_tesseract: 25.0.0
  - files_markdown: 2.4.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_texteditor: 2.15.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - fulltextsearch: 26.0.0
  - fulltextsearch_elasticsearch: 26.0.0
  - groupfolders: 15.0.0-beta2
  - integration_giphy: 1.0.6
  - integration_google: 2.0.2
  - integration_openai: 1.0.9
  - integration_reddit: 2.0.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.0
  - password_policy: 1.17.0
  - photos: 2.3.0
  - previewgenerator: 5.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - richdocuments: 8.1.0-beta.1
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - spreed: 17.0.0-rc.3
  - support: 1.10.0
  - suspicious_login: 5.0.0-rc.1
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0-rc.1
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - welcome: 1.0.9
  - workflow_pdf_converter: 1.12.0
  - workflowengine: 2.9.0
Disabled:
  - approval: 1.0.12 (installed 1.0.12)
  - camerarawpreviews: 0.8.1 (installed 0.8.1)
  - circles: 27.0.0 (installed 25.0.0)
  - encryption: 2.15.0 (installed 2.13.0)
  - integration_collaboard: 1.0.4 (installed 1.0.4)
  - survey_client: 1.15.0 (installed 1.13.0)
  - text: 3.8.0 (installed 3.3.0)
  - user_ldap: 1.17.0 (installed 1.12.0)
  - user_usage_report: 1.10.0 (installed 1.10.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
  "reqId": "rQulnV1HCFH0wcFhT5iJ",
  "level": 3,
  "time": "2023-06-03T11:27:11+00:00",
  "remoteAddr": "89.134.8.34",
  "user": "mate1213",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/dashboard/",
  "message": "OC\\App\\AppManager::checkAppForUser(): Argument nextcloud/server#2 ($user) must be of type ?OCP\\IUser, string given, called in /var/www/nextcloud/lib/private/App/AppManager.php on line 307",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0",
  "version": "27.0.0.6",
  "exception": {
    "Exception": "TypeError",
    "Message": "OC\\App\\AppManager::checkAppForUser(): Argument nextcloud/server#2 ($user) must be of type ?OCP\\IUser, string given, called in /var/www/nextcloud/lib/private/App/AppManager.php on line 307",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/App/AppManager.php",
        "line": 307,
        "function": "checkAppForUser",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/GroupFoldersService.php",
        "line": 103,
        "function": "isEnabledForUser",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "function": "__construct",
        "class": "OCA\\Files_FullTextSearch\\Service\\GroupFoldersService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 116,
        "function": "newInstanceArgs",
        "class": "ReflectionClass",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 124,
        "function": "buildClass",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 142,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 494,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 466,
        "function": "queryNoFallback",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 97,
        "function": "query",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "function": "OC\\AppFramework\\Utility\\{closure}",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 116,
        "function": "array_map"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 124,
        "function": "buildClass",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 142,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 494,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 466,
        "function": "queryNoFallback",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 97,
        "function": "query",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "function": "OC\\AppFramework\\Utility\\{closure}",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 116,
        "function": "array_map"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 124,
        "function": "buildClass",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 142,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 494,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/ServerContainer.php",
        "line": 155,
        "function": "queryNoFallback",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/ProviderService.php",
        "line": 122,
        "function": "query",
        "class": "OC\\ServerContainer",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/ProviderService.php",
        "line": 311,
        "function": "loadProvider",
        "class": "OCA\\FullTextSearch\\Service\\ProviderService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/ProviderService.php",
        "line": 282,
        "function": "loadProvidersFromList",
        "class": "OCA\\FullTextSearch\\Service\\ProviderService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/ProviderService.php",
        "line": 102,
        "function": "loadProvidersFromApp",
        "class": "OCA\\FullTextSearch\\Service\\ProviderService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/ProviderService.php",
        "line": 156,
        "function": "loadProviders",
        "class": "OCA\\FullTextSearch\\Service\\ProviderService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Capabilities.php",
        "line": 80,
        "function": "getConfiguredProviders",
        "class": "OCA\\FullTextSearch\\Service\\ProviderService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/CapabilitiesManager.php",
        "line": 74,
        "function": "getCapabilities",
        "class": "OCA\\FullTextSearch\\Capabilities",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSConfigHelper.php",
        "line": 166,
        "function": "getCapabilities",
        "class": "OC\\CapabilitiesManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
        "line": 240,
        "function": "getConfig",
        "class": "OC\\Template\\JSConfigHelper",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 182,
        "function": "__construct",
        "class": "OC\\TemplateLayout",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php",
        "line": 213,
        "function": "fetchPage",
        "class": "OC_Template",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 182,
        "function": "render",
        "class": "OCP\\AppFramework\\Http\\TemplateResponse",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1064,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/App/AppManager.php",
    "Line": 313,
    "CustomMessage": "--"
  }
}

{
  "reqId": "9bDucNgtcreYCpAHrxOt",
  "level": 3,
  "time": "2023-06-03T11:30:55+00:00",
  "remoteAddr": "89.134.8.34",
  "user": "mate1213",
  "app": "richdocuments",
  "method": "GET",
  "url": "/index.php/settings/integrity/failed",
  "message": "Failed to fetch the Collabora capabilities endpoint: Server error: `GET https://collabora.zsolyahome.com/hosting/capabilities` resulted in a `502 Bad Gateway` response:\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>open (truncated...)\n",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0",
  "version": "27.0.0.6",
  "exception": {
    "Exception": "GuzzleHttp\\Exception\\ServerException",
    "Message": "Server error: `GET https://collabora.zsolyahome.com/hosting/capabilities` resulted in a `502 Bad Gateway` response:\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>open (truncated...)\n",
    "Code": 502,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/guzzle/src/Middleware.php",
        "line": 69,
        "function": "create",
        "class": "GuzzleHttp\\Exception\\RequestException",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 204,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 153,
        "function": "callHandler",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/TaskQueue.php",
        "line": 48,
        "function": "GuzzleHttp\\Promise\\{closure}",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 248,
        "function": "run",
        "class": "GuzzleHttp\\Promise\\TaskQueue",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 224,
        "function": "invokeWaitFn",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 269,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 226,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/promises/src/Promise.php",
        "line": 62,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/guzzle/src/Client.php",
        "line": 187,
        "function": "wait",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Http/Client/Client.php",
        "line": 226,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php",
        "line": 135,
        "function": "get",
        "class": "OC\\Http\\Client\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php",
        "line": 73,
        "function": "refetch",
        "class": "OCA\\Richdocuments\\Service\\CapabilitiesService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php",
        "line": 80,
        "function": "getCapabilities",
        "class": "OCA\\Richdocuments\\Service\\CapabilitiesService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
        "line": 66,
        "function": "OCA\\Richdocuments\\AppInfo\\{closure}",
        "class": "OCA\\Richdocuments\\AppInfo\\Application",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php",
        "line": 50,
        "function": "injectFn",
        "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php",
        "line": 135,
        "function": "injectFn",
        "class": "OC\\AppFramework\\Bootstrap\\BootContext",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php",
        "line": 200,
        "function": "boot",
        "class": "OCA\\Richdocuments\\AppInfo\\Application",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/App/AppManager.php",
        "line": 437,
        "function": "bootApp",
        "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/App/AppManager.php",
        "line": 216,
        "function": "loadApp",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php",
        "line": 126,
        "function": "loadApps",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1044,
        "function": "loadApps",
        "class": "OC_App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/apps/fulltextsearch_elasticsearch/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php",
    "Line": 113,
    "message": "Failed to fetch the Collabora capabilities endpoint: Server error: `GET https://collabora.zsolyahome.com/hosting/capabilities` resulted in a `502 Bad Gateway` response:\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>open (truncated...)\n",
    "exception": {},
    "CustomMessage": "Failed to fetch the Collabora capabilities endpoint: Server error: `GET https://collabora.zsolyahome.com/hosting/capabilities` resulted in a `502 Bad Gateway` response:\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>open (truncated...)\n"
  }
}

Additional info

No response

@solracsf solracsf changed the title [Bug]: 27.0.0.6 (27.0.0 RC3) Internal server error after upgrade [Bug]: 27.0.0.6 (27.0.0 RC3) Internal server error after upgrade : OC\\App\\AppManager::checkAppForUser(): Argument #2 ($user) must be of type ?OCP\\IUser, string given Jun 3, 2023
@kesselb
Copy link

kesselb commented Jun 3, 2023

Hi @ArtificialOwl 👋

&& $appManager->isEnabledForUser('groupfolders', $userId)) {

$appManager->isEnabledForUser expects a \OCP\IUser instance or null.

@w4tzmann
Copy link

w4tzmann commented Jun 14, 2023

Maybe I have fixed this for me, be adding/ editing the GroupFoldersService.php:


use OCP\IUser;
use OCP\IUserManager;

	private $userManager;


	public function __construct(
		$userId, IDBConnection $dbConnection, IAppManager $appManager,
		IManager $shareManager,
		IGroupManager $groupManager, LocalFilesService $localFilesService,
		ConfigService $configService, MiscService $miscService,
		IUserManager $userManager, $user
	) {
		$this->userManager = $userManager;
		$user = $this->userManager->get($userId);
		if ($configService->getAppValue(ConfigService::FILES_GROUP_FOLDERS) === '1'
			&& $appManager->isEnabledForUser('groupfolders', $user)) {
			try {
				$this->folderManager = new FolderManager($dbConnection);
			} catch (Exception $e) {
				return;
			}
		}

		$this->shareManager = $shareManager;
		$this->groupManager = $groupManager;
		$this->localFilesService = $localFilesService;
		$this->configService = $configService;
		$this->miscService = $miscService;
		$this->setup('app', Application::APP_ID);
	}

Adapted from here: https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/users.html#user-session-information.

I am absolutely no PHP specialist and have only quickly put together. Maybe the approach helps someone.
Feedback on what I have just broken with it, are welcome.

The alternative is to temporarily disable the app (or maybe groupfolders) to have access to nextcloud again.:
php occ app:disable files_fulltextsearch

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

Successfully merging a pull request may close this issue.

3 participants