NumberFormatException: For input string: "T"



  • OS: Android 8.1.0
    Security Update Level: April, 5th 2018
    Phone: Pixel 2 XL

    The following message has appeared for 2 days:
    For input string: "T"

    I changed nothing.
    After the message appeared I deleted the account and added it again. No improvement.

    Debug File:

    --- BEGIN DEBUG INFO ---
    Account name: xxxx@posteo.de
    Authority: com.android.calendar
    
    REMOTE RESOURCE:
    https://posteo.de:8443/calendars/xxx/xxxxx/xxxxx.ics
    
    EXCEPTION:
    java.lang.NumberFormatException: For input string: "T"
    	at java.lang.Integer.parseInt(Integer.java:608)
    	at java.lang.Integer.parseInt(Integer.java:643)
    	at net.fortuna.ical4j.model.Dur.<init>(Dur.java:146)
    	at net.fortuna.ical4j.model.property.Trigger.setValue(Trigger.java:249)
    	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$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.Event$Companion.fromReader(Event.kt:78)
    	at at.bitfire.ical4android.Event$Companion.fromReader$default(Event.kt:72)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager.processVEvent(CalendarSyncManager.kt:166)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager.access$processVEvent(CalendarSyncManager.kt:41)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager$processRemoteChanges$4.invoke(CalendarSyncManager.kt:152)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager$processRemoteChanges$4.invoke(CalendarSyncManager.kt:41)
    	at at.bitfire.davdroid.syncadapter.BaseDavSyncManager.useRemote(BaseDavSyncManager.kt:276)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager.processRemoteChanges(CalendarSyncManager.kt:144)
    	at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:127)
    	at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$CalendarsSyncAdapter.sync(CalendarsSyncAdapterService.kt:55)
    	at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:90)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:321)
    
    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: denied
    org.dmfs.permission.WRITE_TASKS permission: denied
    System-wide synchronization: automatically
    Account: xxxxx@posteo.de
      Address book sync. interval: 240 min
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: —
      WiFi only: false
      [CardDAV] Contact group method: CATEGORIES
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  de_DE |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  3 |  | carddav | https://posteo.de:8443/ |
    	|  4 |  | caldav | https://posteo.de:8443/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 4 |
    	|  homesets | 4 |
    	|  collections | 4 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  3 | 3 | https://posteo.de:8443/addressbooks/ |
    	|  4 | 4 | https://posteo.de:8443/calendars/ |
    ----------
    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  3 | 3 | ADDRESS_BOOK | https://posteo.de:8443/addressbooks/default/ | 0 | 0 | default addressbook | <null> | <null> | <null> | 0 | 0 | <null> | 0 |
    	|  4 | 4 | CALENDAR | https://posteo.de:8443/calendars//default/ | 0 | 0 | Standardkalender | <null> | <null> | <null> | 1 | 1 | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 8.1.0 (OPM2.171019.029)
    Device: Google Pixel 2 XL (taimen)
    
    --- END DEBUG INFO ---

  • developer

    Hello,

    Seems like an invalid input file. Can you please post the (anonymized) contents of the remote resource (just open the URL with a browser and enter your CalDAV user name/password) here and/or send it to play@bitfire.at (PGP key)?

    You can also try to validate it with an iCalendar validator.



  • Hey,

    thanks for help.
    Seems that I am unable or to stupid to get the remote ressource content. Browser shows me nothing with the link.

    icalender validator shows this:

    Problem! Found 1 warning
    Warnings

    Invalid MIME type detected, should be 'text/calendar' (found MIME type 'application/xml; charset=utf-8') near line # 1Reference: RFC 5545 8.1. iCalendar Media Type Registration
    

    Problem! Found 2 errors
    Errors

    This is not an iCalendar file or URL near line # 1Reference: RFC 5545 3.4. iCalendar Object
    Missing VCALENDAR object near line # 1Reference: RFC 5545 3.4 iCalendar Object

  • developer

    Without the file, I can't say anything about the problem. I strongly suspect that the file is invalid (some problem with the Duration value), but to be sure I'd need the file.

    The browser should offer to download the file when you paste the URL into the address bar. You can also use a download manager or something like that. The .ics file can be downloaded like any other file.



  • Managed to download the file @ home.

    Looks a bit short:

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Posteo Webmail//NONSGML Calendar//EN
    X-WR-Timezone: Europe/London
    BEGIN:VEVENT
    DTSTART:20180315T090000Z
    DTEND:20180315T101500Z
    DTSTAMP:20180314T115558Z
    SEQUENCE:1521028558
    SUMMARY:xxxxx
    UID:xxxxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxx
    BEGIN:VALARM
    ACTION:DISPLAY
    SUMMARY:xxxxxxxxx
    TRIGGER:-P0DTS
    END:VALARM
    END:VEVENT
    END:VCALENDAR
    

    Maybe i should contact the email provider.?


  • developer

    @username7773 I guess this could be the problem:

    TRIGGER:-P0DTS

    RFC 5545 3.3.6:

       dur-value  = (["+"] / "-") "P" (dur-date / dur-time / dur-week)
    
       dur-date   = dur-day [dur-time]
       dur-time   = "T" (dur-hour / dur-minute / dur-second)
       dur-week   = 1*DIGIT "W"
       dur-hour   = 1*DIGIT "H" [dur-minute]
       dur-minute = 1*DIGIT "M" [dur-second]
       dur-second = 1*DIGIT "S"
       dur-day    = 1*DIGIT "D"
    

    Wouldn't dur-second = 1*DIGIT "S" mean that your value should be -P0DT0S instead of -P0DTS? This would also explain the parsing error.

    Can you try to remove the alarm from the event (in the Web interface) and have a look whether synchronization is working then?



  • I removed all events from that day (the events were in the past anyway) and the message disappeared.

    Thanks for your help. 👍
    Thread can be closed.