-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Comments
Cc: @miaulalala |
I am in simillar situation and experiencing such errors in the log file. |
As far as I was able to debug this it seems, that the components returned from the So it looks something like this
instead of
When doing
inside Looking at the inline code annotation it seems that this was previously a DateTimeImmutable object. My guess is that something is array casting the object or its wrapper. |
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. |
Inspired by the debugging of @LordSimal I changed the line 104 inside
to:
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. |
I have the same issue and posted debug information here. |
Oops #42619 :) |
@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. |
@ChristophWurst Sure,
|
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 |
I can also confirm that I am unable to reproduce the error any more for an unknown reason. |
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. |
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"
}
} |
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
@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: |
@tchernobog Do you mind creating a new issue about this? Please tell in this new issue if you have the |
@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. |
I can confirm that applying that the patch stopped the generation of those exception logs for me. |
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 Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <[email protected]>
Applying the code replacement noted by @marleup (#42464 (comment)) worked for me. |
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
Steps to reproduce
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?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: