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

Can not remove object : Error 500 #138

Closed
dominiquefournier opened this issue Jan 31, 2024 · 10 comments
Closed

Can not remove object : Error 500 #138

dominiquefournier opened this issue Jan 31, 2024 · 10 comments
Labels
dependency bug Bug linked to a dependency needs info This issue / PR needs more info

Comments

@dominiquefournier
Copy link

I just try to remove an object and the error raised :
[2024-01-31T09:10:32.577610+01:00] app.ERROR: [500]: TypeError - Sabre\Uri\parse(): Argument #1 ($uri) must be of type string, null given, called in /data/home/cal/davis/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php on line 299 [{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php","line":299,"function":"Sabre\\Uri\\parse"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAVACL/AbstractPrincipalCollection.php","line":176,"function":"findByUri","class":"Sabre\\DAVACL\\PrincipalBackend\\PDO","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAVACL/Plugin.php","line":697,"function":"findByUri","class":"Sabre\\DAVACL\\AbstractPrincipalCollection","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":417,"function":"getPrincipalByUri","class":"Sabre\\DAVACL\\Plugin","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"scheduleLocalDelivery","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":350,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":396,"function":"deliver","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeUnbind","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAV/CorePlugin.php","line":278,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpDelete","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/home/cal/davis/vendor/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/home/cal/davis/src/Controller/DAVController.php","line":329,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/home/cal/davis/vendor/symfony/http-kernel/HttpKernel.php","line":163,"function":"dav","class":"App\\Controller\\DAVController","type":"->"},{"file":"/data/home/cal/davis/vendor/symfony/http-kernel/HttpKernel.php","line":75,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/data/home/cal/davis/vendor/symfony/http-kernel/Kernel.php","line":202,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/data/home/cal/davis/public/index.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}] []

Thunderbird display an error regulary caused by the error code 500.

How can I solve this ?
Davis Version 4.4.1, MySQL Database, PHP8.2 FPM on Nginx server

Thanks

@tchapi
Copy link
Owner

tchapi commented Jan 31, 2024

Hello

I just try to remove an object and the error raised

Which object? How do you remove it?

Looks similar to sabre-io/Baikal#1147, so probably something in sabre/dav directly IMO

@dominiquefournier
Copy link
Author

It was a calendar event. I try to delete it from Thunderbird. I am agree with you, the case looks like the provided link. But how should I solve it ? Thunderbird display the error popup regularly, because it tries to redo the action.

@tchapi
Copy link
Owner

tchapi commented Feb 1, 2024

I can't reproduce on macOS calendar on my side (I don't use Thunderbird).

Can you confirm that your principal has a non-null email?

@tchapi tchapi added dependency bug Bug linked to a dependency needs info This issue / PR needs more info labels Feb 1, 2024
@dominiquefournier
Copy link
Author

I am sorry, but I don't know how I can check this. Do you have an idea how I can do that ?

@tchapi
Copy link
Owner

tchapi commented Feb 1, 2024

I am sorry, but I don't know how I can check this. Do you have an idea how I can do that ?

The user for this calendar, have you set an email for them?

Screenshot 2024-02-01 at 17 04 17

@dominiquefournier
Copy link
Author

Thanks for the image. Yes the user has the email defined.

@dominiquefournier
Copy link
Author

dominiquefournier commented Feb 1, 2024

I just solve my problem with modifying the vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php file, at line 417 :

--- vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php.ori	2024-02-01 20:17:06.509023419 +0100
+++ vendor/sabre/dav/lib/CalDAV/Schedule/Plugin.php	2024-02-01 20:16:53.136307540 +0100
@@ -414,6 +414,9 @@
 
         $caldavNS = '{'.self::NS_CALDAV.'}';
 
+        if (is_null($iTipMessage->recipient)) {
+            return;
+        }
         $principalUri = $aclPlugin->getPrincipalByUri($iTipMessage->recipient);
         if (!$principalUri) {
             $iTipMessage->scheduleStatus = '3.7;Could not find principal.';

The event was with a null recipient.

@tchapi
Copy link
Owner

tchapi commented Feb 1, 2024

I reckon you should maybe make a PR against the sabre/dav repository so they include your fix!

@dominiquefournier
Copy link
Author

sabre-io/dav#1541

@tchapi
Copy link
Owner

tchapi commented Feb 26, 2024

I'll close this issue for now as the problem seems clearly identified on sabre/dav's side. I'll keep an eye on the underlying issue

@tchapi tchapi closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency bug Bug linked to a dependency needs info This issue / PR needs more info
Projects
None yet
Development

No branches or pull requests

2 participants