nextcloud / nextcloud/circles

Inviting Teams/Circles results in the wrong user count and a error log stating Could not find organizer

Open
#1,690 31 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
177
Forks
68
Avg merge
2d 22h
Merged PRs (30d)
60

Description

Steps to reproduce
  1. Create a Team/Circle with myself and a guest email address
  2. When creating a new appointment, add the created Team
  3. The user count will say 12 members in the Team when there are only 2
Expected behavior
  1. The correct count of Team/Circle members is stated
  2. The members get added correctly to the appointment invite
Actual behaviour
  1. A popup appears: Note that members of circles get invited but are not synced yet.
  2. No members show up in the appointment invite
  3. The Nextcloud log shows the error pasted below
  4. The browser console shows an error pasted below as well
Calendar app version

4.7.8 and 4.7.9 and maybe more versions

CalDAV-clients used

n/a

Browser

Chrome Version 126.0.6478.126 (Official Build) (64-bit) but others as well

Client operating system

Fedora 40

Server operating system

Debian 12, using docker with Nextcloud-AIO

Web server

Apache

Database engine version

PostgreSQL

PHP engine version

PHP 8.2

Nextcloud version

Nextcloud Hub 8 (29.0.3)

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps
Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - app_api: 2.7.0
  - assistant: 1.1.0
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.9
  - call_summary_bot: 1.1.1
  - camerarawpreviews: 0.8.5
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - deck: 1.13.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_antivirus: 5.5.6
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_fulltextsearch: 29.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_retention: 1.18.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - fileslibreofficeedit: 1.1.0
  - firstrunwizard: 2.18.0
  - flow_notifications: 1.9.0
  - forms: 4.2.4
  - fulltextsearch: 29.0.0
  - fulltextsearch_elasticsearch: 29.0.1
  - groupfolders: 17.0.1
  - impersonate: 1.16.0
  - integration_giphy: 1.0.10
  - integration_google: 2.2.0
  - integration_openai: 2.0.3
  - integration_youtube: 0.2.1
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - mail: 3.7.2
  - maps: 1.4.0
  - memegen: 1.0.8
  - memories: 7.3.1
  - nextcloud-aio: 0.6.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.0
  - notifications: 2.17.0
  - notify_push: 0.6.12
  - oauth2: 1.17.0
  - oidc: 0.9.1
  - password_policy: 1.19.0
  - photos: 2.5.0
  - previewgenerator: 5.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recognize: 7.0.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.3
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - sociallogin: 5.6.5
  - socialsharing_email: 3.1.0
  - spreed: 19.0.4
  - stt_helper: 1.1.1
  - support: 1.12.0
  - survey_client: 1.17.0
  - suspicious_login: 7.0.0
  - systemtags: 1.19.0
  - tables: 0.7.3
  - tasks: 0.16.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - twofactor_webauthn: 1.4.0
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflow_ocr: 1.29.0
  - workflowengine: 2.11.0
Disabled:
  - encryption: 2.17.0
  - updatenotification: 1.19.1 (installed 1.16.0)
  - user_ldap: 1.20.0
Nextcloud configuration
{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "cloud.maas-opleidingen.nl",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.maas-opleidingen.nl"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "29.0.3.4",
        "overwrite.cli.url": "https:\/\/cloud.maas-opleidingen.nl\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": "10485760",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "0": "OC\\Preview\\Imaginary"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "htaccess.RewriteBase": "\/",
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "default_phone_region": "NL",
        "maintenance": false,
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
        "memories.qsv": true,
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.disable": false,
        "memories.vod.vaapi": true,
        "memories.vod.nvenc": false,
        "memories.vod.nvenc.scale": "npp",
        "memories.vod.nvenc.temporal_aq": true,
        "updatedirectory": "\/nc-updater",
        "updater.release.channel": "beta",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "davstorage.request_timeout": 3600,
        "dbpersistent": false,
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "appsallowlist": false,
        "maintenance_window_start": 100,
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "memories.db.triggers.fcu": true,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "memories.gis_type": 2
    }
}
Web server error log
{"reqId":"ojIW7Ec8griOEmSYIJhs","level":3,"time":"2024-06-21T19:04:21+00:00","remoteAddr":"192.168.112.1","user":"rutger.putter","app":"index","method":"GET","url":"/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=FaWg5nkVLV3pqGTgmbESjn7DQYRwMDa","message":"Could not find organizer","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.3.3","exception":{"Exception":"OCA\\Calendar\\Service\\ServiceException","Message":"Could not find organizer","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getCircleMembers","class":"OCA\\Calendar\\Controller\\ContactController","type":"->","args":["FaWg5nkVLV3pqGTgmbESjn7DQYRwMDa"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Calendar\\Controller\\ContactController"],"getCircleMembers"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Calendar\\Controller\\ContactController"],"getCircleMembers"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Calendar\\Controller\\ContactController","getCircleMembers",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["calendar.contact.getcirclemembers"]]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/calendar/v1/circles/getmembers"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/calendar/lib/Controller/ContactController.php","Line":233,"message":"Could not find organizer","exception":{},"CustomMessage":"Could not find organizer"}}
Log file

No response

Browser log
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at o.resolveCircleMembers (InviteesListSearch.vue:197:1)

circleService.js:84 
             
       GET https://<URL>/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq 500 (Internal Server Error)
Additional info

No response

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

Reproduce the Team/Circle invitation flow, then inspect custom_apps/calendar/lib/Controller/ContactController.php around line 233 and the getmembers request in circleService.js. Trace how InviteesListSearch.vue around line 197 handles the response; done means the correct member count appears, members are added to the appointment invite, and the request no longer produces the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
api, backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.