39aldo39 / Radicale-DecSync

Radicale storage plugin to add synchronization using DecSync
GNU General Public License v3.0
78 stars 8 forks source link

Unable to Create Collections #20

Open ManApart opened 2 years ago

ManApart commented 2 years ago

I'm trying to set up this plugin and given a clean slate (no existing calendars), any event type I try to create gives me this error. Creating a collection seems to work fine if I don't have they storage type set to decSync. I'm guessing I'm doing something wrong in my setup, but I'm not sure what it is.

 [2021-12-25 15:02:06 +0000] [247412/Thread-3] [DEBUG] Request content:
 <?xml version="1.0"?>
 <mkcol xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:ICAL="http://apple.com/ns/ical/">
   <set>
     <prop>
       <resourcetype>
         <collection />
         <C:calendar />
       </resourcetype>
       <C:supported-calendar-component-set>
         <C:comp name="VEVENT" />
         <C:comp name="VTODO" />
       </C:supported-calendar-component-set>
       <displayname>Test</displayname>
       <ICAL:calendar-color>#8fadb9ff</ICAL:calendar-color>
     </prop>
   </set>
 </mkcol>
 Uncaught Kotlin exception: org.decsync.library.InvalidInfoException
     at  (0x7f8729da96af)
     at  (0x7f8729da97b3)
     at  (0x7f8729d93c15)
     at  (0x7f8729daa02e)
     at  (0x7f8729dab9fd)
     at decsync_so_set_entry (0x7f8729e3f70a)
$ cat /etc/radicale/config
[auth]
....

[server]
...

[storage]
type = radicale_storage_decsync
decsync_dir = ~/.local/share/decsync

I don't believe that the service, running as user radicale, will have access to that directory. I'll try to set the directory up for one that exists / has permissions and see if that's actually the cause of the error.

39aldo39 commented 2 years ago

Yes, I do think that the cause is that the running user doesn't have permissions to the directory. Nevertheless, it shouldn't crash and give an error message and the message should be clearer. For Android I do check the permissions but for the desktop it should also be done.