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

Unable to load the shares list - ShareAPIController::getDisplayNameFromAddressBook() must be of the type string, null returned #21645

Closed
tkolo opened this issue Jul 1, 2020 · 20 comments · Fixed by #22394
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug feature: sharing

Comments

@tkolo
Copy link

tkolo commented Jul 1, 2020

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. Share file to external cloud user
  2. Try to change share settings on said file

I've only tried once so the expected steps might not be exact

Expected behaviour

Shares should open

Actual behaviour

There's an exception thrown in nextcloud

Server configuration

Operating system: Ubuntu 18.04

Web server: Nginx 1.17.8

Database: PostgreSQL 12.2 (Ubuntu 12.2-2.pgdg18.04+1)

PHP version: PHP 7.4.4 (fpm-fcgi)

Nextcloud version: (see Nextcloud admin page) 19.0.0, also tried on 18.0.6

Updated from an older Nextcloud/ownCloud or fresh install: updated from 18.0.6 to 19.0.0, both show exact same behavior

Where did you install Nextcloud from: downloaded tarball from official nextcloud site

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list
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
Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.0
  - admin_audit: 1.9.0
  - admin_notifications: 1.0.2
  - calendar: 2.0.3
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.3.0
  - contactsinteraction: 1.0.0
  - dav: 1.15.0
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_pdfviewer: 1.8.0
  - files_retention: 1.8.0
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - files_videoplayer: 1.8.0
  - firstrunwizard: 2.8.0
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - nextcloud_announcements: 1.8.0
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - recommendations: 0.7.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - support: 1.2.1
  - survey_client: 1.7.0
  - systemtags: 1.9.0
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - twofactor_totp: 4.1.3
  - twofactor_u2f: 5.1.0
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - encryption
  - files_external
  - socialsharing_email
  - user_ldap

Nextcloud configuration:

Config report
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

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "*snip*"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "*snip*",
        "dbtype": "pgsql",
        "version": "19.0.0.12",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "updater.release.channel": "stable",
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "app_install_overwrite": [
            "admin_notifications",
            "twofactor_rcdevsopenotp"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    },
    "apps": {
        "accessibility": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.5.0"
        },
        "activity": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "2.12.0"
        },
        "admin_audit": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "admin_notifications": {
            "published-deprecation-notification": "yes",
            "installed_version": "1.0.2",
            "types": "logging",
            "enabled": "yes"
        },
        "backgroundjob": {
            "lastjob": "347"
        },
        "bookmarks": {
            "types": "",
            "enabled": "no",
            "installed_version": "0.17.0"
        },
        "bruteforcesettings": {
            "types": "",
            "enabled": "no",
            "installed_version": "1.3.0"
        },
        "calendar": {
            "types": "",
            "enabled": "yes",
            "installed_version": "2.0.3"
        },
        "cloud_federation_api": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "1.2.0"
        },
        "comments": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "contacts": {
            "types": "",
            "enabled": "yes",
            "installed_version": "3.3.0"
        },
        "contactsinteraction": {
            "installed_version": "1.0.0",
            "types": "dav",
            "enabled": "yes"
        },
        "core": {
            "installedat": "1489611833.3481",
            "vendor": "nextcloud",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "public_files": "files_sharing\/public.php",
            "backgroundjobs_mode": "cron",
            "shareapi_default_expire_date": "yes",
            "repairlegacystoragesdone": "yes",
            "moveavatarsdone": "yes",
            "previewsCleanedUp": "1",
            "default_encryption_module": "OC_DEFAULT_MODULE",
            "installed.bundles": "[\"CoreBundle\"]",
            "enterpriseLogoChecked": "yes",
            "scss.variables": "fd2f71d60092c27ca93f3deb9ce568cd",
            "theming.variables": "35d886836a77b200ed99db01068506d3",
            "lastupdatedat": "1593598430",
            "updater.secret.created": "1593598257",
            "lastupdateResult": "[]",
            "lastcron": "1593599080",
            "oc.integritycheck.checker": "[]"
        },
        "dav": {
            "types": "filesystem",
            "enabled": "yes",
            "buildCalendarSearchIndex": "yes",
            "installed_version": "1.15.0",
            "buildCalendarReminderIndex": "yes",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "chunks_migrated": "1"
        },
        "encryption": {
            "installed_version": "2.0.0",
            "types": "filesystem",
            "recoveryKeyId": "recoveryKey_c385678c",
            "publicShareKeyId": "pubShare_c385678c",
            "masterKeyId": "master_c385678c",
            "enabled": "no"
        },
        "federatedfilesharing": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "federation": {
            "types": "authentication",
            "enabled": "yes",
            "autoAddServers": "0",
            "installed_version": "1.9.0"
        },
        "files": {
            "types": "filesystem",
            "enabled": "yes",
            "cronjob_scan_files": "500",
            "installed_version": "1.14.0"
        },
        "files_pdfviewer": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.8.0"
        },
        "files_retention": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "1.8.0"
        },
        "files_rightclick": {
            "types": "",
            "enabled": "yes",
            "installed_version": "0.16.0"
        },
        "files_sharing": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "1.11.0"
        },
        "files_texteditor": {
            "types": "",
            "installed_version": "2.8.0",
            "enabled": "no"
        },
        "files_trashbin": {
            "enabled": "yes",
            "types": "filesystem,dav",
            "installed_version": "1.9.0"
        },
        "files_versions": {
            "enabled": "yes",
            "types": "filesystem,dav",
            "installed_version": "1.12.0"
        },
        "files_videoplayer": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.8.0"
        },
        "firstrunwizard": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "2.8.0"
        },
        "gallery": {
            "types": "",
            "installed_version": "18.4.0",
            "enabled": "no"
        },
        "logreader": {
            "types": "",
            "enabled": "yes",
            "installed_version": "2.4.0"
        },
        "lookup_server_connector": {
            "types": "authentication",
            "enabled": "yes",
            "installed_version": "1.7.0"
        },
        "mail": {
            "types": "",
            "enabled": "no",
            "installed_version": "0.11.1"
        },
        "nextcloud_announcements": {
            "types": "logging",
            "enabled": "yes",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "installed_version": "1.8.0"
        },
        "notes": {
            "types": "",
            "installed_version": "2.6.0",
            "enabled": "no"
        },
        "notifications": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "2.7.0"
        },
        "oauth2": {
            "types": "authentication",
            "enabled": "yes",
            "installed_version": "1.7.0"
        },
        "password_policy": {
            "enabled": "yes",
            "types": "authentication",
            "installed_version": "1.9.1"
        },
        "photos": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.1.0"
        },
        "privacy": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.3.0"
        },
        "provisioning_api": {
            "types": "prevent_group_restriction",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "rainloop": {
            "installed_version": "4.27.0",
            "enabled": "no",
            "types": ""
        },
        "recommendations": {
            "types": "",
            "enabled": "yes",
            "installed_version": "0.7.0"
        },
        "serverinfo": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "settings": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.1.0"
        },
        "sharebymail": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "socialsharing_email": {
            "installed_version": "2.0.0",
            "types": "",
            "enabled": "no"
        },
        "spreed": {
            "types": "prevent_group_restriction",
            "enabled": "no",
            "stun_servers": "***REMOVED SENSITIVE VALUE***",
            "installed_version": "5.0.3"
        },
        "support": {
            "enabled": "yes",
            "types": "session",
            "installed_version": "1.2.1",
            "SwitchUpdaterServerHasRun": "yes"
        },
        "survey_client": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.7.0",
            "last_sent": "1591357529",
            "last_report": "{\"id\":\"ocvqa11qsad5\",\"items\":[[\"server\",\"version\",\"18.0.5.1\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\APCu\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"none\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.4.4\"],[\"php\",\"memory_limit\",-1],[\"php\",\"max_execution_time\",0],[\"php\",\"upload_max_filesize\",2097152],[\"database\",\"type\",\"pgsql\"],[\"database\",\"version\",\"PostgreSQL 12.2 (Ubuntu 12.2-2.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit\"],[\"database\",\"size\",16794479],[\"apps\",\"rainloop\",\"disabled\"],[\"apps\",\"bookmarks\",\"disabled\"],[\"apps\",\"files_texteditor\",\"disabled\"],[\"apps\",\"workflowengine\",\"2.0.0\"],[\"apps\",\"spreed\",\"disabled\"],[\"apps\",\"logreader\",\"2.3.0\"],[\"apps\",\"tasks\",\"disabled\"],[\"apps\",\"sharebymail\",\"1.8.0\"],[\"apps\",\"notes\",\"disabled\"],[\"apps\",\"mail\",\"disabled\"],[\"apps\",\"gallery\",\"disabled\"],[\"apps\",\"password_policy\",\"1.8.0\"],[\"apps\",\"provisioning_api\",\"1.8.0\"],[\"apps\",\"survey_client\",\"1.6.0\"],[\"apps\",\"twofactor_backupcodes\",\"1.7.0\"],[\"apps\",\"federation\",\"1.8.0\"],[\"apps\",\"lookup_server_connector\",\"1.6.0\"],[\"apps\",\"files\",\"1.13.1\"],[\"apps\",\"activity\",\"2.11.0\"],[\"apps\",\"dav\",\"1.14.0\"],[\"apps\",\"files_sharing\",\"1.10.1\"],[\"apps\",\"files_trashbin\",\"1.8.0\"],[\"apps\",\"files_versions\",\"1.11.0\"],[\"apps\",\"comments\",\"1.8.0\"],[\"apps\",\"firstrunwizard\",\"2.7.0\"],[\"apps\",\"nextcloud_announcements\",\"1.7.0\"],[\"apps\",\"notifications\",\"2.6.0\"],[\"apps\",\"systemtags\",\"1.8.0\"],[\"apps\",\"theming\",\"1.9.0\"],[\"apps\",\"serverinfo\",\"1.8.0\"],[\"apps\",\"files_videoplayer\",\"1.7.0\"],[\"apps\",\"federatedfilesharing\",\"1.8.0\"],[\"apps\",\"encryption\",\"disabled\"],[\"apps\",\"cloud_federation_api\",\"1.1.0\"],[\"apps\",\"admin_audit\",\"1.8.0\"],[\"apps\",\"bruteforcesettings\",\"disabled\"],[\"apps\",\"twofactor_nextcloud_notification\",\"disabled\"],[\"apps\",\"files_retention\",\"1.7.0\"],[\"apps\",\"socialsharing_email\",\"2.0.0\"],[\"apps\",\"unsplash\",\"disabled\"],[\"apps\",\"twofactor_totp\",\"4.1.3\"],[\"apps\",\"accessibility\",\"1.4.0\"],[\"apps\",\"twofactor_u2f\",\"5.1.0\"],[\"apps\",\"text\",\"2.0.0\"],[\"apps\",\"updatenotification\",\"1.8.0\"],[\"apps\",\"oauth2\",\"1.6.0\"],[\"apps\",\"files_pdfviewer\",\"1.7.0\"],[\"apps\",\"admin_notifications\",\"1.0.2\"],[\"apps\",\"files_rightclick\",\"0.15.2\"],[\"apps\",\"privacy\",\"1.2.0\"],[\"apps\",\"recommendations\",\"0.6.0\"],[\"apps\",\"viewer\",\"1.2.0\"],[\"apps\",\"photos\",\"1.0.0\"],[\"apps\",\"settings\",\"1.0.0\"],[\"apps\",\"support\",\"1.1.1\"],[\"apps\",\"calendar\",\"2.0.3\"],[\"apps\",\"contacts\",\"3.3.0\"],[\"stats\",\"num_files\",808],[\"stats\",\"num_users\",1],[\"stats\",\"num_storages\",4],[\"stats\",\"num_storages_local\",1],[\"stats\",\"num_storages_home\",1],[\"stats\",\"num_storages_other\",2],[\"stats\",\"num_comments\",0],[\"stats\",\"num_comment_markers\",0],[\"stats\",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",1],[\"files_sharing\",\"num_shares_user\",0],[\"files_sharing\",\"num_shares_groups\",0],[\"files_sharing\",\"num_shares_link\",1],[\"files_sharing\",\"num_shares_link_no_password\",1],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"files_sharing\",\"permissions_3_1\",1],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"yes\"]]}"
        },
        "systemtags": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "1.9.0"
        },
        "tasks": {
            "types": "",
            "installed_version": "0.9.8",
            "enabled": "no"
        },
        "text": {
            "enabled": "yes",
            "types": "dav",
            "installed_version": "3.0.1"
        },
        "theming": {
            "types": "logging",
            "enabled": "yes",
            "installed_version": "1.10.0",
            "cachebuster": "9"
        },
        "twofactor_backupcodes": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.8.0"
        },
        "twofactor_nextcloud_notification": {
            "types": "",
            "enabled": "no",
            "installed_version": "1.1.1",
            "tkolosowski_enabled": "1"
        },
        "twofactor_totp": {
            "types": "",
            "enabled": "yes",
            "installed_version": "4.1.3"
        },
        "twofactor_u2f": {
            "types": "",
            "enabled": "yes",
            "installed_version": "5.1.0"
        },
        "unsplash": {
            "installed_version": "1.1.1",
            "types": "authentication",
            "enabled": "no"
        },
        "updatenotification": {
            "types": "",
            "enabled": "yes",
            "spreed": "2.0.2",
            "bookmarks": "0.12.2",
            "unsplash": "1.1.1",
            "theming": "1.4.5",
            "notes": "2.6.0",
            "twofactor_totp": "4.1.3",
            "tasks": "0.9.8",
            "files_pdfviewer": "1.2.1",
            "mail": "0.11.1",
            "bruteforcesettings": "1.3.0",
            "twofactor_u2f": "5.1.0",
            "twofactor_nextcloud_notification": "1.1.1",
            "update_check_errors": "0",
            "installed_version": "1.9.0",
            "files_retention": "1.7.1",
            "core": "18.0.6.0",
            "calendar": "2.0.3",
            "contacts": "3.3.0"
        },
        "viewer": {
            "types": "",
            "enabled": "yes",
            "installed_version": "1.3.0"
        },
        "workflowengine": {
            "types": "filesystem",
            "enabled": "yes",
            "installed_version": "2.1.0"
        }
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
none

Are you using encryption: yes/no
no, neither e2e nor full disk encryption provided by nextcloud

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
none

Client configuration

Browser:
Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

Operating system:
Arch Linux

Logs

Web server error log

Web server error log
*IP Snip* - - [01/Jul/2020:12:12:31 +0200] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=*snip*.pdf&reshares=true HTTP/2.0" 404 194 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
*IP Snip* - - [01/Jul/2020:12:12:31 +0200] "PROPFIND /remote.php/dav/systemtags-relations/files/8152 HTTP/2.0" 207 427 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
*IP Snip* - - [01/Jul/2020:12:12:31 +0200] "REPORT /remote.php/dav/comments/files/8152/ HTTP/2.0" 207 156 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
*IP Snip* - - [01/Jul/2020:12:12:31 +0200] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=*snip*.pdf&shared_with_me=true HTTP/2.0" 200 74 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"

Nextcloud log (data/nextcloud.log)

Nextcloud log
{
  "reqId": "IfrxxejW4svzrq3XrOrp",
  "level": 3,
  "time": "2020-07-01T10:12:31+00:00",
  "remoteAddr": "37.120.211.164",
  "user": "*snip*",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/apps/files_sharing/api/v1/shares?format\u003djson\u0026path\u003d*snip*.pdf\u0026reshares\u003dtrue",
  "message": {
    "Exception": "Exception",
    "Message": "Return value of OCA\\Files_Sharing\\Controller\\ShareAPIController::getDisplayNameFromAddressBook() must be of the type string, null returned",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/App.php",
        "line": 137,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "-\u003e"
      },
      {
        "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "-\u003e"
      },
      {
        "file": "/var/www/*snip*/htdocs/lib/private/Route/Router.php",
        "line": 297,
        "function": "call_user_func"
      },
      {
        "file": "/var/www/*snip*/htdocs/ocs/v1.php",
        "line": 82,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "-\u003e"
      },
      {
        "file": "/var/www/*snip*/htdocs/ocs/v2.php",
        "line": 24,
        "args": [
          "/var/www/*snip*/htdocs/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/*snip*/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 110,
    "Previous": {
      "Exception": "TypeError",
      "Message": "Return value of OCA\\Files_Sharing\\Controller\\ShareAPIController::getDisplayNameFromAddressBook() must be of the type string, null returned",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/*snip*/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
          "line": 242,
          "function": "getDisplayNameFromAddressBook",
          "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
          "line": 798,
          "function": "formatShare",
          "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
          "line": 740,
          "function": "getFormattedShares",
          "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 170,
          "function": "getShares",
          "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 100,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/App.php",
          "line": 137,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php",
          "line": 47,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "function": "__invoke",
          "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/lib/private/Route/Router.php",
          "line": 297,
          "function": "call_user_func"
        },
        {
          "file": "/var/www/*snip*/htdocs/ocs/v1.php",
          "line": 82,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/*snip*/htdocs/ocs/v2.php",
          "line": 24,
          "args": [
            "/var/www/*snip*/htdocs/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/*snip*/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
      "Line": 300
    },
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0",
  "version": "19.0.0.12"
}

Browser log

Browser log

All related network logs:

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "Firefox",
      "version": "79.0"
    },
    "browser": {
      "name": "Firefox",
      "version": "79.0"
    },
    "pages": [
      {
        "startedDateTime": "2020-07-01T12:39:23.537+02:00",
        "id": "page_2",
        "title": "Files - Nextcloud",
        "pageTimings": {
          "onContentLoad": -1,
          "onLoad": -1
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.537+02:00",
        "request": {
          "bodySize": 641,
          "method": "PROPFIND",
          "url": "https://  /remote.php/dav/files/*snip*/*snip*.pdf",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "Content-Type",
              "value": "text/plain;charset=UTF-8"
            },
            {
              "name": "Content-Length",
              "value": "641"
            },
            {
              "name": "Origin",
              "value": "https://*snip*"
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [],
          "headersSize": 854,
          "postData": {
            "mimeType": "text/plain;charset=UTF-8",
            "params": [],
            "text": "<?xml version=\"1.0\"?>\n\t\t\t<d:propfind  xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>"
          }
        },
        "response": {
          "status": 207,
          "statusText": "Multi-Status",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:23 GMT"
            },
            {
              "name": "content-type",
              "value": "application/xml; charset=utf-8"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'none';"
            },
            {
              "name": "vary",
              "value": "Brief,Prefer"
            },
            {
              "name": "dav",
              "value": "1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/xml; charset=utf-8",
            "size": 1236,
            "text": "<?xml version=\"1.0\"?>\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><d:response><d:href>/remote.php/dav/files/*snip*/*snip*.pdf</d:href><d:propstat><d:prop><d:getlastmodified>Fri, 05 Jun 2020 15:53:34 GMT</d:getlastmodified><d:getetag>&quot;c3c29d617630e13520106bc6575500b7&quot;</d:getetag><d:getcontenttype>application/pdf</d:getcontenttype><d:resourcetype/><oc:fileid>8152</oc:fileid><oc:permissions>RGDNVW</oc:permissions><oc:size>30158</oc:size><d:getcontentlength>30158</d:getcontentlength><nc:has-preview>false</nc:has-preview><nc:mount-type></nc:mount-type><x1:share-permissions xmlns:x1=\"http://open-collaboration-services.org/ns\">19</x1:share-permissions><oc:tags/><oc:favorite>0</oc:favorite><oc:comments-unread>0</oc:comments-unread><oc:owner-id>*snip*</oc:owner-id><oc:owner-display-name>Tomasz Kołosowski</oc:owner-display-name><oc:share-types><oc:share-type>6</oc:share-type></oc:share-types></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:is-encrypted/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>\n"
          },
          "redirectURL": "",
          "headersSize": 462,
          "bodySize": 1698
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 200,
          "receive": 0
        },
        "time": 200,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      },
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.812+02:00",
        "request": {
          "bodySize": 232,
          "method": "PROPFIND",
          "url": "https://*snip*/remote.php/dav/systemtags-relations/files/8152",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "X-Requested-With",
              "value": "XMLHttpRequest"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "Depth",
              "value": "1"
            },
            {
              "name": "Content-Type",
              "value": "application/xml; charset=utf-8"
            },
            {
              "name": "Content-Length",
              "value": "232"
            },
            {
              "name": "Origin",
              "value": "https://*snip*"
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [],
          "headersSize": 836,
          "postData": {
            "mimeType": "application/xml; charset=utf-8",
            "params": [],
            "text": "<?xml version=\"1.0\"?>\n<d:propfind  xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n  <d:prop>\n    <oc:id />\n    <oc:display-name />\n    <oc:user-visible />\n    <oc:user-assignable />\n    <oc:can-assign />\n  </d:prop>\n</d:propfind>"
          }
        },
        "response": {
          "status": 207,
          "statusText": "Multi-Status",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:23 GMT"
            },
            {
              "name": "content-type",
              "value": "application/xml; charset=utf-8"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'none';"
            },
            {
              "name": "vary",
              "value": "Brief,Prefer"
            },
            {
              "name": "dav",
              "value": "1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/xml; charset=utf-8",
            "size": 427,
            "text": "<?xml version=\"1.0\"?>\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><d:response><d:href>/remote.php/dav/systemtags-relations/files/8152/</d:href><d:propstat><d:prop><oc:id/><oc:display-name/><oc:user-visible/><oc:user-assignable/><oc:can-assign/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>\n"
          },
          "redirectURL": "",
          "headersSize": 462,
          "bodySize": 889
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 128,
          "receive": 0
        },
        "time": 128,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      },
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.874+02:00",
        "request": {
          "bodySize": 232,
          "method": "PROPFIND",
          "url": "https://*snip*/remote.php/dav/systemtags-relations/files/8152",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "X-Requested-With",
              "value": "XMLHttpRequest"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "Depth",
              "value": "1"
            },
            {
              "name": "Content-Type",
              "value": "application/xml; charset=utf-8"
            },
            {
              "name": "Content-Length",
              "value": "232"
            },
            {
              "name": "Origin",
              "value": "https://*snip*"
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [],
          "headersSize": 836,
          "postData": {
            "mimeType": "application/xml; charset=utf-8",
            "params": [],
            "text": "<?xml version=\"1.0\"?>\n<d:propfind  xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n  <d:prop>\n    <oc:id />\n    <oc:display-name />\n    <oc:user-visible />\n    <oc:user-assignable />\n    <oc:can-assign />\n  </d:prop>\n</d:propfind>"
          }
        },
        "response": {
          "status": 207,
          "statusText": "Multi-Status",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:24 GMT"
            },
            {
              "name": "content-type",
              "value": "application/xml; charset=utf-8"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'none';"
            },
            {
              "name": "vary",
              "value": "Brief,Prefer"
            },
            {
              "name": "dav",
              "value": "1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/xml; charset=utf-8",
            "size": 427,
            "text": "<?xml version=\"1.0\"?>\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><d:response><d:href>/remote.php/dav/systemtags-relations/files/8152/</d:href><d:propstat><d:prop><oc:id/><oc:display-name/><oc:user-visible/><oc:user-assignable/><oc:can-assign/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>\n"
          },
          "redirectURL": "",
          "headersSize": 462,
          "bodySize": 889
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 149,
          "receive": 0
        },
        "time": 149,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      },
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.950+02:00",
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://*snip*/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=*snip*.pdf&reshares=true",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [
            {
              "name": "format",
              "value": "json"
            },
            {
              "name": "path",
              "value": "*snip*.pdf"
            },
            {
              "name": "reshares",
              "value": "true"
            }
          ],
          "headersSize": 792
        },
        "response": {
          "status": 404,
          "statusText": "Not Found",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:24 GMT"
            },
            {
              "name": "content-type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'self'; script-src 'self' 'nonce-Q2ZnZnJHeVA3dC9Xbk9pcU5ZcjFZblhFQllGQThlUDhUakRVd3p1NndBbz06Yzg1dzFqejNsTHVQczdtZVY4V0NKQ09kWnZBQndLcXVKRkhqcVF6dGoyVT0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';"
            },
            {
              "name": "content-encoding",
              "value": "gzip"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/json; charset=utf-8",
            "size": 228,
            "text": "{\"ocs\":{\"meta\":{\"status\":\"failure\",\"statuscode\":404,\"message\":\"Invalid query, please check the syntax. API specifications are here: http:\\/\\/www.freedesktop.org\\/wiki\\/Specifications\\/open-collaboration-services.\\n\"},\"data\":[]}}"
          },
          "redirectURL": "",
          "headersSize": 658,
          "bodySize": 852
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 312,
          "receive": 0
        },
        "time": 312,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      },
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.950+02:00",
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://*snip*/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=*snip*.pdf&shared_with_me=true",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [
            {
              "name": "format",
              "value": "json"
            },
            {
              "name": "path",
              "value": "*snip*.pdf"
            },
            {
              "name": "shared_with_me",
              "value": "true"
            }
          ],
          "headersSize": 798
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:24 GMT"
            },
            {
              "name": "content-type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "content-length",
              "value": "74"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "cache-control",
              "value": "no-cache, no-store, must-revalidate"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'none';base-uri 'none';manifest-src 'self'"
            },
            {
              "name": "feature-policy",
              "value": "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "x-xss-protection",
              "value": "1; mode=block"
            },
            {
              "name": "x-robots-tag",
              "value": "none"
            },
            {
              "name": "x-download-options",
              "value": "noopen"
            },
            {
              "name": "x-permitted-cross-domain-policies",
              "value": "none"
            },
            {
              "name": "referrer-policy",
              "value": "no-referrer"
            },
            {
              "name": "strict-transport-security",
              "value": "max-age=15768000"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/json; charset=utf-8",
            "size": 74,
            "text": "{\"ocs\":{\"meta\":{\"status\":\"ok\",\"statuscode\":200,\"message\":\"OK\"},\"data\":[]}}"
          },
          "redirectURL": "",
          "headersSize": 701,
          "bodySize": 775
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 157,
          "receive": 0
        },
        "time": 157,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      },
      {
        "pageref": "page_2",
        "startedDateTime": "2020-07-01T12:39:23.950+02:00",
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://*snip*/ocs/v2.php/collaboration/resources/file/8152?format=json",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "*snip*"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "requesttoken",
              "value": "+w64UA6bnuuOuZ+mGLY+w+BAfyfUmKxvpkwdvJoAqt0=:gTjXKl7j5I/Xls6SevlJhbYZHFaVqeU9zC0q1q1X5bI="
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocvqa11qsad5=9062qvl5r51jd5165egnido4fg; oc_sessionPassphrase=6xjDtESA%2FGYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB%2FimnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "ocvqa11qsad5",
              "value": "9062qvl5r51jd5165egnido4fg"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "6xjDtESA/GYopEiOczfLkAgSJPS47LlAN3cXLrAxB8H1tB/imnQE35rclvZXtYCMRcxEkXwDfyTB7dd3WpOoMp2ctlQnyRj1JnDFOuWFmqKjGfs0tMMibU7TNwXOtHOU"
            }
          ],
          "queryString": [
            {
              "name": "format",
              "value": "json"
            }
          ],
          "headersSize": 715
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "server",
              "value": "nginx/1.17.8"
            },
            {
              "name": "date",
              "value": "Wed, 01 Jul 2020 10:39:24 GMT"
            },
            {
              "name": "content-type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "content-length",
              "value": "74"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "cache-control",
              "value": "no-cache, no-store, must-revalidate"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'none';base-uri 'none';manifest-src 'self'"
            },
            {
              "name": "feature-policy",
              "value": "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "x-xss-protection",
              "value": "1; mode=block"
            },
            {
              "name": "x-robots-tag",
              "value": "none"
            },
            {
              "name": "x-download-options",
              "value": "noopen"
            },
            {
              "name": "x-permitted-cross-domain-policies",
              "value": "none"
            },
            {
              "name": "referrer-policy",
              "value": "no-referrer"
            },
            {
              "name": "strict-transport-security",
              "value": "max-age=15768000"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/json; charset=utf-8",
            "size": 74,
            "text": "{\"ocs\":{\"meta\":{\"status\":\"ok\",\"statuscode\":200,\"message\":\"OK\"},\"data\":[]}}"
          },
          "redirectURL": "",
          "headersSize": 701,
          "bodySize": 775
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 153,
          "receive": 0
        },
        "time": 153,
        "_securityState": "secure",
        "serverIPAddress": "5.196.244.250",
        "connection": "443"
      }
    ]
  }
}

Console log:

Error loading the shares list Error: Request failed with status code 404
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:245
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:565
    onreadystatechange https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:245
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:245
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:245
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:565
    promise callback*c.prototype.request https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:565
    e https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:565
    exports https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:245
    e https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    c https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    _invoke https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    t https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    Ne https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    a https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    beforeMount https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    ze https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    Jt https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    mount https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    $mount https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    init https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    p https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    p https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    lo https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    _update https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    r https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    get https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    run https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
files_sharing_tab.js:732:39084
    e https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    c https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    _invoke https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    t https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    Ne https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    s https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    (Async: promise callback)
    Ne https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    a https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    getShares https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    beforeMount https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:732
    ze https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    Jt https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    mount https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    $mount https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    init https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    p https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    p https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    lo https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    _update https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    r https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    get https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    run https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    cn https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    tt https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    Ze https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    (Async: promise callback)
    Ye https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    tt https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    update https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    update https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    notify https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    set https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    set https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:7
    r https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    c https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    _invoke https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    t https://*snip*/apps/files_sharing/js/dist/files_sharing_tab.js?v=75cb3a17-9:590
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    a https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    (Async: promise callback)
    E https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    a https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    _ https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    _ https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    open https://*snip*/apps/files/js/dist/sidebar.js?v=75cb3a17-9:212
    _updateDetailsView https://*snip*/js/files/merged-index.js?v=75cb3a17-9:4540
    showDetailsView https://*snip*/js/files/merged-index.js?v=75cb3a17-9:4498
    actionHandler https://*snip*/apps/files_sharing/js/dist/additionalScripts.js?v=75cb3a17-9:1
    action https://*snip*/js/files/merged-index.js?v=75cb3a17-9:2894
    _renderInlineAction https://*snip*/js/files/merged-index.js?v=75cb3a17-9:3197
    dispatch https://*snip*/core/js/dist/main.js?v=75cb3a17-9:25
    handle https://*snip*/core/js/dist/main.js?v=75cb3a17-9:25
    (Async: EventListener.handleEvent)
    add https://*snip*/core/js/dist/main.js?v=75cb3a17-9:25
    add https://*snip*/core/js/dist/main.js?v=75cb3a17-9:565
    on https://*snip*/core/js/dist/main.js?v=75cb3a17-9:25
    each https://*snip*/core/js/dist/main.js?v=75cb3a17-9:14
@tkolo tkolo added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 1, 2020
@SowaNMS

This comment has been minimized.

@SowaNMS

This comment has been minimized.

@skjnldsv
Copy link
Member

@tkolo does it still happens? I cannot reproduce the issue 🤔

@tkolo
Copy link
Author

tkolo commented Aug 23, 2020

Yes, I can still reproduce it on my instance, Nextcloud 19.0.1

@skjnldsv
Copy link
Member

Can you dump your addressbook table there please?

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

there you go, dumped as CSV via pgadmin4:

"id","principaluri","displayname","uri","description","synctoken"
1,"principals/users/tkolosowski","Contacts","contacts",NULL,45
3,"principals/system/system","https://k**snip**.cloud","8e177f67bd4481a8c28f5c3ad66eab1f182b3e3f",NULL,1822
2,"principals/system/system","system","system","System addressbook which holds all users of this instance",388

The user from share in question probably comes from address book with ID 3

@skjnldsv
Copy link
Member

3,"principals/system/system","https://k**snip**.cloud","8e177f67bd4481a8c28f5c3ad66eab1f182b3e3f",NULL,1822
2,"principals/system/system","system","system","System addressbook which holds all users of this instance",388

@georgehrke that is weird, right?

@georgehrke
Copy link
Member

georgehrke commented Aug 24, 2020

3,"principals/system/system","https://k**snip**.cloud","8e177f67bd4481a8c28f5c3ad66eab1f182b3e3f",NULL,1822

I have never seen this before. Definitely an invalid uri.

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

I've masked the external cloud's URI for privacy purposes if that's what you're referring to.

@skjnldsv
Copy link
Member

I've masked the external cloud's URI for privacy purposes if that's what you're referring to.

Not really. It's just a bit weird. You're using federated clouds?

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

Yes, I've tried to share a file to a cloud user from another instance.

@skjnldsv
Copy link
Member

Yes, I've tried to share a file to a cloud user from another instance.

Have you linked two instances together or just shared to another instance?
@rullzer does it look normal?

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

I've mutually added them as "trusted servers", does that count as "linking"?

@skjnldsv
Copy link
Member

I've mutually added them as "trusted servers", does that count as "linking"?

yes, But you don't need to do this to share a file to an external cloud.
But I'm also not even sure this is where the issue comes from. :)

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

I know, the idea was to actually have auto completion for sharing, I believe that's what this is for

@skjnldsv
Copy link
Member

@tkolo please edit the /apps/files_sharing/lib/Controller/ShareAPIController.php file and add this just under the function declaration

	// private function getDisplayNameFromAddressBook(string $query, string $property): string {
		$logger = \OC::$server->getLogger();
		$logger->error(json_encode(['getDisplayNameFromAddressBook', $query, $property]));

Then trigger the error again, and check the logs for the getDisplayNameFromAddressBook message, please paste the entire json error here :)

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

There you go:

  {
    "reqId": "URSTArIspjq1rwLtMj0O",
    "level": 3,
    "time": "2020-08-24T13:00:49+00:00",
    "remoteAddr": "83.144.104.86",
    "user": "***snip***",
    "app": "no app in context",
    "method": "GET",
    "url": "/ocs/v2.php/apps/files_sharing/api/v1/shares?format\u003djson\u0026path\u003d%2F***snip***.pdf\u0026reshares\u003dtrue",
    "message": "[\"getDisplayNameFromAddressBook\",\"j***@k*****.cloud\",\"CLOUD\"]",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0",
    "version": "19.0.1.1"
  },
  {
    "reqId": "URSTArIspjq1rwLtMj0O",
    "level": 3,
    "time": "2020-08-24T13:00:49+00:00",
    "remoteAddr": "83.144.104.86",
    "user": "***snip***",
    "app": "PHP",
    "method": "GET",
    "url": "/ocs/v2.php/apps/files_sharing/api/v1/shares?format\u003djson\u0026path\u003d%2F***snip***.pdf\u0026reshares\u003dtrue",
    "message": "Undefined index: FN at /var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php#302",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0",
    "version": "19.0.1.1"
  },
  {
    "reqId": "URSTArIspjq1rwLtMj0O",
    "level": 3,
    "time": "2020-08-24T13:00:49+00:00",
    "remoteAddr": "83.144.104.86",
    "user": "***snip***",
    "app": "no app in context",
    "method": "GET",
    "url": "/ocs/v2.php/apps/files_sharing/api/v1/shares?format\u003djson\u0026path\u003d%2F***snip***.pdf\u0026reshares\u003dtrue",
    "message": {
      "Exception": "Exception",
      "Message": "Return value of OCA\\Files_Sharing\\Controller\\ShareAPIController::getDisplayNameFromAddressBook() must be of the type string, null returned",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/App.php",
          "line": 137,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php",
          "line": 47,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "function": "__invoke",
          "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/***snip***/htdocs/lib/private/Route/Router.php",
          "line": 297,
          "function": "call_user_func"
        },
        {
          "file": "/var/www/***snip***/htdocs/ocs/v1.php",
          "line": 88,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "-\u003e"
        },
        {
          "file": "/var/www/***snip***/htdocs/ocs/v2.php",
          "line": 24,
          "args": [
            "/var/www/***snip***/htdocs/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/***snip***/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
      "Line": 110,
      "Previous": {
        "Exception": "TypeError",
        "Message": "Return value of OCA\\Files_Sharing\\Controller\\ShareAPIController::getDisplayNameFromAddressBook() must be of the type string, null returned",
        "Code": 0,
        "Trace": [
          {
            "file": "/var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
            "line": 242,
            "function": "getDisplayNameFromAddressBook",
            "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
            "line": 800,
            "function": "formatShare",
            "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
            "line": 742,
            "function": "getFormattedShares",
            "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 170,
            "function": "getShares",
            "class": "OCA\\Files_Sharing\\Controller\\ShareAPIController",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 100,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/App.php",
            "line": 137,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php",
            "line": 47,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::"
          },
          {
            "function": "__invoke",
            "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/lib/private/Route/Router.php",
            "line": 297,
            "function": "call_user_func"
          },
          {
            "file": "/var/www/***snip***/htdocs/ocs/v1.php",
            "line": 88,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "-\u003e"
          },
          {
            "file": "/var/www/***snip***/htdocs/ocs/v2.php",
            "line": 24,
            "args": [
              "/var/www/***snip***/htdocs/ocs/v1.php"
            ],
            "function": "require_once"
          }
        ],
        "File": "/var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php",
        "Line": 302
      },
      "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0",
    "version": "19.0.1.1"
  },
  {
    "reqId": "H0FecDvUhsDZQYqQYzmg",
    "level": 3,
    "time": "2020-08-24T13:00:49+00:00",
    "remoteAddr": "83.144.104.86",
    "user": "***snip***",
    "app": "PHP",
    "method": "GET",
    "url": "/ocs/v2.php/apps/activity/api/v2/activity/filter?format\u003djson\u0026object_type\u003dfiles\u0026object_id\u003d8152",
    "message": "Undefined index: FN at /var/www/***snip***/htdocs/apps/files_sharing/lib/Activity/Providers/Base.php#222",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0",
    "version": "19.0.1.1"
  }

In case it's relevant, I don't mind sharing these logs "uncensored", just not in publicly visible and forever archived issue on github...

@skjnldsv
Copy link
Member

"message": "Undefined index: FN at /var/www/***snip***/htdocs/apps/files_sharing/lib/Controller/ShareAPIController.php#302",

No it's all good!
So there is a contact that is invalid. a FN is always supposed to be present.
Can you try to edit the line if ($value === $query) {
to

if ($value === $query && $r['FN']) {

@tkolo
Copy link
Author

tkolo commented Aug 24, 2020

That fixed the issue.

@skjnldsv
Copy link
Member

Awesome! Let me provide a fix :)

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Aug 24, 2020
@skjnldsv skjnldsv self-assigned this Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: sharing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants