Open ChristophWurst opened 1 year ago
array_intersect
does not like nested array: https://3v4l.org/TYrqn
I just saw the same thing (in 25). I don't see how shares can contain an array itself. :thinking:
This bug prevents certain events from syncing (from Apple devices, mostly fantastical) and had been fixed in early 26 beta but apparently has now been re-introduced. Unfortunate. Any idea on when this is going to be fixed again?
Still seeing this running 27.1.3:
{
"reqId": "[removed]",
"level": 3,
"time": "2023-11-05T17:35:11+00:00",
"remoteAddr": "[removed]",
"user": "[removed]",
"app": "PHP",
"method": "MOVE",
"url": "/remote.php/dav/calendars/[removed]/[removed]/[GUID].ics",
"message": "Array to string conversion at /var/www/path_to_web_root/apps/dav/lib/CalDAV/Activity/Backend.php#561",
"userAgent": "iOS/17.0.3 (21A360) dataaccessd/1.0",
"version": "27.1.3.2",
"data": {
"app": "PHP"
},
"id": "[removed]"
}
What if values are flatten before using the arrays, could this fix it?
$flatten = function ($array) use (&$flatten) {
$result = [];
foreach ($array as $value) {
if (is_array($value)) {
$result = array_merge($result, $flatten($value));
} else {
$result[] = $value;
}
}
return $result;
};
$sourceShares = is_array($sourceShares) ? $flatten($sourceShares) : [];
$targetShares = is_array($targetShares) ? $flatten($targetShares) : [];
Same error on 28.0.2
{
"reqId": "removed",
"level": 3,
"time": "2024-02-21T11:07:11+00:00",
"remoteAddr": "1.1.1.1",
"user": "UserName1",
"app": "PHP",
"method": "MOVE",
"url": "/remote.php/dav/calendars/UserName1/sitzungen_shared_by_UserName2/58B95D5D-32EA-490B-82E1-ADC31B854C3C.ics",
"message": "Array to string conversion at /var/www/nextcloud/apps/dav/lib/CalDAV/Activity/Backend.php#561",
"userAgent": "Mozilla/5.0 (iPad; CPU OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/121.0.6167.171 Mobile/15E148 Safari/604.1",
"version": "28.0.2.5",
"data": {
"app": "PHP"
},
"id": "65defd55416b7"
}
Same solution as used in #43794 should work here (using array_map serialize/unserialize different approach taken in the final merged PR, but same idea). I don't have a test setup for this, so I'll leave trying it to someone that feels like giving it a shot + can also reproduce this situation on-demand.
Still having this problem on 29.0.6
Still having this problem on 29.0.7
Still having this problem on 29.0.7
A thumbs up / upvote on the initial issue is sufficient, unless you have new information to add. If the Issue is still open (like this one), it's assumed it still applies to all current releases already. :)
Also on my instance 30.0.1
What about a fix or update?
This bug prevents certain events from syncing (from Apple devices, mostly fantastical) and had been fixed in early 26 beta but apparently has now been re-introduced. Unfortunate. Any idea on when this is going to be fixed again?
We actually have some events not syncing only on some users' Iphones. Could you please develop your observations. It could help us to figure out what happened to these events. The Array to string error throws every time we move an event from a calendar to another. But there is no evident correlation between moved events and missing events on Iphones.
I have this problem too. I just updated to 30.0.2. I will observe this problem ...
{
"reqId": "removed",
"level": 3,
"time": "2024-11-05T05:39:20+00:00",
"remoteAddr": "IP",
"user": "user.name",
"app": "PHP",
"method": "MOVE",
"url": "/remote.php/dav/calendars/user.name/personal/A2829EA6-94ED-4E01-8FAD-D1879CAA78BF.ics",
"message": "Array to string conversion at /var/www/nextcloud/apps/dav/lib/CalDAV/Activity/Backend.php#541",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0",
"version": "30.0.1.2",
"data": {
"app": "PHP"
},
"id": "..."
}
Hello, Also got this error here, nextcloud server Nextcloud Hub 9 (30.0.2) Client is on a Android phone syncing with calDav
[PHP] Error: Array to string conversion at /var/www/html/apps/dav/lib/CalDAV/Activity/Backend.php#541
MOVE /remote.php/dav/calendars/---/personal/F3D54AEF-000-4D86-BB5A-D********75FAE.ics
from 192.168.1.254 by *** at Nov 13, 2024, 10:13:11 PM
Yes, i also Updated to 30.0.2, Same Problem. Also fresh/new Installation in my testing environment.
Ist’s clear, that this is a bug.
So please dear developers clear this Problem.
Thanks a lot
I know this does not help most of you guys, but I can only say that the issue is gone for me.
I updated to 30.0.2, reconfigured my NGINX reverse proxy to include this
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
and also installed the calender via profiles on my iPhone. Works perfect and nothing in the logs.
⚠️ This issue respects the following points: ⚠️
Bug description
Array to string conversion at https://github.com/nextcloud/server/blob/v26.0.0rc1/apps/dav/lib/CalDAV/Activity/Backend.php#L561
https://github.com/nextcloud/server/blob/6466c8ee31f3b30b8710c91c05d4b88d1d7ef086/apps/dav/lib/CalDAV/Activity/Backend.php#L561
Steps to reproduce
Expected behavior
No errors
Installation method
None
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
No response