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]: NC28 CalDAV Exceptions when opening Calendar app #42464

Closed
5 of 8 tasks
cvandesande opened this issue Dec 23, 2023 · 21 comments · Fixed by #42696 · May be fixed by #42763
Closed
5 of 8 tasks

[Bug]: NC28 CalDAV Exceptions when opening Calendar app #42464

cvandesande opened this issue Dec 23, 2023 · 21 comments · Fixed by #42696 · May be fixed by #42763
Labels
1. to develop Accepted and waiting to be taken care of 3. to review Waiting for reviews 28-feedback bug feature: caldav Related to CalDAV internals feature: status regression

Comments

@cvandesande
Copy link

cvandesande commented Dec 23, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrading NC 28.0.0 --> 28.0.1 I have exception errors in the logs happening every few seconds. They seem to be created when opening the Nextcloud calendar

{
  "reqId": "saO3VlZmWizio97EvHnQ",
  "level": 3,
  "time": "2023-12-23T01:44:25+00:00",
  "remoteAddr": "192.168.9.3",
  "user": "cvandesande",
  "app": "no app in context",
  "method": "PUT",
  "url": "/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json",
  "message": "Exception thrown: Exception",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0",
  "version": "28.0.1.1",
  "exception": {
    "Exception": "Exception",
    "Message": "Call to a member function getTimestamp() on array in file '/usr/share/nginx/html/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php' line 105",
    "Code": 0,
    "Trace": [
      {
        "file": "/usr/share/nginx/html/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\UserStatus\\Controller\\HeartbeatController"
          ],
          "heartbeat"
        ]
      },
      {
        "file": "/usr/share/nginx/html/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\UserStatus\\Controller\\HeartbeatController",
          "heartbeat",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "ocs.user_status.Heartbeat.heartbeat"
          ]
        ]
      },
      {
        "file": "/usr/share/nginx/html/nextcloud/ocs/v1.php",
        "line": 65,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/user_status/api/v1/heartbeat"
        ]
      },
      {
        "file": "/usr/share/nginx/html/nextcloud/ocs/v2.php",
        "line": 23,
        "args": [
          "/usr/share/nginx/html/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/usr/share/nginx/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 169,
    "Previous": {
      "Exception": "Error",
      "Message": "Call to a member function getTimestamp() on array",
      "Code": 0,
      "Trace": [
        {
          "function": "OCA\\DAV\\CalDAV\\Status\\{closure}",
          "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
          "line": 97,
          "function": "array_filter",
          "args": [
            [
              [
                4885,
                "VEVENT",
                "99583777-273b-4901-bfc7-0f0d20164cc5",
                "99583777-273b-4901-bfc7-0f0d20164cc5.ics",
                [
                  [
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "99583777-273b-4901-bfc7-0f0d20164cc5",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "L&L visit mom",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "CONFIRMED",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ]
                  ]
                ],
                [],
                "3"
              ],
              [
                4882,
                "VEVENT",
                "4f28d41f-c198-44e0-a7d0-6eb4b73eeae8",
                "4f28d41f-c198-44e0-a7d0-6eb4b73eeae8.ics",
                [
                  [
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "4f28d41f-c198-44e0-a7d0-6eb4b73eeae8",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "Vacation",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ],
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "CONFIRMED",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ],
                    [
                      "TRANSPARENT",
                      [
                        "Encoding skipped as the maximum nesting level was reached"
                      ]
                    ]
                  ]
                ],
                [],
                "3"
              ]
            ],
            [
              "Closure"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/apps/user_status/lib/Listener/UserLiveStatusListener.php",
          "line": 70,
          "function": "processCalendarStatus",
          "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
          "type": "->",
          "args": [
            "cvandesande"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
          "line": 86,
          "function": "handle",
          "class": "OCA\\UserStatus\\Listener\\UserLiveStatusListener",
          "type": "->",
          "args": [
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 230,
          "function": "__invoke",
          "class": "OC\\EventDispatcher\\ServiceEventListener",
          "type": "->",
          "args": [
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ],
            "OCP\\User\\Events\\UserLiveStatusEvent",
            [
              "Symfony\\Component\\EventDispatcher\\EventDispatcher"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 59,
          "function": "callListeners",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              [
                "Closure"
              ]
            ],
            "OCP\\User\\Events\\UserLiveStatusEvent",
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 94,
          "function": "dispatch",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ],
            "OCP\\User\\Events\\UserLiveStatusEvent"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 106,
          "function": "dispatch",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            "OCP\\User\\Events\\UserLiveStatusEvent",
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/apps/user_status/lib/Controller/HeartbeatController.php",
          "line": 100,
          "function": "dispatchTyped",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              "OCP\\User\\Events\\UserLiveStatusEvent"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "heartbeat",
          "class": "OCA\\UserStatus\\Controller\\HeartbeatController",
          "type": "->",
          "args": [
            "online"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\UserStatus\\Controller\\HeartbeatController"
            ],
            "heartbeat"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\UserStatus\\Controller\\HeartbeatController"
            ],
            "heartbeat"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\UserStatus\\Controller\\HeartbeatController",
            "heartbeat",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "ocs.user_status.Heartbeat.heartbeat"
            ]
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/ocs/v1.php",
          "line": 65,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/apps/user_status/api/v1/heartbeat"
          ]
        },
        {
          "file": "/usr/share/nginx/html/nextcloud/ocs/v2.php",
          "line": 23,
          "args": [
            "/usr/share/nginx/html/nextcloud/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/usr/share/nginx/html/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
      "Line": 105
    },
    "CustomMessage": "Exception thrown: Exception"
  }
}

Steps to reproduce

  1. Upgrade to NC 28.0.1
  2. Open Calendar
  3. Check logs

Expected behavior

No exception errors

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Other

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?

Updated from a MINOR version (ex. 22.1 to 22.2)

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

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "nextcloud"
        ],
        "apps_paths": [
            {
                "path": "\/usr\/share\/nginx\/html\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/usr\/share\/nginx\/html\/nextcloud\/custom-apps",
                "url": "\/custom-apps",
                "writable": true
            }
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "28.0.1.1",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR",
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR"
        ],
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "loglevel": 0,
        "maintenance": false,
        "enable_previews": false,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "filesystem_check_changes": 1,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0
        },
        "trashbin_retention_obligation": "auto",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "ssl",
        "theme": "",
        "app_install_overwrite": [
            "joplin"
        ],
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "default_language": "en",
        "default_phone_region": "CA"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.1
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.0
  - contactsinteraction: 1.9.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.1
  - notifications: 2.16.0
  - notify_push: 0.6.6
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_nextcloud_notification: 3.8.0
  - twofactor_totp: 10.0.0-beta.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - circles: 28.0.0-dev (installed 0.15.2)
  - dashboard: 7.8.0 (installed 7.0.0)
  - encryption: 2.16.0 (installed 2.5.0)
  - files_external: 1.20.0 (installed 1.4.1)
  - files_pdfviewer: 2.9.0 (installed 1.2.1)
  - files_rightclick: 0.15.1 (installed 1.4.0)
  - photos: 2.4.0 (installed 1.3.0)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

@cvandesande cvandesande added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 23, 2023
@joshtrichards joshtrichards added feature: caldav Related to CalDAV internals 28-feedback labels Dec 23, 2023
@joshtrichards
Copy link
Member

Cc: @miaulalala

@kristofejro
Copy link

I am in simillar situation and experiencing such errors in the log file.

@LordSimal
Copy link

As far as I was able to debug this it seems, that the components returned from the calendarManager seem to return just an array shaped like a DateTimeImmutable instead of a DateTimeImmutable object directly.

So it looks something like this

Array
(
    [date] => 2023-12-26 00:00:00.000000
    [timezone_type] => 3
    [timezone] => UTC
)

instead of

DateTimeImmutable Object
(
    [date] => 2023-12-26 00:00:00.000000
    [timezone_type] => 3
    [timezone] => UTC
)

When doing

$dateTime = $component['DTSTART'][0];
$this->logger->error(print_r($dateTime, true));

inside apps/dav/lib/CalDAV/Status/StatusService.php


Looking at the inline code annotation it seems that this was previously a DateTimeImmutable object.
https://github.com/nextcloud/server/blob/v28.0.1/apps/dav/lib/CalDAV/Status/StatusService.php#L103-L104

My guess is that something is array casting the object or its wrapper.

@marleup
Copy link

marleup commented Dec 29, 2023

I have exact the same exception every minute in the protocol since I have upgraded PHP from 8.1 to 8.3. Before I updated to Nextcloud 28.0.1, but this alone didn't showed up this exception.
My setup differs from issue description as I use apache2 instead of Nginx and MariaDB instead of PostgresSQL.
I assume in my case the exception is triggered by the periodic calendar synchronization over CalDAV with my different calendar clients (DAVx5 Android and Thunderbird on Laptop) as I see it independent of using the Nextcloud calendar app.

@marleup
Copy link

marleup commented Dec 29, 2023

Inspired by the debugging of @LordSimal I changed the line 104 inside apps/dav/lib/CalDAV/Status/StatusService.php from:

$dateTime = $component['DTSTART'][0];

to:

if(is_array($component['DTSTART'][0])) {
        $dateTime = DateTimeImmutable::__set_state($component['DTSTART'][0]);
} else {
        $dateTime = $component['DTSTART'][0];
}

and the exception disappeared completely. The "if" was necessary as I got an exception the other way around when I added only the __set_state to get a DateTimeImmutable object. I got the new exception much less often and it complained that __set_state expects an array but a DateTimeImmutable object was given.
So it looks like there is a mess in the calendar events list, as some are stored as array and others as DateTimeImmutable. I don't know if the mess is in the database or somewhere in the code that fills the PHP arrays.
I hope this helps narrow down the cause of this mess and fixing this properly, as my local fix looks like a very dirty workaround.

@gxpcluster
Copy link

I have the same issue and posted debug information here.
Due to this error, Nextcloud Talk stopped working on all my phones.

@joshtrichards
Copy link
Member

joshtrichards commented Jan 8, 2024

The PR in #42464 #42619 may fix this issue. Care to test?

@joshtrichards
Copy link
Member

Oops #42619 :)

@ChristophWurst ChristophWurst added regression 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 8, 2024
@ChristophWurst
Copy link
Member

"99583777-273b-4901-bfc7-0f0d20164cc5.ics"

@cvandesande could you locate the event from your oc_calendarobjects database table by uri and inspect the DTSTART components(s) of the calendardata column?

That will help reproducing the bug locally.

@cvandesande
Copy link
Author

@ChristophWurst Sure,

-[ RECORD 1 ]------------------------------------------------------
encode | BEGIN:VCALENDAR\r                                         +
       | VERSION:2.0\r                                             +
       | PRODID:DAVx5/4.3.11-ose ical4j/3.2.13 (org.calyxos.etar)\r+
       | BEGIN:VEVENT\r                                            +
       | DTSTAMP:20231220T154443Z\r                                +
       | UID:99583777-273b-4901-bfc7-0f0d20164cc5\r                +
       | SUMMARY:L&L visit mom\r                                   +
       | DTSTART;VALUE=DATE:20231223\r                             +
       | DTEND;VALUE=DATE:20231224\r                               +
       | STATUS:CONFIRMED\r                                        +
       | BEGIN:VALARM\r                                            +
       | TRIGGER:-PT10M\r                                          +
       | ACTION:DISPLAY\r                                          +
       | DESCRIPTION:L&L visit mom\r                               +
       | END:VALARM\r                                              +
       | END:VEVENT\r                                              +
       | END:VCALENDAR\r                                           +
       | 

@cvandesande
Copy link
Author

For the record, the errors seemed to have stopped on their own. I did update to Calendar 4.6.2 but I think the errors stopped before that.

At the moment, I can no longer reproduce this issue. I can close it, unless someone has more questions for me

@LordSimal
Copy link

LordSimal commented Jan 8, 2024

I can also confirm that I am unable to reproduce the error any more for an unknown reason.
It just stopped like a few hours ago because my last log entry is at 2024-01-08T19:30:18+00:00 but I didn't do anything there...

@tchernobog
Copy link

The last occurrence of this bug in the logs for me is at "time":"2024-01-06T00:03:58+00:00". Then nothing in the last couple of days. I would maybe wait a bit before closing.

@tchernobog
Copy link

I am still getting exceptions:

{
    "reqId": "9ZEz73VRiEnulSDA57d2",
    "level": 3,
    "time": "2024-01-09T12:47:56+00:00",
    "remoteAddr": "2001:9e8:18fb:5a00:18e:a3ea:c7c8:ea",
    "user": "matteo",
    "app": "no app in context",
    "method": "GET",
    "url": "/ocs/v2.php/apps/user_status/api/v1/user_status?format=json",
    "message": "Exception thrown: Exception",
    "userAgent": "Mozilla/5.0 (Linux) mirall/3.11.0git (Nextcloud, debian-6.6.9-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
    "version": "28.0.1.1",
    "exception": {
        "Exception": "Exception",
        "Message": "Call to a member function getTimestamp() on array in file '/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php' line 105",
        "Code": 0,
        "Trace": [
            {
                "file": "/var/www/montecristosoftware/nextcloud/lib/private/AppFramework/App.php",
                "line": 184,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/lib/private/Route/Router.php",
                "line": 315,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/ocs/v1.php",
                "line": 65,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->"
            },
            {
                "file": "/var/www/montecristosoftware/nextcloud/ocs/v2.php",
                "line": 23,
                "args": [
                    "/var/www/montecristosoftware/nextcloud/ocs/v1.php"
                ],
                "function": "require_once"
            }
        ],
        "File": "/var/www/montecristosoftware/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "Line": 169,
        "Previous": {
            "Exception": "Error",
            "Message": "Call to a member function getTimestamp() on array",
            "Code": 0,
            "Trace": [
                {
                    "function": "OCA\\DAV\\CalDAV\\Status\\{closure}",
                    "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
                    "type": "->",
                    "args": [
                        "*** sensitive parameters replaced ***"
                    ]
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
                    "line": 97,
                    "function": "array_filter"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/apps/user_status/lib/Controller/UserStatusController.php",
                    "line": 76,
                    "function": "processCalendarStatus",
                    "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
                    "type": "->"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 230,
                    "function": "getStatus",
                    "class": "OCA\\UserStatus\\Controller\\UserStatusController",
                    "type": "->"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 137,
                    "function": "executeController",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/lib/private/AppFramework/App.php",
                    "line": 184,
                    "function": "dispatch",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/lib/private/Route/Router.php",
                    "line": 315,
                    "function": "main",
                    "class": "OC\\AppFramework\\App",
                    "type": "::"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/ocs/v1.php",
                    "line": 65,
                    "function": "match",
                    "class": "OC\\Route\\Router",
                    "type": "->"
                },
                {
                    "file": "/var/www/montecristosoftware/nextcloud/ocs/v2.php",
                    "line": 23,
                    "args": [
                        "/var/www/montecristosoftware/nextcloud/ocs/v1.php"
                    ],
                    "function": "require_once"
                }
            ],
            "File": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
            "Line": 105
        },
        "CustomMessage": "Exception thrown: Exception"
    }
}

tcitworld added a commit that referenced this issue Jan 11, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@tcitworld
Copy link
Member

@tchernobog if you mind trying to patch #42696 to see if this helps…

@ChristophWurst ChristophWurst added the 3. to review Waiting for reviews label Jan 11, 2024
@ChristophWurst ChristophWurst moved this from 📄 To do to 🏗️ In progress in 💌 📅 👥 Groupware team Jan 11, 2024
@tchernobog
Copy link

tchernobog commented Jan 14, 2024

@tchernobog if you mind trying to patch #42696 to see if this helps…

Seems it does silence the error from the logs, however the calendar contents still do not show up in the calendar web app.

EDIT: this might be caused by a different bug though, about a missing SSL CA bundle:

{
  "reqId": "vCVukZ17dvjTtIITYdCO",
  "level": 2,
  "time": "2024-01-14T17:16:33+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "dav",
  "method": "",
  "url": "--",
  "message": "Subscription 17 could not be refreshed due to a network error",
  "userAgent": "--",
  "version": "28.0.1.1",
  "exception": {
    "Exception": "InvalidArgumentException",
    "Message": "SSL CA bundle not found: /tmp/oc_tmp_mFeJxo-.crt",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
        "line": 59,
        "function": "applyHandlerOptions",
        "class": "GuzzleHttp\\Handler\\CurlFactory",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php",
        "line": 43,
        "function": "create",
        "class": "GuzzleHttp\\Handler\\CurlFactory",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
        "line": 28,
        "function": "__invoke",
        "class": "GuzzleHttp\\Handler\\CurlHandler",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
        "line": 48,
        "function": "GuzzleHttp\\Handler\\{closure}",
        "class": "GuzzleHttp\\Handler\\Proxy",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 256,
        "function": "GuzzleHttp\\Handler\\{closure}",
        "class": "GuzzleHttp\\Handler\\Proxy",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 240,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php",
        "line": 35,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 31,
        "function": "__invoke",
        "class": "GuzzleHttp\\PrepareBodyMiddleware",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php",
        "line": 71,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 63,
        "function": "__invoke",
        "class": "GuzzleHttp\\RedirectMiddleware",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php",
        "line": 75,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 331,
        "function": "__invoke",
        "class": "GuzzleHttp\\HandlerStack",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 168,
        "function": "transfer",
        "class": "GuzzleHttp\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 187,
        "function": "requestAsync",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/lib/private/Http/Client/Client.php",
        "line": 230,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
        "line": 214,
        "function": "get",
        "class": "OC\\Http\\Client\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
        "line": 86,
        "function": "queryWebcalFeed",
        "class": "OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
        "line": 115,
        "function": "refreshSubscription",
        "class": "OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/lib/public/BackgroundJob/Job.php",
        "line": 81,
        "function": "run",
        "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/lib/public/BackgroundJob/Job.php",
        "line": 67,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php",
        "line": 108,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/montecristosoftware/nextcloud/cron.php",
        "line": 152,
        "function": "execute",
        "class": "OCA\\DAV\\BackgroundJob\\RefreshWebcalJob",
        "type": "->"
      }
    ],
    "File": "/var/www/montecristosoftware/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
    "Line": 363,
    "message": "Subscription 17 could not be refreshed due to a network error",
    "exception": [],
    "CustomMessage": "Subscription 17 could not be refreshed due to a network error"
  },
  "id": "65a418667db00"
}

It seems there are a few other instances of similar problems, I am wondering what the root cause is:

@tcitworld
Copy link
Member

tcitworld commented Jan 14, 2024

@tchernobog Do you mind creating a new issue about this? Please tell in this new issue if you have the files_external app activated or/and if you are using S3.

@mattc-solutions
Copy link

mattc-solutions commented Jan 18, 2024

@tchernobog if you mind trying to patch #42696 to see if this helps…

@tcitworld I'm not the user you are addressing but I'm also still encountering the error. I've applied the patch and will report the results tomorrow.

@mattc-solutions
Copy link

I can confirm that applying that the patch stopped the generation of those exception logs for me.

@m-i-k-e-y
Copy link

m-i-k-e-y commented Jan 24, 2024

I was encountering this issue, too, every time I logged in into the web interface and the same error was logged ever few seconds as long as I was logged in.

After applying fix from #42696, the error is not logged anymore.

However, this comment from the fix is a bit troubling:

For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

tcitworld added a commit that referenced this issue Feb 1, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
miaulalala pushed a commit that referenced this issue Feb 2, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Feb 2, 2024
backportbot bot pushed a commit that referenced this issue Feb 2, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
susnux pushed a commit that referenced this issue Feb 3, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
JuliaKirschenheuter pushed a commit that referenced this issue Feb 5, 2024
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable

Closes #42464

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@pajades
Copy link

pajades commented Feb 7, 2024

Applying the code replacement noted by @marleup (#42464 (comment)) worked for me.
However, after the 4.6.4 update, this error reappeared.
Applying the code replacement a second time stopped the incessant errors again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 3. to review Waiting for reviews 28-feedback bug feature: caldav Related to CalDAV internals feature: status regression
Projects