Skip to content

[Bug]: Error when trying to unshare calendar shared by circle: An error occurred, unable to delete the calendar. #44677

Open
@marzzzello

Description

⚠️ This issue respects the following points: ⚠️

Bug description

I want to unshare a calendar that got shared by me via a circle.
After clicking Unshare from me noting happens and after about 8 seconds an error message appears saying An error occurred, unable to delete the calendar.

Steps to reproduce

  1. Login as user1
  2. Create a new circle with user1 and user2
  3. Create a new calendar and share calendar with created circle
  4. Login as user2 and try to unshare the calendar

Expected behavior

Calendar should be unshared

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "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
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "1": "cloud.domain.tld",
            "2": "nextcloud-web"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "28.0.4.1",
        "overwrite.cli.url": "https:\/\/cloud.domain.tld",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "overwritehost": "cloud.domain.tld",
        "check_data_directory_permissions": false,
        "skeletondirectory": "",
        "maintenance": false,
        "loglevel": "0",
        "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",
            "7": "OC\\Preview\\Krita"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Mit mir geteilt",
        "files_external_allow_create_new_local": false,
        "allow_local_remote_servers": true,
        "auth.webauthn.enabled": false,
        "default_language": "de",
        "updater.release.channel": "stable",
        "default_phone_region": "DE",
        "defaultapp": "calendar"
    }
}

List of activated Apps

  - activity: 2.20.0
  - admin_audit: 1.18.0
  - appointments: 2.0.4
  - calendar: 4.6.7
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.2
  - drawio: 3.0.2
  - drop_account: 2.5.0
  - external: 5.3.1
  - federatedfilesharing: 1.18.0
  - files: 2.0.0
  - files_fulltextsearch: 28.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - forms: 4.1.1
  - fulltextsearch: 28.0.1
  - fulltextsearch_elasticsearch: 28.0.1
  - group_default_quota: 0.1.8
  - group_everyone: 0.1.15
  - groupfolders: 16.0.6
  - groupquota: 0.1.13
  - impersonate: 1.15.0
  - integration_miro: 1.0.4
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - notifications: 2.16.0
  - notify_push: 0.6.10
  - oauth2: 1.16.3
  - onlyoffice: 9.0.0
  - provisioning_api: 1.18.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.3
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sociallogin: 5.6.4
  - spreed: 18.0.6
  - support: 1.11.1
  - text: 3.9.1
  - theming: 2.3.0
  - theming_customcss: 1.15.0
  - twofactor_backupcodes: 1.17.0
  - uppush: 1.4.3
  - viewer: 2.2.0
  - workflowengine: 2.10.0

Nextcloud Signing status

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- INVALID_HASH
		- core/js/mimetypelist.js
	- EXTRA_FILE
		- core/img/filetypes/drawio.svg
		- core/img/filetypes/dwb.svg

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/mimetypelist.js] => Array
                        (
                            [expected] => 550ab566d30693bfa24ec4b15d9df87731ae8a3be8f79dabf94757e5b8b20eec6e4b678f17af1718297f2872f6b04519eeb024d1dff11947f29da431c7f11201
                            [current] => 301654cbbe168b8723530db88fd2e40ad688f4e6b0bdaeade5b4fe34bd94d9d3cfe760821e97dc792e585d4b6ccff838597bfd46466bb07d30ff84df4cb79518
                        )

                )

            [EXTRA_FILE] => Array
                (
                    [core/img/filetypes/drawio.svg] => Array
                        (
                            [expected] => 
                            [current] => 92e0974cf869bf8ab969c3442dc2b80d55fde36441d22924db74916a06b407520aa2a9dc39336f9157195ebede697ffac0e639360879255ab91932d406e1897d
                        )

                    [core/img/filetypes/dwb.svg] => Array
                        (
                            [expected] => 
                            [current] => 43731dd5f17a048112ea5109b40b02ec019b3ee2324385a0f448e3bd2264cb13dc160ab018d893f92f8e2f168fd09009b51578c8c6b97a02a1617c67ac087701
                        )

                )

        )

)

Nextcloud Logs

{
    "reqId": "0WkrOnEljfyCv2mMu8f2",
    "level": 0,
    "time": "2024-04-05T12:17:59+00:00",
    "remoteAddr": "x.x.x.x",
    "user": "Keycloak-123-me",
    "app": "webdav",
    "method": "DELETE",
    "url": "/remote.php/dav/calendars/Keycloak-123-me/test-calbug_shared_by_Keycloak-456-notme/",
    "message": "Exception thrown: Sabre\\DAV\\Exception\\Forbidden",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; rv:124.0) Gecko/20100101 Firefox/124.0",
    "version": "28.0.4.1",
    "exception": {
        "Exception": "Sabre\\DAV\\Exception\\Forbidden",
        "Message": "",
        "Code": 0,
        "Trace": [
            {
                "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
                "line": 197,
                "function": "delete",
                "class": "OCA\\DAV\\CalDAV\\Calendar",
                "type": "->",
                "args": []
            },
            {
                "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
                "line": 281,
                "function": "delete",
                "class": "Sabre\\DAV\\Tree",
                "type": "->",
                "args": [
                    "calendars/Keycloak-123-me/test-calbug_shared_by_Keycloak-456-notme"
                ]
            },
            {
                "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
                "line": 89,
                "function": "httpDelete",
                "class": "Sabre\\DAV\\CorePlugin",
                "type": "->",
                "args": [
                    [
                        "Sabre\\HTTP\\Request"
                    ],
                    [
                        "Sabre\\HTTP\\Response"
                    ]
                ]
            },
            {
                "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
                "line": 472,
                "function": "emit",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args": [
                    "method:DELETE",
                    [
                        [
                            "Sabre\\HTTP\\Request"
                        ],
                        [
                            "Sabre\\HTTP\\Response"
                        ]
                    ]
                ]
            },
            {
                "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
                "line": 253,
                "function": "invokeMethod",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args": [
                    [
                        "Sabre\\HTTP\\Request"
                    ],
                    [
                        "Sabre\\HTTP\\Response"
                    ]
                ]
            },
            {
                "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
                "line": 321,
                "function": "start",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args": []
            },
            {
                "file": "/var/www/html/apps/dav/lib/Server.php",
                "line": 373,
                "function": "exec",
                "class": "Sabre\\DAV\\Server",
                "type": "->",
                "args": []
            },
            {
                "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
                "line": 35,
                "function": "exec",
                "class": "OCA\\DAV\\Server",
                "type": "->",
                "args": []
            },
            {
                "file": "/var/www/html/remote.php",
                "line": 172,
                "args": [
                    "/var/www/html/apps/dav/appinfo/v2/remote.php"
                ],
                "function": "require_once"
            }
        ],
        "File": "/var/www/html/apps/dav/lib/CalDAV/Calendar.php",
        "Line": 244,
        "message": "",
        "exception": {},
        "CustomMessage": "Exception thrown: Sabre\\DAV\\Exception\\Forbidden"
    }
}

Additional info

Bug appears on latest v27 and v28.

The delete requests needs a few seconds to return this 403 response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
  <s:message/>
</d:error>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions