circles icon indicating copy to clipboard operation
circles copied to clipboard

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

Open rutgerputter opened this issue 1 year ago • 29 comments

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

rutgerputter avatar Jul 04 '24 07:07 rutgerputter

Confirming this issue on 29.0.4 As of right now it is impossible to efficiently use the circles/teams feature. Yes it does work with Talk rooms and Collectives (which is great for our internal knowledge base!).

Planning meetings however is a pain. For every meeting I have to manually add all team members to the list. I wish I could support on the development of this issue, however I am not capable of that (yet).

Hope you guys can include this issue unified into the current in-development & to-do PR's that are related to calendar, groups and contact groups.

gwnmikedus avatar Aug 08 '24 13:08 gwnmikedus

Thanks for reporting this issue. Can you please confirm that your organizer email address is unique within your Nextcloud instance? The organizer email will be the logged in user's email address that created the calendar event.

miaulalala avatar Aug 20 '24 13:08 miaulalala

Thanks for reporting this issue. Can you please confirm that your organizer email address is unique within your Nextcloud instance? The organizer email will be the logged in user's email address that created the calendar event.

We have a relatively small instance with less than 20 users and I can confirm all email addresses of the Nextcloud users are unique.

rutgerputter avatar Aug 22 '24 07:08 rutgerputter

Also, this is still happening on the latest version of Calendar: 4.7.16

rutgerputter avatar Aug 22 '24 07:08 rutgerputter

Unfortunately I can't reproduce the issue - can you send me the ics file either per mail at [email protected] or can you post an anonymised version here?

miaulalala avatar Aug 22 '24 12:08 miaulalala

Unfortunately I can't reproduce the issue - can you send me the ics file either per mail at [email protected] or can you post an anonymised version here?

This issue occurs while creating the event, before we save the event and send it out. So no ics is available.

When the team has been selected as invitees, the browser shows the following error in the console:

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

This is also shown:

GET https://<hostname of nextcloud>/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=<ID of Circle> 500 (Internal Server Error)

So maybe someone can troubleshoot the o.resolveCircleMembers function to see what's going on? It really looks like there is an issue resoving the members of the Circle/Team we're trying to invite.

rutgerputter avatar Aug 23 '24 14:08 rutgerputter

Would you be willing to apply the fix in the linked PR as a patch and then try again? You can find info on how to apply a patch here: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html#patching-apps

miaulalala avatar Aug 26 '24 09:08 miaulalala

Would you be willing to apply the fix in the linked PR as a patch and then try again? You can find info on how to apply a patch here: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html#patching-apps

Sure! Please stand-by while I get everything in place. I'll report back soon.

rutgerputter avatar Aug 26 '24 09:08 rutgerputter

Patching was successful:

9f4c3bdabe60:/var/www/html/custom_apps/calendar# patch -p 1 < ./patch.txt 
patching file lib/Controller/ContactController.php
Hunk nextcloud/calendar#1 succeeded at 30 (offset 23 lines).
Hunk nextcloud/calendar#2 succeeded at 42 (offset 23 lines).
Hunk nextcloud/calendar#3 succeeded at 70 (offset 23 lines).
Hunk nextcloud/calendar#4 succeeded at 201 (offset 23 lines).
patching file lib/Controller/ContactController.php
Hunk nextcloud/calendar#1 succeeded at 235 (offset 23 lines).
patching file lib/Controller/ContactController.php
Hunk nextcloud/calendar#1 succeeded at 235 (offset 23 lines).

But sadly, the problem still exists, here is the console output of Chrome: image

It still shows 12 members in the Team/Circle while there are only 2: image

image

rutgerputter avatar Aug 26 '24 09:08 rutgerputter

anything in the logs?

miaulalala avatar Aug 26 '24 09:08 miaulalala

anything in the logs?

Nothing in nextcloud.log

rutgerputter avatar Aug 26 '24 09:08 rutgerputter

image From these browser errors, I'm guessing the circleservice.js is outputting the wrong members and that's why the forEach function is having problems.

rutgerputter avatar Aug 26 '24 09:08 rutgerputter

I think it's two different issues - one is the count of a circle, which is provided by the sharing backend, and the other is the getMembers function which also errors out somewhere.

Can you run the following queries?

SELECT * FROM oc_circles_circle where unique_id = 'the-circle-id-from-your-get-request';

and

SELECT * FROM oc_circles_members where circle_id = 'the-circle-id-from-your-get-request';

miaulalala avatar Aug 26 '24 10:08 miaulalala

We may be on to something, the second SELECT statement does not work:

nextcloud_database=> SELECT * FROM oc_circles_circle where unique_id = 'lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq';
 id |            unique_id            |   name    | display_name | sanitized_name | instance | config | source |                 settings                 | description |      creation       | contact_addressbook | contact_groupname 
----+---------------------------------+-----------+--------------+----------------+----------+--------+--------+------------------------------------------+-------------+---------------------+---------------------+-------------------
 27 | lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq | Test Team | Test Team    | Test Team      |          |      0 |     16 | {"population":2,"populationInherited":2} |             | 2024-07-04 06:47:50 |                   0 | 
(1 row)

nextcloud_database=> SELECT * FROM oc_circles_members where circle_id = 'lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq';
ERROR:  relation "oc_circles_members" does not exist
LINE 1: SELECT * FROM oc_circles_members where circle_id = 'lpB2DM1y...

rutgerputter avatar Aug 26 '24 11:08 rutgerputter

I listed all the tables in the database and found a typo in the table name in the second statement

It's not oc_circles_members but oc_circles_member.

nextcloud_database=> SELECT * FROM oc_circles_member where circle_id = 'lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq';
 id |            single_id            |            circle_id            |            member_id            |          user_id          | user_type | instance |           invited_by            | level | status |                                                                                                                                                                                                                                                   note                                                                                                                                                                                                                                                   |        cached_name        |    cached_update    | contact_id | contact_meta |       joined        
----+---------------------------------+---------------------------------+---------------------------------+---------------------------+-----------+----------+---------------------------------+-------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+---------------------+------------+--------------+---------------------
 41 | mX9u6DlCy5iJsQv7QD2ySykLCL5VauY | lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq | rL31xBeu6c86BFGl4JoUeAlEW7fy5Cc | rutger.putter@<redacted domain> |         4 |          | q5l317NDo8fF82bpcYFBXjLhfXajt2z |     1 | Member | {"invitedBy":{"id":"q5l317NDo8fF82bpcYFBXjLhfXajt2z","userId":"rutger.putter","userType":1,"displayName":"Rutger Putter","instance":"cloud.maas-opleidingen.nl","basedOn":{"id":"q5l317NDo8fF82bpcYFBXjLhfXajt2z","name":"user:rutger.putter:q5l317NDo8fF82bpcYFBXjLhfXajt2z","displayName":"Rutger Putter","sanitizedName":"","source":1,"population":0,"config":1,"description":"","url":"\/apps\/contacts\/direct\/circle\/q5l317NDo8fF82bpcYFBXjLhfXajt2z","creation":1676205892,"initiator":null}}} | rutger.putter@<redacted domain> | 2024-07-04 06:48:03 |            |              | 2024-07-04 06:48:03
 40 | q5l317NDo8fF82bpcYFBXjLhfXajt2z | lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq | pelcJblEMROfGApoe5rOd72lyveN4Gb | rutger.putter             |         1 |          | q5l317NDo8fF82bpcYFBXjLhfXajt2z |     9 | Member | {"invitedBy":{"id":"q5l317NDo8fF82bpcYFBXjLhfXajt2z","userId":"rutger.putter","userType":1,"displayName":"Rutger Putter","instance":"cloud.maas-opleidingen.nl","basedOn":{"id":"q5l317NDo8fF82bpcYFBXjLhfXajt2z","name":"user:rutger.putter:q5l317NDo8fF82bpcYFBXjLhfXajt2z","displayName":"Rutger Putter","sanitizedName":"","source":1,"population":0,"config":1,"description":"","url":"\/apps\/contacts\/direct\/circle\/q5l317NDo8fF82bpcYFBXjLhfXajt2z","creation":1676205892,"initiator":null}}} | Rutger Putter             | 2024-07-05 07:45:26 |            |              | 2024-07-04 06:47:50
(2 rows)

rutgerputter avatar Aug 26 '24 11:08 rutgerputter

ok, can you observer the request that returns the initial results for the circle?

For me it has the url http://localhost/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&search=test&perPage=200&itemType=pringroucipals

It should return a response that looks like this:

image

If you right- click on the request you should be able to copy the response. Please paste it here in its entirety.

miaulalala avatar Aug 28 '24 13:08 miaulalala

{
    "meta": {
        "status": "ok",
        "statuscode": 200,
        "message": "OK"
    },
    "data": {
        "exact": {
            "users": [],
            "groups": [],
            "remotes": [],
            "remote_groups": [],
            "emails": [],
            "circles": [],
            "rooms": []
        },
        "users": [],
        "groups": [],
        "remotes": [],
        "remote_groups": [],
        "emails": [],
        "lookup": [],
        "circles": [
            {
                "label": "Test Team",
                "shareWithDescription": "Circle is eigendom van Rutger Putter",
                "value": {
                    "shareType": 7,
                    "shareWith": "lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq",
                    "circle": {
                        "id": "lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq",
                        "name": "Test Team",
                        "displayName": "Test Team",
                        "sanitizedName": "Test Team",
                        "source": 16,
                        "population": 2,
                        "config": 0,
                        "description": "",
                        "url": "/apps/contacts/direct/circle/lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq",
                        "creation": 1720075670,
                        "initiator": null,
                        "owner": {
                            "id": "pelcJblEMROfGApoe5rOd72lyveN4Gb",
                            "circleId": "lpB2DM1ymQ82w2nVZjB4cnEWA12LcWq",
                            "singleId": "q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                            "userId": "rutger.putter",
                            "userType": 1,
                            "instance": "cloud.maas-opleidingen.nl",
                            "local": true,
                            "level": 9,
                            "status": "Member",
                            "displayName": "Rutger Putter",
                            "displayUpdate": 1720165526,
                            "notes": {
                                "invitedBy": {
                                    "id": "q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                    "userId": "rutger.putter",
                                    "userType": 1,
                                    "displayName": "Rutger Putter",
                                    "instance": "cloud.maas-opleidingen.nl",
                                    "basedOn": {
                                        "id": "q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                        "name": "user:rutger.putter:q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                        "displayName": "Rutger Putter",
                                        "sanitizedName": "",
                                        "source": 1,
                                        "population": 0,
                                        "config": 1,
                                        "description": "",
                                        "url": "/apps/contacts/direct/circle/q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                        "creation": 1676205892,
                                        "initiator": null
                                    }
                                }
                            },
                            "contactId": "",
                            "contactMeta": "",
                            "joined": 1720075670,
                            "invitedBy": {
                                "id": "q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                "userId": "rutger.putter",
                                "userType": 1,
                                "displayName": "Rutger Putter",
                                "instance": "cloud.maas-opleidingen.nl",
                                "basedOn": {
                                    "id": "q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                    "name": "user:rutger.putter:q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                    "displayName": "Rutger Putter",
                                    "sanitizedName": "",
                                    "source": 1,
                                    "population": 0,
                                    "config": 1,
                                    "description": "",
                                    "url": "/apps/contacts/direct/circle/q5l317NDo8fF82bpcYFBXjLhfXajt2z",
                                    "creation": 1676205892,
                                    "initiator": null
                                }
                            }
                        }
                    }
                }
            }
        ],
        "rooms": [],
        "lookupEnabled": true
    }
}

rutgerputter avatar Aug 28 '24 13:08 rutgerputter

I found some relevant log entries through the admin panel:

{"reqId":"b2CG3SZ3cJQO1PIl0ib4","level":3,"time":"2024-08-29T09:35:08+00:00","remoteAddr":"127.0.0.1","user":"rutger.putter","app":"calendar","method":"GET","url":"/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=lCpZLeHRsDOzyqV1QH5oEmwQlcxNC4Z","message":"Could not find user with user [email protected]","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.4.1","data":{"app":"calendar"}}
{"reqId":"b2CG3SZ3cJQO1PIl0ib4","level":3,"time":"2024-08-29T09:35:08+00:00","remoteAddr":"127.0.0.1","user":"rutger.putter","app":"index","method":"GET","url":"/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=lCpZLeHRsDOzyqV1QH5oEmwQlcxNC4Z","message":"Could not find circle member","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.4.1","exception":{"Exception":"OCA\\Calendar\\Service\\ServiceException","Message":"Could not find circle member","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getCircleMembers","class":"OCA\\Calendar\\Controller\\ContactController","type":"->","args":["lCpZLeHRsDOzyqV1QH5oEmwQlcxNC4Z"]},{"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":216,"message":"Could not find circle member","exception":{},"CustomMessage":"Could not find circle member"}}

Maybe this helps in troubleshooting the issue?

rutgerputter avatar Aug 29 '24 09:08 rutgerputter

Thank you, that is indeed of help!

miaulalala avatar Aug 29 '24 10:08 miaulalala

Could you please check if the user [email protected] exists in your instance? If so, could you please check if the user is a member of any circles?

miaulalala avatar Aug 29 '24 13:08 miaulalala

Could you please check if the user [email protected] exists in your instance? If so, could you please check if the user is a member of any circles?

That is an external mail address I added to the circle for testing, it does not exist. What’s weird though is that it shows up as ‘[email protected]’ while I added the mail address as ‘[email protected]’. Could some function be adding the letters ‘id’ in front of the user resulting in a not found error?

rutgerputter avatar Aug 29 '24 17:08 rutgerputter

Could you please check if the user [email protected] exists in your instance? If so, could you please check if the user is a member of any circles?

That is an external mail address I added to the circle for testing, it does not exist. What’s weird though is that it shows up as ‘[email protected]’ while I added the mail address as ‘[email protected]’. Could some function be adding the letters ‘id’ in front of the user resulting in a not found error?

Maybe there's a string concatenation somewhere that is causing trouble... I will investigate further :detective:

miaulalala avatar Sep 02 '24 05:09 miaulalala

I'm sorry to say that the string concatenation is a false positive from the logging. I think I will need to dig deeper into the circles code to see why the user isn't found.

miaulalala avatar Sep 13 '24 11:09 miaulalala

So, I've taken the plunge into updating to Nextcloud 30 and I now see some logs occurring, having to do with Teams as well, maybe related?

{"reqId":"zFnECdUNstmWtVL0qHqI","level":3,"time":"2024-09-14T19:19:51+00:00","remoteAddr":"127.0.0.1","user":"rutger.putter","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/sabre-vobject-eabedc2b-cadf-4813-b966-f83febf5d893","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->","args":["account"]},{"file":"/var/www/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->","args":["account","sabre-vobject-eabedc2b-cadf-4813-b966-f83febf5d893","rutger.putter"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->","args":["account","sabre-vobject-eabedc2b-cadf-4813-b966-f83febf5d893"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OC\\Core\\Controller\\TeamsApiController"],"listTeams"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OC\\Core\\Controller\\TeamsApiController"],"listTeams"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\TeamsApiController","listTeams",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["account","sabre-vobject-eabedc2b-cadf-4813-b966-f83febf5d893","ocs.core.teamsapi.listteams"]]},{"file":"/var/www/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/teams/resources/account/sabre-vobject-eabedc2b-cadf-4813-b966-f83febf5d893"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":{},"CustomMessage":"No provider found for id account"}}

rutgerputter avatar Sep 14 '24 19:09 rutgerputter

So, I've been poking around this issue again, trying different things.

First I though there might be an issue where there were only external email-addresses added to the team, but adding another user still causes the count to be wrong in calendar.

Then, I've started adding more external email-addresses to the team, this is what happened to the count:

  • 2 members: calendar reports 12 members
  • 3 members: calendar reports 13 members
  • 4 members: calendar reports 14 members
  • 5 members: calendar reports 15 members
  • 6 members: calendar reports 16 members
  • 7 members: calendar reports 17 members
  • 8 members: calendar reports 18 members
  • 9 members: calendar reports 19 members
  • 10 members: calendar reports 110 members

So, from the above list, I assume that the code is adding a 1 to the beginning of the member count number.

Could this help in figuring out where it's going wrong?

rutgerputter avatar Oct 15 '24 11:10 rutgerputter

Any update on this? I’m also affected by this issue (nc 30.0.0, all apps up to date) and would volunteer for testing patches or try out things.

endoflevelboss avatar Nov 17 '24 23:11 endoflevelboss

This issue is still there on NC 30.0.4.1, using:

  • Contacts 6.1.2
  • Contacts Interaction 1.11.0
  • Calendar 5.0.8
  • Teams 30.0.0

After having supplied many logs before, is there any place else I could look for issues or problems?

This is the last bug we need solved to fully adopt Nextcloud for our main groupware solution and we're eager to get started.

rutgerputter avatar Dec 30 '24 08:12 rutgerputter

Tried again with a completely new Team, and tried to invite them to a calendar appointment.

  • Team name: Southpark
  • Members:
    • User: rutger.putter
    • Member: [email protected] (external mail user, does not actually exist)

This were the logs:

{"reqId":"SaXT1iB116MQb5tL87Ak","level":3,"time":"2024-12-30T08:37:11+00:00","remoteAddr":"192.168.1.127","user":"rutger.putter","app":"no app in context","method":"GET","url":"/ocs/v2.php/teams/resources/account/6166f249-7030-4b9c-a7f6-6a20f6299829","message":"No provider found for id account","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","exception":{"Exception":"RuntimeException","Message":"No provider found for id account","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Teams/TeamManager.php","line":91,"function":"getProvider","class":"OC\\Teams\\TeamManager","type":"->","args":["account"]},{"file":"/var/www/html/core/Controller/TeamsApiController.php","line":68,"function":"getTeamsForResource","class":"OC\\Teams\\TeamManager","type":"->","args":["account","6166f249-7030-4b9c-a7f6-6a20f6299829","rutger.putter"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listTeams","class":"OC\\Core\\Controller\\TeamsApiController","type":"->","args":["account","6166f249-7030-4b9c-a7f6-6a20f6299829"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\TeamsApiController"},"listTeams"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\TeamsApiController"},"listTeams"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\TeamsApiController","listTeams",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"providerId":"account","resourceId":"6166f249-7030-4b9c-a7f6-6a20f6299829","_route":"ocs.core.teamsapi.listteams"}]},{"file":"/var/www/html/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/teams/resources/account/6166f249-7030-4b9c-a7f6-6a20f6299829"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Teams/TeamManager.php","Line":65,"message":"No provider found for id account","exception":[],"CustomMessage":"No provider found for id account"},"id":"67725befb6414"}

[calendar] Fout: Could not find user with user [email protected] GET /index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=9RGyTtKWbS6qQMKY1TlI6nVkMjSNmuy from 192.168.1.127 by rutger.putter at 30 dec 2024, 09:37:56

{"reqId":"mMBgfgR4H2vVqyjULTeM","level":3,"time":"2024-12-30T08:37:56+00:00","remoteAddr":"192.168.1.127","user":"rutger.putter","app":"index","method":"GET","url":"/index.php/apps/calendar/v1/circles/getmembers?format=json&circleId=9RGyTtKWbS6qQMKY1TlI6nVkMjSNmuy","message":"Could not find circle member","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.4.1","exception":{"Exception":"OCA\\Calendar\\Service\\ServiceException","Message":"Could not find circle member","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getCircleMembers","class":"OCA\\Calendar\\Controller\\ContactController","type":"->","args":["9RGyTtKWbS6qQMKY1TlI6nVkMjSNmuy"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Calendar\\Controller\\ContactController"},"getCircleMembers"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Calendar\\Controller\\ContactController"},"getCircleMembers"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Calendar\\Controller\\ContactController","getCircleMembers",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"calendar.contact.getcirclemembers"}]},{"file":"/var/www/html/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/calendar/v1/circles/getmembers"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/calendar/lib/Controller/ContactController.php","Line":217,"message":"Could not find circle member","exception":[],"CustomMessage":"Could not find circle member"},"id":"67725befb63a2"}

rutgerputter avatar Dec 30 '24 08:12 rutgerputter

Bumping this again, with a completely updated NC 32 this time, it's still not working. Still giving me a 1 prepended to the amount of members in the team (so a team of 3 will show 13 member) and a Cannot find organizer error when creating the calendar item.

On Nextcloud: 32.0.0 Apps:

  • Calendar 6.0.0
  • Contacts 8.0.2
  • Teams 32.0.0

rutgerputter avatar Sep 28 '25 19:09 rutgerputter