Google: Received multi-get response without ETag



  • Hi,
    thanks to the instructions here, I have been able to configure a calendar from my "other calendars" list.
    The url to use is "https://www.google.com/calendar/dav/calendarid@group.calendar.google.com/events/", where calendarid is found in the Calendar Settings on google.
    It seems to work fine, my events are synced, but I receive regular notifications of «HTTP Server error - Received multi-get response without ETag». I can dismiss the notification, but I don't know the effects it has on my events. And anyway it comes back regularly, I guess at the next sync attempt.
    Has anyone encountered that problem ? What can I do to help diagnose it ?



  • Here is a logcat of the error.
    Before the error itself, I have quite a bunch of these:

    11-05 14:06:02.397 18312 3538 I davdroid: [syncadapter.SyncManager] somerandomid@google.com.ics has not been changed on server (ETag still 63676925108)
    11-05 14:06:02.403 4585 2844 W ContentResolver: Failed to get type for: content://com.android.calendar (Unknown URL content://com.android.calendar)

    then the error itself:

    11-05 14:06:02.473 18312 3931 I davdroid: [syncadapter.CalendarSyncManager] Downloading 2 iCalendars: [https://www.google.com/calendar/dav/mycalendarid%40group.calendar.google.com/events/someunknownid_R20181020T092000%40google.com.ics, https://www.google.com/calendar/dav/mycalendarid%40group.calendar.google.com/events/someunknownid%40google.com.ics]
    11-05 14:06:03.104 18312 3198 E davdroid: [syncadapter.SyncManager] HTTP/DAV exception
    11-05 14:06:03.104 18312 3198 E davdroid: EXCEPTION at.bitfire.dav4android.exception.DavException: Received multi-get response without ETag
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2$1$1.invoke(CalendarSyncManager.kt:135)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2$1$1.invoke(CalendarSyncManager.kt:42)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:785)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2$1.invoke(CalendarSyncManager.kt:133)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2$1.invoke(CalendarSyncManager.kt:42)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.dav4android.Response$Companion.parse(Response.kt:211)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.dav4android.DavResource$processMultiStatus$2.invoke(DavResource.kt:384)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.dav4android.DavResource.processMultiStatus(DavResource.kt:403)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.dav4android.DavResource.processMultiStatus(DavResource.kt:354)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.dav4android.DavCalendar.multiget(DavCalendar.kt:150)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2.invoke(CalendarSyncManager.kt:132)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager$downloadRemote$2.invoke(CalendarSyncManager.kt:42)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.SyncManager.useRemote(SyncManager.kt:774)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.SyncManager.useRemoteCollection(SyncManager.kt:795)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.CalendarSyncManager.downloadRemote(CalendarSyncManager.kt:131)
    11-05 14:06:03.104 18312 3198 E davdroid: at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$1.run(SyncManager.kt:438)
    11-05 14:06:03.104 18312 3198 E davdroid: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    11-05 14:06:03.104 18312 3198 E davdroid: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    11-05 14:06:03.104 18312 3198 E davdroid: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    11-05 14:06:03.104 18312 3198 E davdroid: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    11-05 14:06:03.104 18312 3198 E davdroid: at java.lang.Thread.run(Thread.java:764)
    11-05 14:06:03.133 18312 3198 I davdroid: [syncadapter.CalendarsSyncAdapterService] Calendar sync complete

    hth 🙂



  • oh and a few related lines after that:

    11-05 14:06:03.137 18312 3198 I davdroid: [syncadapter.SyncAdapterService] Sync for (com.android.calendar, Account {name=myusername@gmail.com, type=bitfire.at.davdroid}) finished

    11-05 14:06:03.201 2293 2415 D SyncManager: failed sync operation JobId=102140 myusername@gmail.com/bitfire.at.davdroid u0 [com.android.calendar] USER ExpectedIn=-4s EXPEDITED Reason=10084, SyncResult: stats [ numParseExceptions: 1]
    11-05 14:06:03.202 2293 2415 D SyncManager: not retrying sync operation because the error is a hard error: JobId=102140 myusername@gmail.com/bitfire.at.davdroid u0 [com.android.calendar] USER ExpectedIn=-4s EXPEDITED Reason=10084


  • developer

    @hobbes said in caldav sync with google doesnt work anymore:

    11-05 14:06:02.473 18312 3931 I davdroid: [syncadapter.CalendarSyncManager] Downloading 2 iCalendars: [https://www.google.com/calendar/dav/mycalendarid%40group.calendar.google.com/events/someunknownid_R20181020T092000%40google.com.ics, https://www.google.com/calendar/dav/mycalendarid%40group.calendar.google.com/events/someunknownid%40google.com.ics]
    11-05 14:06:03.104 18312 3198 E davdroid: [syncadapter.SyncManager] HTTP/DAV exception
    11-05 14:06:03.104 18312 3198 E davdroid: EXCEPTION at.bitfire.dav4android.exception.DavException: Received multi-get response without ETag

    Looks like the server is sending invalid responses…



  • but except for the periodic notification, everything seems to work fine... what can I do to help diagnose this ?


  • developer

    @hobbes Can you post the HTTP request before the exception? There should be a multistatus response without an ETag response, which would be a server problem.



  • Hi, where do I get those requests ? I don't see any detail in the logat, so I'm not sure what you're asking for... The only thing that seems weird is this line:

    11-07 20:30:15.637  6555  5080 I davdroid: [syncadapter.SyncManager] 1pt1mrnrhtn5o5ai8g832eh323@google.com.ics has been added remotely
    

    It comes back every single time that I sync the calendar.

    Other than that, I have a bunch of those:

    11-07 20:25:19.596  6476  3803 W ContentResolver: Failed to get type for: content://com.android.calendar (Unknown URL content://com.android.calendar)
    

    But I don't think that they are related to my notification...


  • developer

    @hobbes How did you get the logs? Did you enable external logging in DAVdroid and then transfer the files to your PC?



  • I previously used a logcat, but now I found the option to get the comple1pt1mrnrhtn5o5ai8g832eh323te logs from davdroid, with far more information 🙂
    Apparently there is one event which was added remotely, but when davdroid tries to download it, it gets a 404 error.
    It would probably help if I transmited the complete log, but before I do so, does it contain any sensitive information ?


  • developer

    @hobbes said in caldav sync with google doesnt work anymore:

    It would probably help if I transmited the complete log, but before I do so, does it contain any sensitive information ?

    I don't know. If you want, you can send it to play@bitfire.at (PGP key) and it will of course be treated as confidential.



  • ok log sent.
    Thanks


  • developer

    Thanks for the logs. I was finally able to reproduce a similar situation:

    1. Upload an event with UID:a%40b (note the %, for instance coming from some erroneously double-encoded old UID; nevertheless valid) to Google /events/a%40b.ics (or anything else)
    2. Google usually rewrites the path (= moves the event) to <UID>.ics, which would be a%40b.ics.
    3. However, Google CalDAV REPORT calendar-query reports /events/a%2540b.ics as the URL of the resource.
    4. If you want to download /events/a%2540b.ics from Google, it returns 404, although it had just listed this path.

    So, in my opinion and what I currently know about it, this seems to be a server problem. It should go away if you delete all events on the server and then only create/sync "clean" events with "good UIDs". Maybe you can also create a new calendar for testing and see whether this one works?