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

Caldav Sync error (gener..): illegal character in path at index 48:/cloud/remote.php/caldav/calend... #123

Closed
vlapla opened this issue Oct 13, 2013 · 10 comments
Assignees
Labels
bug
Milestone

Comments

@vlapla
Copy link

@vlapla vlapla commented Oct 13, 2013

When I add my OwnCloud account everything seems fine at first, but the adapter never syncs with the server. Instead I get the above error displayed in the message area.

I'm using Cyanogenmod 10.0 (Android 4.1), AndroidCalDAVSyncAdapter 1.8 (from F-Droid), and an unknown OwnCloud version (probably 5.0, and I could find it out). Other calendars like Kontact (in KDE) or aCal (on Android) work fine with my account.

Am I the only person with this problem?
Should I provide more information?

I'm really glad I discovered this promising project, and I hope it will work for me soon!

@ghost ghost assigned timoberger Oct 29, 2013
@rpedrica

This comment has been minimized.

Copy link

@rpedrica rpedrica commented Oct 30, 2013

I have the same issue. V1.7 worked fine but I have this issue since the 1.8 update. ViperS on HTC One S, Android 4.1.x, ownCloud 5.0.11

@timoberger

This comment has been minimized.

Copy link
Collaborator

@timoberger timoberger commented Oct 30, 2013

can you provide access to the calendar server or the calendar?

@rpedrica

This comment has been minimized.

Copy link

@rpedrica rpedrica commented Oct 30, 2013

Hi I can't give my own account but I can create a test account for you if you'd like - let me know.

@timoberger

This comment has been minimized.

Copy link
Collaborator

@timoberger timoberger commented Oct 31, 2013

i need one of these:

  • the debug output when the error occures or
  • a network dump of the request that caused the error (i.e. created with charles proxy) or
  • only the response or
  • access to the specific calendar that caused the error

what kind of url did you use during accout creation?
are any calendars created on your device?
are there events within the calendars?

@Weishaupt

This comment has been minimized.

Copy link

@Weishaupt Weishaupt commented Nov 7, 2013

Since yesterday I experience the same problem. The sync won't take place. I'll try to provide some useful logs later.

@timoberger

This comment has been minimized.

Copy link
Collaborator

@timoberger timoberger commented Nov 8, 2013

this could be a single event that causes this error.

@Weishaupt

This comment has been minimized.

Copy link

@Weishaupt Weishaupt commented Nov 8, 2013

Update: Solution below

Okay,

it seems the error lies within this: DateException: Duration.parse(str='PT-22H0M0S') unexpected char '-' at index=2

I just downloaded the two calendars I use with my OwnCloud Account, but non of them contain the string "PT-". Do you know a possibility to download the .ics from the phone?

I use the Google Calendar app, that shipped with the phone.

D/CalendarEvent(28758): AndroidEvent is dirty: 0
D/CalendarEvent(28758): Update calendar event not needed: for content://com.android.calendar/events/1463
I/SyncAdapter(28758): Event /owncloud/remote.php/caldav/calendars/marvin/defaultcalendar/owncloud-251a0fc826f5356553739afb78f16271.ics androidUri=null
D/CaldavFacade(28758): LastAuthState: restored with user marvin
D/CaldavFacade(28758): LastAuthScope: restored
W/CalendarProvider2(13837): Could not calculate last date.
W/CalendarProvider2(13837): com.android.calendarcommon2.DateException: Duration.parse(str='PT-22H0M0S') unexpected char '-' at index=2
W/CalendarProvider2(13837):     at com.android.calendarcommon2.Duration.parse(Duration.java:119)
W/CalendarProvider2(13837):     at com.android.providers.calendar.CalendarProvider2.calculateLastDate(CalendarProvider2.java:2897)
W/CalendarProvider2(13837):     at com.android.providers.calendar.CalendarProvider2.updateLastDate(CalendarProvider2.java:2952)
W/CalendarProvider2(13837):     at com.android.providers.calendar.CalendarProvider2.insertInTransaction(CalendarProvider2.java:2125)
W/CalendarProvider2(13837):     at com.android.providers.calendar.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)
W/CalendarProvider2(13837):     at android.content.ContentProvider$Transport.insert(ContentProvider.java:213)
W/CalendarProvider2(13837):     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:158)
W/CalendarProvider2(13837):     at android.os.Binder.execTransact(Binder.java:388)
W/CalendarProvider2(13837):     at dalvik.system.NativeStart.run(Native Method)
E/JavaBinder(13837): *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
E/JavaBinder(13837): java.lang.RuntimeException: Could not insert event.
E/JavaBinder(13837):    at com.android.providers.calendar.CalendarProvider2.insertInTransaction(CalendarProvider2.java:2127)
E/JavaBinder(13837):    at com.android.providers.calendar.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)
E/JavaBinder(13837):    at android.content.ContentProvider$Transport.insert(ContentProvider.java:213)
E/JavaBinder(13837):    at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:158)
E/JavaBinder(13837):    at android.os.Binder.execTransact(Binder.java:388)
E/JavaBinder(13837):    at dalvik.system.NativeStart.run(Native Method)
E/SyncAdapter(28758): Updating calendar exception java.lang.NullPointerException
E/SyncAdapter(28758): java.lang.NullPointerException
E/SyncAdapter(28758):   at org.gege.caldavsyncadapter.caldav.entities.CalendarEvent.createAndroidEvent(CalendarEvent.java:912)
E/SyncAdapter(28758):   at org.gege.caldavsyncadapter.syncadapter.SyncAdapter.synchroniseEvents(SyncAdapter.java:330)
E/SyncAdapter(28758):   at org.gege.caldavsyncadapter.syncadapter.SyncAdapter.onPerformSync(SyncAdapter.java:170)
E/SyncAdapter(28758):   at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
I/ActivityManager( 1179): No longer want com.google.android.gms (pid 15232): empty #17
D/SyncManager( 1179): failed sync operation marvin@https://marvindickhaus.de/owncloud/remote.php/caldav/ u0 (org.gege.caldavsyncadapter.account), com.android.calendar, SERVER, earliestRunTime 235427408, reason: AutoSync, SyncResult: stats [ numParseExceptions: 1]
D/SyncManager( 1179): not retrying sync operation because the error is a hard error: marvin@https://marvindickhaus.de/owncloud/remote.php/caldav/ u0 (org.gege.caldavsyncadapter.account), com.android.calendar, SERVER, earliestRunTime 235447162, reason: AutoSync

As it turns out, the problem was an event created with repetition directly in the owncloud webinterface. The VEVENT that caused the error is:

BEGIN:VEVENT
CREATED;VALUE=DATE-TIME:20131104T105249Z
UID:8a95465d68
RRULE:FREQ=MONTHLY;BYDAY=1MO;INTERVAL=1
LAST-MODIFIED;VALUE=DATE-TIME:20131104T105249Z
DTSTAMP;VALUE=DATE-TIME:20131104T105249Z
SUMMARY:Monntagssitzung
DTSTART;VALUE=DATE-TIME:20131202T180000Z
DTEND;VALUE=DATE-TIME:20131125T200000Z
CLASS:PUBLIC
LOCATION:Filmkreis
END:VEVENT

The same Event created with Thunderbird lightning looks like:

BEGIN:VEVENT
CREATED:20131108T165934Z
LAST-MODIFIED:20131108T170018Z
DTSTAMP:20131108T170018Z
UID:c7fa9048-c465-452f-8a21-12c34815a3ff
SUMMARY:Montagssitzung
RRULE:FREQ=MONTHLY
DTSTART;VALUE=DATE-TIME:20131202T180000Z
DTEND;VALUE=DATE-TIME:20131202T200000Z
LOCATION:Filmkreiskeller
DESCRIPTION:Monatliche Besprechung
CLASS:PUBLIC
END:VEVENT
@timoberger

This comment has been minimized.

Copy link
Collaborator

@timoberger timoberger commented Nov 8, 2013

the event started 2013-12-02 and ended 2013-11-25.
one point for the web interface.
i will add a logic test between start and end.

timoberger added a commit to timoberger/AndroidCaldavSyncAdapater that referenced this issue Nov 13, 2013
- gggard#123 negative duration (dtstart is after dtend)
- gggard#135 missing encoding during put request
- updated the version
@timoberger

This comment has been minimized.

Copy link
Collaborator

@timoberger timoberger commented Nov 13, 2013

@vlapla

This comment has been minimized.

Copy link
Author

@vlapla vlapla commented Nov 13, 2013

Great, it's working! Thank you, timoberger!

@vlapla vlapla closed this Nov 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.