Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

iOS caldav sync appears to be broken #69

Open
m4dz opened this issue Mar 12, 2015 · 2 comments
Open

iOS caldav sync appears to be broken #69

m4dz opened this issue Mar 12, 2015 · 2 comments
Labels

Comments

@m4dz
Copy link

m4dz commented Mar 12, 2015

On iOS8 with calendar app, there's a strange sequences of webdav requests that produces an unexpected effect: we can add events to the cozy calendars, but the cozy calendars' events never appears in iOS calendar app oO…

So, when accessing to https://matthias.cozycloud.cc/public/sync/principals/me/, the sequence of requests is:

  • METHOD PROPFIND / STATUS 207
  • METHOD OPTIONS / STATUS 200
  • METHOD PROPFIND / STATUS 401 UNAUTHORIZED
<d:error xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"> 
    <a:exception>NotAuthenticated</a:exception> 
    <a:message>No basic authentication headers were found</a:message> 
    <a:jsdav-version>0.3.2</a:jsdav-version> 
</d:error>
  • METHOD PROPFIND / STATUS 207

Then when accessing a calendar such as https://matthias.cozycloud.cc/public/sync/calendars/me/M4D/, sequence is:

  • METHOD PROPFIND / STATUS 207
  • METHOD REPORT / STATUS 501 Not Implemented

So the lack of REPORT method support seems to prevent calendar app to get remote calendar informations.

FYI, when adding an event (https://matthias.cozycloud.cc/public/sync/calendars/me/Confs/CC66969A-DCFF-4FE5-9404-1E6152B4D1D6.ics), the sequence is:

  • METHOD PUT / STATUS 201 Created

But I can't edit it because of:

  • METHOD PUT / STATUS 412 Precondition Failed
<d:error xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"> 
    <a:exception>PreconditionFailed</a:exception> 
    <a:message>An If-None-Match header was specified, but the ETag matched (or * was specified).</a:message> 
    <a:jsdav-version>0.3.2</a:jsdav-version> 
    <a:header>If-None-Match</a:header>
</d:error>

But deletion is OK with:

  • METHOD DELETE / STATUS 204 No Content
@aenario
Copy link

aenario commented Mar 16, 2015

So,

METHOD PROPFIND / STATUS 207
METHOD OPTIONS / STATUS 200
METHOD PROPFIND / STATUS 401 UNAUTHORIZED

Could you log the request's headers to see if the 3rd request has actually no Authorization headers ?

For the precondition fail test, This is very weird indeed : it looks like its trying to create a new event (If-None-Match header). For Updates, the header should be (If-Match). Could you log the complete request (with headers) ?

@m4dz
Copy link
Author

m4dz commented Mar 16, 2015

So, I tried to reproduce the sequence of doom… Here it is!

PROFIND 207

Resume:

URL: https://matthias.cozycloud.cc/public/sync/calendars/me/
Status: Complete
Response Code: 207 Multi-Status
Protocol: HTTP/1.1
Method: PROPFIND
Kept Alive: Yes
Content-Type: application/xml; charset=utf-8
Client Addres: /192.168.1.2
Remote Address: matthias.cozycloud.cc/176.31.234.107

Headers:

    PROPFIND /public/sync/principals/me/ HTTP/1.1
Host    matthias.cozycloud.cc
User-Agent  iOS/8.2 (12D508) dataaccessd/1.0
Accept-Language fr-fr
Accept-Encoding gzip, deflate
Accept  */*
Content-Type    text/xml
Prefer  return=minimal
Depth   0
Connection  keep-alive
Cookie  express:sess=eyJwYXNzcG9ydCI6e319; express:sess.sig=1SBZncwHX1_yo8X3CZxeRellg8Y
Authorization   Basic bWU6ZTF5ODUxSXJvbA==
Content-Length  267
Proxy-Connection    keep-alive
Brief   t

PROFIND 401

Resume:

URL: https://matthias.cozycloud.cc/public/sync/principals/me/
Status: Complete
Response Code: 401 Unauthorized
Protocol: HTTP/1.1
Method: PROPFIND
Kept Alive: No
Content-Type: application/xml; charset=utf-8
Client Address: /192.168.1.2
Remote Address: matthias.cozycloud.cc/176.31.234.107

Headers:

    PROPFIND /public/sync/principals/me/ HTTP/1.1
Host    matthias.cozycloud.cc
User-Agent  iOS/8.2 (12D508) dataaccessd/1.0
Accept-Language fr-fr
Accept-Encoding gzip, deflate
Accept  */*
Content-Type    text/xml
Prefer  return=minimal
Depth   0
Connection  keep-alive
Cookie  express:sess=eyJwYXNzcG9ydCI6e319; express:sess.sig=1SBZncwHX1_yo8X3CZxeRellg8Y
Proxy-Connection    keep-alive
Content-Length  743
Brief   t

PROFIND 207

Resume:

URL: https://matthias.cozycloud.cc/public/sync/principals/me/
Status: Complete
Response Code: 207 Multi-Status
Protocol: HTTP/1.1
Method: PROPFIND
Kept Alive: Yes
Content-Type: application/xml; charset=utf-8
Client Address: /192.168.1.2
Remote Address: matthias.cozycloud.cc/176.31.234.107

Headers:

    PROPFIND /public/sync/principals/me/ HTTP/1.1
Host    matthias.cozycloud.cc
User-Agent  iOS/8.2 (12D508) dataaccessd/1.0
Accept-Language fr-fr
Accept-Encoding gzip, deflate
Accept  */*
Content-Type    text/xml
Prefer  return=minimal
Depth   0
Connection  keep-alive
Cookie  express:sess=eyJwYXNzcG9ydCI6e319; express:sess.sig=1SBZncwHX1_yo8X3CZxeRellg8Y
Authorization   Basic bWU6ZTF5ODUxSXJvbA==
Content-Length  743
Proxy-Connection    keep-alive
Brief   t

OPTIONS 200

Resume:

URL: https://matthias.cozycloud.cc/public/sync/principals/me/
Status: Complete
Response Code: 200 OK
Protocol: HTTP/1.1
Method: OPTIONS
Kep-Alive: Yes
Content-Type:
Client Address: /192.168.1.2
Remote Address: matthias.cozycloud.cc/176.31.234.107

Headers:

    OPTIONS /public/sync/principals/me/ HTTP/1.1
Host    matthias.cozycloud.cc
Authorization   Basic bWU6ZTF5ODUxSXJvbA==
Accept-Encoding gzip, deflate
Accept  */*
Cookie  express:sess=eyJwYXNzcG9ydCI6e319; express:sess.sig=1SBZncwHX1_yo8X3CZxeRellg8Y
Accept-Language fr-fr
Content-Length  0
Connection  keep-alive
Proxy-Connection    keep-alive
User-Agent  iOS/8.2 (12D508) dataaccessd/1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants