nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.71k stars 4k forks source link

Error: Undefined index - Unified search spams nextcloud log #24894

Closed ggeorgg closed 3 years ago

ggeorgg commented 3 years ago

Steps to reproduce

  1. Open Nextcloud UI
  2. Press "strg + f"
  3. Type something to search for

Expected behaviour

No errors are logged.

Actual behaviour

Nextcloud log is spammed mulitple time with the same error message.

Server configuration detail

Operating system: Linux 5.3.18-lp152.57-default #1 SMP Fri Dec 4 07:27:58 UTC 2020 (7be5551) x86_64

Webserver: nginx/1.16.1 (fpm-fcgi)

Database: mysql 10.4.14

PHP version:

7.4.6 Modules loaded: Core, date, libxml, pcre, filter, hash, Reflection, SPL, session, SimpleXML, standard, xml, mysqlnd, cgi-fcgi, pdlib, apcu, bcmath, bz2, ctype, curl, dom, mbstring, fileinfo, gd, gettext, gmp, iconv, imagick, intl, json, exif, mysqli, openssl, pcntl, PDO, pdo_mysql, pdo_sqlite, posix, redis, sqlite3, tokenizer, xmlreader, xmlwriter, zip, zlib, Zend OPcache

Nextcloud version: 20.0.4 - 20.0.4.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated from older version

Where did you install Nextcloud from: zip file

Signing status
List of activated apps ``` Enabled: - accessibility: 1.6.0 - activity: 2.13.4 - bookmarks: 4.0.5 - calendar: 2.1.2 - caniupdate: 0.2.0 - cloud_federation_api: 1.3.0 - comments: 1.10.0 - contacts: 3.4.2 - contactsinteraction: 1.1.0 - dashboard: 7.0.0 - dav: 1.16.2 - documentserver_community: 0.1.8 - facerecognition: 0.7.2 - federatedfilesharing: 1.10.2 - federation: 1.10.1 - files: 1.15.0 - files_external: 1.11.1 - files_pdfviewer: 2.0.1 - files_rightclick: 0.17.0 - files_sharing: 1.12.1 - files_trashbin: 1.10.1 - files_versions: 1.13.0 - files_videoplayer: 1.9.0 - firstrunwizard: 2.9.0 - groupfolders: 8.2.0 - impersonate: 1.7.0 - issuetemplate: 0.7.0 - keeweb: 0.6.4 - logreader: 2.5.0 - lookup_server_connector: 1.8.0 - maps: 0.1.8 - metadata: 0.12.0 - nextcloud_announcements: 1.9.0 - notifications: 2.8.0 - oauth2: 1.8.0 - password_policy: 1.10.1 - phonetrack: 0.6.5 - photos: 1.2.1 - polls: 1.6.2 - previewgenerator: 3.1.0 - privacy: 1.4.0 - provisioning_api: 1.10.0 - ransomware_protection: 1.8.0 - recommendations: 0.8.0 - serverinfo: 1.10.0 - settings: 1.2.0 - sharebymail: 1.10.0 - spreed: 10.0.4 - support: 1.3.0 - survey_client: 1.8.0 - systemtags: 1.10.0 - tasks: 0.13.6 - text: 3.1.0 - theming: 1.11.0 - twofactor_backupcodes: 1.9.0 - twofactor_totp: 5.0.0 - twofactor_u2f: 6.0.0 - updatenotification: 1.10.0 - user_external: 1.0.0 - user_status: 1.0.1 - viewer: 1.4.0 - weather_status: 1.0.0 - workflowengine: 2.2.0 Disabled: - admin_audit - bruteforcesettings - cookbook - encryption - gpgmailer - mail - news - onlyoffice - ransomware_detection - richdocuments - richdocumentscode - user_ldap ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "***REMOVED SENSITIVE VALUE***", "192.168.179.31" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "20.0.4.0", "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\APCu", "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 1.5, "password": "***REMOVED SENSITIVE VALUE***" }, "logtimezone": "Europe\/Berlin", "default_language": "de_DE", "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Movie", "OC\\Preview\\MKV", "OC\\Preview\\MP4", "OC\\Preview\\AVI", "OC\\Preview\\OpenDocument", "OC\\Preview\\PDF", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\PDF", "OC\\Preview\\Image", "OC\\Preview\\Photoshop", "OC\\Preview\\TIFF", "OC\\Preview\\SVG", "OC\\Preview\\Font" ], "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "maintenance": false, "theme": "", "loglevel": 2, "default_locale": "de", "app_install_overwrite": [ "ransomware_detection", "caniupdate", "issuetemplate", "keeweb", "cookbook" ], "auth.bruteforce.protection.enabled": false, "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_sendmailmode": "smtp", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "tls", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "updater.release.channel": "stable", "share_folder": "\/Mit mir geteilt" } ```

Are you using external storage, if yes which one: No

Are you using encryption:

Are you using an external user-backend, if yes which one: Webdav

Client configuration

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

Operating system: Windows 10

Logs

Web server error log ``` ```
Nextcloud log ``` {"reqId":"EjHLJT6AeRzF2Rs386G9","level":3,"time":"2020-12-29T22:48:55+01:00","remoteAddr":"XX.XXX.XX.XX","user":"georg","app":"PHP","method":"GET","url":"/nextcloud/ocs/v2.php/search/providers/tasks/search?term=comments&from=%2Fnextcloud%2Fsettings%2Fapps","message":{"Exception":"Error","Message":"Undefined index: {http://owncloud.org/ns}owner-principal at /srv/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php#1792","Code":0,"Trace":[{"file":"/srv/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1792,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/srv/www/nextcloud/apps/dav/lib/Search/TasksSearchProvider.php","line":108,"function":"searchPrincipalUri","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Search/SearchComposer.php","line":162,"function":"search","class":"OCA\\DAV\\Search\\TasksSearchProvider","type":"->"},{"file":"/srv/www/nextcloud/core/Controller/UnifiedSearchController.php","line":110,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/ocs/v1.php","line":88,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/ocs/v2.php","line":24,"args":["/srv/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","version":"20.0.4.0","id":"5feba44e5add1"} ```
Browser log
skjnldsv commented 3 years ago
{
  "reqId": "EjHLJT6AeRzF2Rs386G9",
  "level": 3,
  "time": "2020-12-29T22:48:55+01:00",
  "remoteAddr": "XX.XXX.XX.XX",
  "user": "georg",
  "app": "PHP",
  "method": "GET",
  "url": "/nextcloud/ocs/v2.php/search/providers/tasks/search?term=comments&from=%2Fnextcloud%2Fsettings%2Fapps",
  "message": {
    "Exception": "Error",
    "Message": "Undefined index: {http://owncloud.org/ns}owner-principal at /srv/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php#1792",
    "Code": 0,
    "Trace": [
      {
        "file": "/srv/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
        "line": 1792,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::"
      },
      {
        "file": "/srv/www/nextcloud/apps/dav/lib/Search/TasksSearchProvider.php",
        "line": 108,
        "function": "searchPrincipalUri",
        "class": "OCA\\DAV\\CalDAV\\CalDavBackend",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/lib/private/Search/SearchComposer.php",
        "line": 162,
        "function": "search",
        "class": "OCA\\DAV\\Search\\TasksSearchProvider",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/core/Controller/UnifiedSearchController.php",
        "line": 110,
        "function": "search",
        "class": "OC\\Search\\SearchComposer",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 169,
        "function": "search",
        "class": "OC\\Core\\Controller\\UnifiedSearchController",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 100,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 152,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/lib/private/Route/Router.php",
        "line": 308,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/srv/www/nextcloud/ocs/v1.php",
        "line": 88,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/srv/www/nextcloud/ocs/v2.php",
        "line": 24,
        "args": [
          "/srv/www/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/srv/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "20.0.4.0",
  "id": "5feba44e5add1"
}