Empty value causes NumberFormatException



  • I’m getting this error over and over on my device.

    “Received invalid task from server.
    Ignoring one or more invalid resources”

    Most tasks seem to be synced fine though.

    --- BEGIN DEBUG INFO ---
    SYNCHRONIZATION INFO
    Account name: xxxxxxxxxxx
    Authority: org.dmfs.tasks
    
    REMOTE RESOURCE:
    https://xxxxxxxxxxxx.com:2080/rpc/calendars/xxxxxxxxxxxx/tasks~SCwz2XJvD0VCmrKCo0GP4rH/32DD1499-03E6-40B3-B024-6E66BD2600EC.ics
    
    EXCEPTION:
    at.bitfire.ical4android.InvalidCalendarException: Couldn't parse iCalendar object
    	at at.bitfire.ical4android.Task$Companion.fromReader(Task.kt:70)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.processVTodo(TasksSyncManager.kt:140)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.access$processVTodo(TasksSyncManager.kt:44)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$1$1.invoke(TasksSyncManager.kt:105)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$1$1.invoke(TasksSyncManager.kt:44)
    	at at.bitfire.dav4jvm.DavResource.get(DavResource.kt:211)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$1.invoke(TasksSyncManager.kt:99)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager$downloadRemote$1.invoke(TasksSyncManager.kt:44)
    	at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:810)
    	at at.bitfire.davdroid.syncadapter.TasksSyncManager.downloadRemote(TasksSyncManager.kt:98)
    	at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$1.run(SyncManager.kt:452)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    	at java.lang.Thread.run(Thread.java:818)
    Caused by: net.fortuna.ical4j.data.ParserException: Error at line 8:Invalid int: ""
    	at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:158)
    	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:68)
    	... 15 more
    Caused by: java.lang.NumberFormatException: Invalid int: ""
    	at java.lang.Integer.invalidInt(Integer.java:138)
    	at java.lang.Integer.parseInt(Integer.java:358)
    	at java.lang.Integer.parseInt(Integer.java:334)
    	at net.fortuna.ical4j.model.property.Priority.setValue(Priority.java:221)
    	at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.propertyValue(CalendarBuilder.java:299)
    	at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:282)
    	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)
    	... 18 more
    
    SOFTWARE INFORMATION
    * at.bitfire.davdroid 2.5.2-ose (293)
    * org.dmfs.tasks 1.1.19 (75500) from org.fdroid.fdroid
    * com.android.providers.contacts 5.1-1 (22)
    * com.android.providers.calendar 5.1-1 (22)
    * com.android.contacts 5.1-1 (22)
    * com.google.android.calendar 6.0.39-252984007-release (2016227349)
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    android.permission.READ_CONTACTS: granted
    android.permission.WRITE_CONTACTS: granted
    android.permission.READ_CALENDAR: granted
    android.permission.WRITE_CALENDAR: granted
    org.dmfs.permission.READ_TASKS: granted
    org.dmfs.permission.WRITE_TASKS: granted
    android.permission.ACCESS_COARSE_LOCATION: denied
    System-wide synchronization: automatically
    Account: xxxxxxxxxx
      Address book sync. interval: manually
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: 240 min
      WiFi only: false
      [CardDAV] Contact group method: GROUP_VCARDS
      [CalDAV] Time range (past days): 90
               Manage calendar colors: false
               Use event colors: false
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  en_CA |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  service | 2 |
    	|  homeset | 8 |
    	|  collection | 18 |
    ----------
    service
    	|  id | accountName | type | principal |
    	|  1 | xxxxxxx | carddav | https://xxxxxxxxx:2080/rpc/principals/xxxxxxxx/ |
    	|  2 | xxxxxxx | caldav | https://xxxxxxxxxx:2080/rpc/principals/xxxxxxxx/ |
    ----------
    homeset
    	|  id | serviceId | url |
    	|  5 | 1 | https://xxxxxxxxxxxx:2080/rpc/addressbooks/-system-/ |
    	|  6 | 1 | https://xxxxxxxxxxxx:2080/rpc/addressbooks/xxxxxxxxxxxx/ |
    	|  7 | 2 | https://xxxxxxxxxxxx:2080/rpc/calendars/-system-/ |
    	|  8 | 2 | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/ |
    ----------
    collection
    	|  id | serviceId | type | url | privWriteContent | privUnbind | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | supportsVJOURNAL | source | sync |
    	|  10 | 1 | ADDRESS_BOOK | https://xxxxxxxxxxxx:2080/rpc/addressbooks/xxxxxxxxxxxx/contacts~14a60f6c-aa8e-cb1d-2acf-cacd98eed53f/ | 1 | 1 | 0 | Address Book | <null> | <null> | <null> | 0 | 0 | <null> | <null> | 0 |
    	|  11 | 1 | ADDRESS_BOOK | https://xxxxxxxxxxxx:2080/rpc/addressbooks/xxxxxxxxxxxx/contacts~favourites/ | 1 | 1 | 0 | Favorite Recipients | <null> | <null> | <null> | 0 | 0 | <null> | <null> | 0 |
    	|  12 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/calendar:eb9ab8cf-aed7-0b98-7413-73173eb8d7fa/ | 1 | 1 | 0 | Calendar | Joe's personal calendar | -1255936 | <null> | 1 | 0 | <null> | <null> | 1 |
    	|  13 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/calendar~KtB13F8DC80B5lx11IQ2DFU/ | 1 | 1 | 0 | Projects | <null> | -12010240 | <null> | 1 | 0 | <null> | <null> | 1 |
    	|  14 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/calendar~LZVk19uvReGrNnGPwlsZU6h/ | 1 | 1 | 0 | Work | Joe's work calendar | -7715072 | <null> | 1 | 0 | <null> | <null> | 1 |
    	|  15 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/calendar~OSLrK7XpSk7TCwhK8dCQeod/ | 1 | 1 | 0 | Shopping | <null> | -10878777 | <null> | 1 | 0 | <null> | <null> | 1 |
    	|  16 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/calendar~QTk8q6Q6daRxrEfC41eNl7j/ | 1 | 1 | 0 | Finance | <null> | -65536 | <null> | 1 | 0 | <null> | <null> | 1 |
    	|  17 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/tasks~FWCtfUDinT2KJwZn6fEuQga/ | 1 | 1 | 0 | Trash | <null> | -6974464 | <null> | 0 | 1 | <null> | <null> | 0 |
    	|  18 | 2 | CALENDAR | https://xxxxxxxxxxxx:2080/rpc/calendars/xxxxxxxxxxxx/tasks~SCwz2XJvD0VCmrKCo0GP4rH/ | 1 | 1 | 0 | Personal | <null> | -14667009 | <null> | 0 | 1 | <null> | <null> | 1 |
    ----------
    room_master_table
    	|  id | identity_hash |
    	|  42 | 646131aecfaa7b0b69893e2374fb2da3 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 5.1 (LPBS23.13-35.5-1)
    Device: motorola XT1040 (peregrine)
    
    --- END DEBUG INFO ---
    
    

  • developer

    Hello,

    Do you use Horde? Is this a duplicate of this one: https://forums.bitfire.at/post/9792 ?



  • No idea. The post looks like a lot of greek to me. How do I check?


  • developer

    @executive Do you use Horde? Which server do you use?

    The URL given in “REMOTE RESOURCE” points to the iCalendar that contains the invalid line. You can enter the URL in a browser (same credentials as for CalDAV) and check.

    If you’re not sure, please just send this thread to the server admin and tell us what they say.



  • @rfc2822
    OK it does look like it’s Horde

    BEGIN:VCALENDAR
    VERSION:2.0
    X-WR-CALNAME:Personal
    PRODID:-//The Horde Project//Horde iCalendar Library//EN
    BEGIN:VTODO
    UID:1CD86D4C-30AB-4F14-B31D-C6273C5053F0
    SUMMARY: ...
    PRIORITY:
    STATUS:COMPLETED
    COMPLETED:20190719T043844Z
    CREATED:20171101T220817Z
    LAST-MODIFIED:20171201T202712Z
    END:VTODO
    END:VCALENDAR
    

    and it’s not the first time I’ve had sync problems with Horde.

    So is Horde just buggy piece of crap? Should I ask my hoster for something better?


  • developer

    @executive said in Empty value causes NumberFormatException:

    PRIORITY:

    This line is invalid and causes the problems. See https://bugs.horde.org/ticket/14032

    So is Horde just buggy piece of crap? Should I ask my hoster for something better?

    Horde surely has some bugs (like any software) and it seems that proper CalDAV/CardDAV implementation is not their number one priority. However, it is free and open-source software (which is given away for free), so I think it would be worth it to either improve it or switch to something else and improve that.



  • @rfc2822

    Well I’m not going to fix their software for them, and it seems to take them decades to do anything. Meanwhile I depend on my calendars and tasks for business and I need them to work. I pay my hoster good money for a product that should work out of the box.

    What is an alternative to Horde that has reliable DAV functionality?



  • Horde does probably not see any money from your hoster 😉

    There are a lot of servers and services that work well. We don’t know the pros and cons of all, but KolabNow, Nextcloud, Owncloud, fastmail, mailbox.org etc have a reliable DAV infrastructure that has proven to work very well.

    Did you have a look here: https://www.davx5.com/tested-with already?



  • Thanks. I also have Nextcloud installed, so I’ll see if that can meet my needs. But PHP based software isn’t going to perform as well is it?

    Horde does probably not see any money from your hoster

    That’s entirely possible, but it has nothing to do with me. I am giving my hoster my hard earned money in exchange for email infrastructure (including its related services like contacts, calendar etc.). These days everyone expects mobile access, and it simply doesn’t work. Bottom line.

    Did you have a look here: https://www.davx5.com/tested-with already?

    Horde has no business being on a “successfully tested services” list. Which makes the whole list suspect.


  • developer

    Did you have a look here: https://www.davx5.com/tested-with already?

    Horde has no business being on a “successfully tested services” list. Which makes the whole list suspect.

    Because of one bug? I guess nobody can meet your high expectations.

    The list shall give you an idea of available software you can choose from. How does the fact that Horde is listed there make the list suspect?

    By the way, you using the -ose version of DAVx5, right?



  • @rfc2822

    No, it is not just one bug in Horde. You may remember helping me with another one here:
    https://forums.bitfire.at/topic/1721/calendar-event-times-shifted

    High expectations? Yes I expect to not have to dismiss 40 errors on my phone every day. And yes, I expect my calendar events to have the correct time of day. Is that unreasonable?

    Sorry, but Horde is a half-baked, unreliable pile of crap. If you consider it to be “successful” then yes, your list is suspect.

    I don’t know what -ose version means. I’m guessing it stands for open source edition? Yes I’m using that to evaluate if I like it, and judge the developer support.



  • MacOS and iOS are somehow able to work with Horde. Everyone knows standards will be broken. Maybe software needs to be a bit more flexible.


  • developer

    @executive Of course this would be desirable. I have created a feature request for that: https://github.com/ical4j/ical4j/issues/350


Log in to reply
 

Similar topics