nextcloud / nextcloud/calendar

Trying to share a calendar with users, shows no users, only groups

Open
#2,559 19 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug Feature: Sharing
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Steps to reproduce
  1. Click the share button of a calendar
  2. Type the username of another user
  3. After the spinner finishes, the box comes out with No users or groups
Expected behaviour

Tell us what should happen

It should allow me to share a calendar with other users.

Actual behaviour

Tell us what happens instead

The user suggestions don't come up. I can share with groups, but not with users.

Moreover, if I look at the HTTP requests, it is getting the users back, but the UI somehow doesn't show them.

Redacted example copied from Chrome's network inspector:

users [ {…} ]
0  
label "xxx (xxx@yyy.co.uk)"
uuid "xxx@yyy.co.uk"
name "xxx"
value Object { shareType: 0, shareWith: "xxx@yyy.co.uk" }
shareType 0
shareWith "xxx@yyy.co.uk"

It also gets email suggestions which are also not shown:

0  
label "XXX YYY (xxx@yyyco.uk)"
uuid "foo"
name "XXX YYY"
type ""
value Object { shareType: 4, shareWith: "xxx@yyy.co.uk" }
shareType 4
shareWith "xxx@yyy.co.uk"
Calendar app

Calendar app version: 2.0.4

CalDAV-clients used: n/a/ - this happens in the browser

Client configuration

Browser: Firefox 80, also tested on latest Chrome

Operating system: Arch Linux

Server configuration

Operating system: Ubuntu 18.04

Web server: Nginx

Database: SQLite

PHP version: PHP 7.2.24

Nextcloud Version: 17.0.6

Updated from an older installed version or fresh install: Updated, via mailinabox

List of activated apps:

Enabled:
  - accessibility: 1.3.0
  - activity: 2.10.1
  - calendar: 2.0.4
  - cloud_federation_api: 1.0.0
  - comments: 1.7.0
  - contacts: 3.3.0
  - dav: 1.13.0
  - federatedfilesharing: 1.7.0
  - federation: 1.7.0
  - files: 1.12.0
  - files_pdfviewer: 1.6.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.9.0
  - files_trashbin: 1.7.0
  - files_versions: 1.10.0
  - files_videoplayer: 1.6.0
  - gallery: 18.4.0
  - logreader: 2.2.0
  - lookup_server_connector: 1.5.0
  - nextcloud_announcements: 1.6.0
  - notifications: 2.5.0
  - oauth2: 1.5.0
  - password_policy: 1.7.0
  - privacy: 1.1.0
  - provisioning_api: 1.7.0
  - recommendations: 0.5.0
  - serverinfo: 1.7.0
  - sharebymail: 1.7.0
  - support: 1.0.1
  - survey_client: 1.5.0
  - systemtags: 1.7.0
  - text: 1.1.1
  - theming: 1.8.0
  - twofactor_backupcodes: 1.6.0
  - updatenotification: 1.7.0
  - user_external: 0.10.0
  - viewer: 1.2.0
  - workflowengine: 1.7.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - encryption
  - files_external
  - firstrunwizard
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "forcessl": true,
        "overwritewebroot": "\/cloud",
        "overwrite.cli.url": "\/cloud",
        "user_backends": [
            {
                "class": "OC_User_IMAP",
                "arguments": [
                    "127.0.0.1",
                    143,
                    null
                ]
            }
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "sendmail",
        "mail_smtpsecure": "",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": false,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "box.espinha.co.uk"
        ],
        "dbtype": "sqlite3",
        "version": "17.0.6.2",
        "installed": true,
        "logtimezone": "Europe\/London",
        "logdateformat": "Y-m-d H:i:s",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
Logs
Web server error log (e.g. /var/log/apache)
2001:8b0:a633:44b1::30 - - [05/Sep/2020:06:08:00 +0100] "GET /cloud/ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=lily&perPage=200&itemType=principals HTTP/2.0" 200 654 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0"
Log file (data/nextcloud.log)
{
    "reqId": "o93jrP5RRsmwPpjKfcwP",
    "level": 3,
    "time": "2020-09-04 21:20:27",
    "remoteAddr": "",
    "user": "--",
    "app": "core",
    "method": "",
    "url": "\/cloud\/cron.php",
    "message": {
        "Exception": "Sabre\\VObject\\Recur\\NoInstancesException",
        "Message": "This recurrence rule does not generate any valid instances",
        "Code": 0,
        "Trace": [
            {
                "file": "\/usr\/local\/lib\/owncloud\/apps\/dav\/lib\/CalDAV\/CalDavBackend.php",
                "line": 2259,
                "function": "__construct",
                "class": "Sabre\\VObject\\Recur\\EventIterator",
                "type": "->",
                "args": [
                    {
                        "name": "VCALENDAR",
                        "parent": null,
                        "__class__": "Sabre\\VObject\\Component\\VCalendar"
                    },
                    "xxx@google.com"
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/apps\/dav\/lib\/CalDAV\/CalDavBackend.php",
                "line": 1055,
                "function": "getDenormalizedData",
                "class": "OCA\\DAV\\CalDAV\\CalDavBackend",
                "type": "->",
                "args": [
                    "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-\/\/Sabre\/\/Sabre VObject 4.1.6\/\/EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Lisbon\r\nX-LIC-LOCATION:Europe\/Lisbon\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0000\r\nTZNAME:WET\r\nDTSTART:19701025T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0100\r\nTZNAME:WEST\r\nDTSTART:19700329T010000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Amsterdam\r\nX-LIC-LOCATION:Europe\/Amsterdam\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/London\r\nX-LIC-LOCATION:Europe\/London\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0100\r\nTZNAME:BST\r\nDTSTART:19700329T010000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0000\r\nTZNAME:GMT\r\nDTSTART:19701025T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Vienna\r\nX-LIC-LOCATION:Europe\/Vienna\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe\/Amsterdam:20141006T090000\r\nDTEND;TZID=Europe\/Amsterdam:20141006T170000\r\nRRULE:FREQ=WEEKLY;WKST=MO;UNTIL=20141013T065959Z;BYDAY=MO,TU,WE,TH,FR\r\nEXDATE;TZID=Europe\/Amsterdam:20141010T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141009T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141008T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141007T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141006T090000\r\nDTSTAMP:20200904T202003Z\r\nUID:xxx@google.com\r\nCREATED:20140521T074843Z\r\nDESCRIPTION:\r\nLAST-MODIFIED:20141013T070133Z\r\nLOCATION:\r\nSEQUENCE:1\r\nSTATUS:CONFIRMED\r\nSUMMARY:Geoscience Foundation\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/apps\/dav\/lib\/CalDAV\/WebcalCaching\/RefreshWebcalService.php",
                "line": 141,
                "function": "createCalendarObject",
                "class": "OCA\\DAV\\CalDAV\\CalDavBackend",
                "type": "->",
                "args": [
                    "3",
                    "redacted.ics",
                    "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-\/\/Sabre\/\/Sabre VObject 4.1.6\/\/EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Lisbon\r\nX-LIC-LOCATION:Europe\/Lisbon\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0000\r\nTZNAME:WET\r\nDTSTART:19701025T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0100\r\nTZNAME:WEST\r\nDTSTART:19700329T010000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Amsterdam\r\nX-LIC-LOCATION:Europe\/Amsterdam\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/London\r\nX-LIC-LOCATION:Europe\/London\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0100\r\nTZNAME:BST\r\nDTSTART:19700329T010000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0000\r\nTZNAME:GMT\r\nDTSTART:19701025T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID:Europe\/Vienna\r\nX-LIC-LOCATION:Europe\/Vienna\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe\/Amsterdam:20141006T090000\r\nDTEND;TZID=Europe\/Amsterdam:20141006T170000\r\nRRULE:FREQ=WEEKLY;WKST=MO;UNTIL=20141013T065959Z;BYDAY=MO,TU,WE,TH,FR\r\nEXDATE;TZID=Europe\/Amsterdam:20141010T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141009T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141008T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141007T090000\r\nEXDATE;TZID=Europe\/Amsterdam:20141006T090000\r\nDTSTAMP:20200904T202003Z\r\nUID:xxx@google.com\r\nCREATED:20140521T074843Z\r\nDESCRIPTION:\r\nLAST-MODIFIED:20141013T070133Z\r\nLOCATION:\r\nSEQUENCE:1\r\nSTATUS:CONFIRMED\r\nSUMMARY:Geoscience Foundation\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",
                    1
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/apps\/dav\/lib\/BackgroundJob\/RefreshWebcalJob.php",
                "line": 110,
                "function": "refreshSubscription",
                "class": "OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
                "type": "->",
                "args": [
                    "principals\/users\/redacted",
                    "redacted.ics"
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/lib\/private\/BackgroundJob\/Job.php",
                "line": 61,
                "function": "run",
                "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
                "type": "->",
                "args": [
                    {
                        "principaluri": "principals\/users\/redacted",
                        "uri": "redacted"
                    }
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/apps\/dav\/lib\/BackgroundJob\/RefreshWebcalJob.php",
                "line": 103,
                "function": "execute",
                "class": "OC\\BackgroundJob\\Job",
                "type": "->",
                "args": [
                    {
                        "__class__": "OC\\BackgroundJob\\JobList"
                    },
                    {
                        "__class__": "OC\\Log"
                    }
                ]
            },
            {
                "file": "\/usr\/local\/lib\/owncloud\/cron.php",
                "line": 124,
                "function": "execute",
                "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
                "type": "->",
                "args": [
                    {
                        "__class__": "OC\\BackgroundJob\\JobList"
                    },
                    {
                        "__class__": "OC\\Log"
                    }
                ]
            }
        ],
        "File": "\/usr\/local\/lib\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Recur\/EventIterator.php",
        "Line": 203,
        "CustomMessage": "Error while running background job (class: OCA\\DAV\\BackgroundJob\\RefreshWebcalJob, arguments: Array\n(\n    [principaluri] => principals\/users\/redacted\n    [uri] => redacted\n)\n)"
    },
    "userAgent": "--",
    "version": "17.0.6.2"
}

Saw this failure above, don't know if it has anything to do with it though. Seems like a cronjob failing to fetch a Google calendar.

Browser log
{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK",
            "totalitems": "",
            "itemsperpage": ""
        },
        "data": {
            "exact": {
                "users": [],
                "groups": [],
                "remotes": [],
                "remote_groups": [],
                "emails": [],
                "circles": [],
                "rooms": [],
                "lookup": []
            },
            "users": [
                {
                    "label": "redacted (redacted)",
                    "uuid": "redacted",
                    "name": "redacted",
                    "value": {
                        "shareType": 0,
                        "shareWith": "redacted"
                    }
                }
            ],
            "groups": [],
            "remotes": [],
            "remote_groups": [],
            "emails": [
                {
                    "label": "redacted redacted (redacted)",
                    "uuid": "redacted",
                    "name": "redacted redacted",
                    "type": "",
                    "value": {
                        "shareType": 4,
                        "shareWith": "redacted"
                    }
                }
            ],
            "lookup": [],
            "circles": [],
            "rooms": [],
            "lookupEnabled": true
        }
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the calendar share button and inspect the browser request to the sharees endpoint, which returns user and email suggestions. Trace how those returned entries are passed to the sharing UI; done means user suggestions are displayed and a calendar can be shared with a user, while group sharing continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.