Task sync: Cannot set timezone for UTC properties



  • Since upgrading to 1.11-ose, syncing Tasks (to NextCloud 13.0.1) has stopped with the message "Cannot set timezone for UTC properties". Here is the relevant debug info:

    2018-04-19 11:32:28 1604 Error loading custom timezone aliases: Attempt to invoke virtual method 'int java.io.Reader.read(char[])' on a null object reference
    2018-04-19 11:32:28 1604 Unfolding...
    2018-04-19 11:32:28 1604 [syncadapter.SyncManager] Unclassified sync error
    EXCEPTION java.lang.UnsupportedOperationException: Cannot set timezone for UTC properties
    	at net.fortuna.ical4j.model.property.UtcProperty.setTimeZone(UtcProperty.java:95)
    	at net.fortuna.ical4j.data.CalendarBuilder.updateTimeZone(CalendarBuilder.java:353)
    	at net.fortuna.ical4j.data.CalendarBuilder.access$300(CalendarBuilder.java:68)
    	at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.parameter(CalendarBuilder.java:278)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.parse(CalendarParserImpl.java:367)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.access$1800(CalendarParserImpl.java:322)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterListParser.parse(CalendarParserImpl.java:310)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:247)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.access$1100(CalendarParserImpl.java:229)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:210)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.parse(CalendarParserImpl.java:422)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.access$900(CalendarParserImpl.java:406)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:208)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendar(CalendarParserImpl.java:115)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendarList(CalendarParserImpl.java:180)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:149)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:198)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:178)
    	at at.bitfire.ical4android.Task$Companion.fromReader(Task.kt:66)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processVTodo(TasksSyncManager.kt:149)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processRemoteChanges(TasksSyncManager.kt:138)
    	at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:127)
    	at at.bitfire.davdroid.syncadapter.TasksSyncAdapterService$TasksSyncAdapter.sync(TasksSyncAdapterService.kt:63)
    	at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:77)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    
    2018-04-19 11:32:28 1604 [syncadapter.TasksSyncAdapterService] Task sync complete
    2018-04-19 11:32:28 1604 [syncadapter.SyncAdapterService] Sync for org.dmfs.tasks complete
    

    Any ideas?

    Thanks,
    Andreas


  • developer

    Hello,

    Sounds like an invalid task file. Can you please provide more information, especially debug logs and the related task file?



  • Hi,
    i have the same problem (error) since update to nextcloud 13.0.1 & davdroid 1.11

    issues seems to be related to tasks

    reinstalling reboot and/or delete cache has no effect

    regards marco

    EXCEPTION:
    java.lang.UnsupportedOperationException: Cannot set timezone for UTC properties
    	at net.fortuna.ical4j.model.property.UtcProperty.setTimeZone(UtcProperty.java:95)
    	at net.fortuna.ical4j.data.CalendarBuilder.updateTimeZone(CalendarBuilder.java:353)
    	at net.fortuna.ical4j.data.CalendarBuilder.access$300(CalendarBuilder.java:68)
    	at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.parameter(CalendarBuilder.java:278)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.parse(CalendarParserImpl.java:367)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterParser.access$1800(CalendarParserImpl.java:322)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ParameterListParser.parse(CalendarParserImpl.java:310)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:247)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.access$1100(CalendarParserImpl.java:229)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:210)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.parse(CalendarParserImpl.java:422)
    	at net.fortuna.ical4j.data.CalendarParserImpl$ComponentParser.access$900(CalendarParserImpl.java:406)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:208)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendar(CalendarParserImpl.java:115)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendarList(CalendarParserImpl.java:180)
    	at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:149)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:198)
    	at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:178)
    	at at.bitfire.ical4android.Task$Companion.fromReader(Task.kt:66)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processVTodo(TasksSyncManager.kt:149)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processRemoteChanges(TasksSyncManager.kt:138)
    	at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:127)
    	at at.bitfire.davdroid.syncadapter.TasksSyncAdapterService$TasksSyncAdapter.sync(TasksSyncAdapterService.kt:63)
    	at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:90)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 1.11-gplay (213) from 13.04.2018
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    Power saving disabled: yes
    android.permission.READ_CONTACTS permission: granted
    android.permission.WRITE_CONTACTS permission: granted
    android.permission.READ_CALENDAR permission: granted
    android.permission.WRITE_CALENDAR permission: granted
    org.dmfs.permission.READ_TASKS permission: granted
    org.dmfs.permission.WRITE_TASKS permission: granted
    System-wide synchronization: automatically
    
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: 240 min
      WiFi only: false
      [CardDAV] Contact group method: CATEGORIES
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true

  • developer

    @leckelma Thanks for the report. Can you please provide the related task file (see DAVdroid logs) and/or a test account with tasks that cause the problem?

    I'd have to reproduce the problem here to have a look at it.


  • developer

    @leckelma Thanks for the logs. Your tasks contains

    COMPLETED;VALUE=DATE-TIME;TZID=Europe/Berlin:20140226T192557
    

    which cannot be parsed by ical4j/ical4android/DAVdroid because COMPLETED must not specify a timezone, but must be given as date with UTC time.

    Please fix your task (maybe editing in the Web interface is enough) and it should work. Can you confirm that?



  • @rfc2822 Hi, thanks for the Update. If i just know which Task it is. there are a lots of (completed) Task is this shared calendar.
    Should i delete all Completed tasks?

    Regards
    leckelma



  • Ok, maybe i found it. i have deleted one Task via WebUI without a subject.
    Now i can sync without error.

    Thanks for the hint.

    Cheers



  • This post is deleted!


  • Sorry for not replying earlier, I do not get E-Mail notifications by default and thus didn't notice there had been a reply.

    For me, the latest update to DavDroid 1.11.1-ose seems to have fixed it (or NextCloud's calendar 1.6.1?).


  • admin

    This post is deleted!