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

[Bug]: caldav sync issue #48707

Open
5 of 8 tasks
megheaiulian opened this issue Oct 15, 2024 · 5 comments · May be fixed by #48723
Open
5 of 8 tasks

[Bug]: caldav sync issue #48707

megheaiulian opened this issue Oct 15, 2024 · 5 comments · May be fixed by #48723
Assignees
Labels
3. to review Waiting for reviews 30-feedback bug feature: caldav Related to CalDAV internals

Comments

@megheaiulian
Copy link

megheaiulian commented Oct 15, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

{
  "reqId": "j3ZoR3Szd3LwoUGujGmj",
  "level": 3,
  "time": "2024-10-15T07:35:06+00:00",
  "remoteAddr": "3.143.247.3",
  "app": "webdav",
  "method": "PUT",
  "url": "/remote.php/dav/calendars/:id/personal/:anotherid.ics",
  "message": "see below",
  "userAgent": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
  "version": "30.0.0.14"
}
{
  "Exception": "TypeError",
  "Message": "Cannot assign DateInterval to property OCA\\DAV\\CalDAV\\EventReader::$baseEventDuration of type int",
  "Code": 0,
  "Trace": [
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/lib/CalDAV/Schedule/IMipService.php",
      "line": 140,
      "function": "__construct",
      "class": "OCA\\DAV\\CalDAV\\EventReader",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php",
      "line": 210,
      "function": "buildBodyData",
      "class": "OCA\\DAV\\CalDAV\\Schedule\\IMipService",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
      "line": 89,
      "function": "schedule",
      "class": "OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php",
      "line": 350,
      "function": "emit",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php",
      "line": 626,
      "function": "deliver",
      "class": "Sabre\\CalDAV\\Schedule\\Plugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/lib/CalDAV/Schedule/Plugin.php",
      "line": 190,
      "function": "processICalendarChange",
      "class": "Sabre\\CalDAV\\Schedule\\Plugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
      "line": 89,
      "function": "calendarObjectChange",
      "class": "OCA\\DAV\\CalDAV\\Schedule\\Plugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/CalDAV/Plugin.php",
      "line": 889,
      "function": "emit",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/CalDAV/Plugin.php",
      "line": 760,
      "function": "validateICalendar",
      "class": "Sabre\\CalDAV\\Plugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
      "line": 89,
      "function": "beforeCreateFile",
      "class": "Sabre\\CalDAV\\Plugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/DAV/Server.php",
      "line": 1094,
      "function": "emit",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
      "line": 504,
      "function": "createFile",
      "class": "Sabre\\DAV\\Server",
      "type": "->",
      "args": [
        "*** sensitive parameters replaced ***"
      ]
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
      "line": 89,
      "function": "httpPut",
      "class": "Sabre\\DAV\\CorePlugin",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/DAV/Server.php",
      "line": 472,
      "function": "emit",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/3rdparty/sabre/dav/lib/DAV/Server.php",
      "line": 253,
      "function": "invokeMethod",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/lib/Server.php",
      "line": 370,
      "function": "start",
      "class": "Sabre\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/appinfo/v2/remote.php",
      "line": 19,
      "function": "exec",
      "class": "OCA\\DAV\\Server",
      "type": "->"
    },
    {
      "file": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/remote.php",
      "line": 146,
      "args": [
        "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/appinfo/v2/remote.php"
      ],
      "function": "require_once"
    }
  ],
  "File": "/nix/store/76rw8qyj9sspwr3yazkv1jsmq34x6yg3-nextcloud-30.0.0/apps/dav/lib/CalDAV/EventReader.php",
  "Line": 176,
  "message": "Cannot assign DateInterval to property OCA\\DAV\\CalDAV\\EventReader::$baseEventDuration of type int",
  "exception": {},
  "CustomMessage": "Cannot assign DateInterval to property OCA\\DAV\\CalDAV\\EventReader::$baseEventDuration of type int"
}

Steps to reproduce

cal.com fails to sync event via calddav

Expected behavior

cal.com fails to sync event via calddav

Nextcloud Server version

30

Operating system

Other

PHP engine version

None

Web server

Nginx

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

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

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@megheaiulian megheaiulian added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 15, 2024
@kesselb
Copy link
Contributor

kesselb commented Oct 15, 2024

@joshtrichards joshtrichards added the feature: caldav Related to CalDAV internals label Oct 15, 2024
@SebastianKrupinski SebastianKrupinski self-assigned this Oct 15, 2024
@SebastianKrupinski
Copy link
Contributor

@megheaiulian Can you post the original event. Once I have that I can fix the issue this week.

@megheaiulian
Copy link
Author

megheaiulian commented Oct 16, 2024

Unfortunately I do not have the original event. This error shows up when syncing a cal.com (https://github.com/calcom/cal.com) event with the Nextcloud server via webdav.

@st3iny
Copy link
Member

st3iny commented Oct 16, 2024

@SebastianKrupinski The error is right here:

$this->baseEventDuration = $this->baseEvent->DURATION->getDateInterval();

The call to $this->baseEvent->DURATION->getDateInterval() returns an instance of DateInterval but $this->baseEventDuration is an int.

@st3iny st3iny linked a pull request Oct 16, 2024 that will close this issue
4 tasks
@st3iny st3iny self-assigned this Oct 16, 2024
@st3iny st3iny added 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Oct 16, 2024
@SebastianKrupinski
Copy link
Contributor

The call to $this->baseEvent->DURATION->getDateInterval() returns an instance of DateInterval but $this->baseEventDuration is an int.

@st3iny yes I saw that and made a fix for it, but wanted to see the original event to make sure there are no other issues. Thank you for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews 30-feedback bug feature: caldav Related to CalDAV internals
Projects
Status: 🏗️ In progress
Development

Successfully merging a pull request may close this issue.

6 participants