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

BB10 Carddav Support #46

Open
ghost opened this issue Aug 6, 2013 · 24 comments
Open

BB10 Carddav Support #46

ghost opened this issue Aug 6, 2013 · 24 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 6, 2013

Hi there,

i can use Radicale with BB10 to sync my calendar. Everything works fine, but Carddav does not work, BB10 always says my entered account data is invalid, but i use the same account with my Caldav.

Thanks.

@liZe
Copy link
Member

liZe commented Aug 6, 2013

Could you please paste the logs you get in Radicale?

@ghost
Copy link
Author

ghost commented Oct 1, 2013

I can -- same issue.

2013-10-01 11:44:42,653 - INFO: PROPFIND request at /karl/contacts/ received
2013-10-01 11:44:42,655 - DEBUG: Request headers:
{'CONTENT_LENGTH': '163',
'CONTENT_TYPE': 'text/xml',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT_ENCODING': 'identity',
'HTTP_AUTHORIZATION': 'Basic .....' , (elided; there's a password in there ;-))
'HTTP_CONNECTION': 'close',
'HTTP_DEPTH': '0',
'HTTP_HOST': 'cudasystems.net:5232',
'HTTP_USER_AGENT': 'RIM',
'PATH_INFO': '/karl/contacts/',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.1.24',
'REMOTE_HOST': 'D14.Denninger.Net',
'REQUEST_METHOD': 'PROPFIND',
'SCRIPT_NAME': '',
'SERVER_NAME': 'FS.Denninger.net',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
'wsgi.errors': <open file '/dev/null', mode 'w' at 0x805063300>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x801915a78>,
'wsgi.input': <socket._fileobject object at 0x805099cd0>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
2013-10-01 11:44:42,655 - DEBUG: Sanitized path: /karl/contacts/
2013-10-01 11:44:42,655 - DEBUG: Request content:
<ns0:propfind xmlns:ns0="DAV:" xmlns:ns1="http://calendarserver.org/ns/">ns0:prop<ns0:resourcetype /><ns0:displayname /><ns1:getctag />/ns0:prop/ns0:propfind
2013-10-01 11:44:42,655 - DEBUG: Connecting to IMAP server localhost:143.
2013-10-01 11:44:42,660 - WARNING: IMAP server is local. Will allow transmitting unencrypted credentials.
2013-10-01 11:44:42,668 - DEBUG: Authenticated IMAP user karl via localhost.
2013-10-01 11:44:42,669 - DEBUG: karl has read access to collection karl/contacts/
2013-10-01 11:44:42,669 - DEBUG: karl has write access to collection karl/contacts/
2013-10-01 11:44:42,672 - DEBUG: Response content:

/karl/contacts/ contacts CS:getctag"0"/CS:getctag HTTP/1.1 200 OK

2013-10-01 11:44:42,672 - DEBUG: Answer status: 207 Unknown

And the error I get back is "Your account cannot be authenticated with your service provider. Please make sure that the account settings are correct."

But the authentication check above (against my IMAP server) passed......

Calendar sync works, both are running over SSL (note that for contacts BB10 implies a "https" in front of the URL and will NOT work on a non-SSL connection.)

@ghost
Copy link
Author

ghost commented Oct 8, 2013

I think I may have fixed this.

When I looked in the Radicale directory the props entry had "VCALENDAR" as the type. I changed it to "VADDRESSBOOK" and was able to add the account and a test entry.

I am not yet sure if it's actually working correctly (BB10 has a habit of duplicating contacts when things go wrong) but at first-blush appearance it does seem to be ok. I'll update this in a couple of days if, in fact, it is working as while this requires manual intervention you may only need to screw with it once.

@liZe
Copy link
Member

liZe commented Oct 18, 2013

For some clients, when you can set the URL, it's quite easy to add .ics or .vcf at the end of the URL, as Radicale can use that to know what kind of collections it is supposed to create. If you can do that with BB10, it should fix your problem. If you can't, then I'm afraid that a manual intervention is needed.

@ghost
Copy link
Author

ghost commented Oct 18, 2013

I tried that and it didn't set the collection type, but manually editing it did. It has been working fine now for a couple of weeks with no duplicated entries or other misbehavior.

The other things I've found with BB10 is that the email program will take a calendar proposition (e.g. something with a .ICS extension) and propose it for the calendar you have linked to that account. However, when the calendar is served by Radicale it will not allow it to be inserted directly -- it does when linked to some other servers (specifically Google's.) It appears that a property is missing from Radicale but I don't know what the BB10 device wants to see advertised in order to allow that to work.

@dionorgua
Copy link

I've tried to use Radicale with BB10 too.

First of all I'm able to add CardDAV account and later add a few contacts to such addressbook. Also I can confirm that after adding these contacts appears in Radicale DB.

At the same time time it looks like BB client is unable to actually retrieve contacts from radicale server. So once contacts are added, I've basically removed CardDAV account from device, after this I've removed these contacts from local addressbook. At this point Radicale db still contains contacts.

Then I've tried to add same CardDAV account again. It also works ok, but for some unknown reason Blackberry addressbook is not populated with contacts from CardDAV account.

So for me currently Radicale works somehow like 'write-only' when it's possible to 'backup' contacts but there is no way to download them back to device.

Here is radicale log file:
http://dion.org.ua/uploads/2013/11/radicale.log

Any ideas?

@ghost
Copy link
Author

ghost commented Nov 26, 2013

addressbook.vcf contains the contacts if you look manually?

If so remove the account entirely from the BB10 device. Then look in the Contacts app; they should disappear. You should not need to do anything else.

Adding the account back should repopulate them.

What version of BB10 OS are you running? I haven't had problems with 10.2.0 or 10.2.1; both work fine bidirectionally (read and write).

It does not appear that the phone is requesting the contacts from that logfile.

@dionorgua
Copy link

addressbook.vcf (on server) contains all expected contacts. So:

  1. I've removed account from BB device. Corresponding tab disappeared from Contacts app. But there is still "All Contacts" tab and it still shows these contacts, but they are not linked to any account anymore. So basically they are from some local storage.
  2. Once account is added again, contacts are NOT populated again.

I've also tried to reproduce it with two wiped BB10 devices. Both initially have empty addressbook + clean database on server.

I've added same CardDAV URL (with same username/password) to both devices and later added one contact to first device and another contact to second device.

Both devices are not synced at all. At the same time addressbook.vcf on server contains information from both devices (two contacts).

I've no idea, what's going on..

@ghost
Copy link
Author

ghost commented Nov 26, 2013

What software rev?

@dionorgua
Copy link

It's 0.8-1 from debian package. And BB OS 10.2.0.429

@dionorgua
Copy link

Initially I was trying to quickly migrate contacts from syncevolution to BB10 device. So basically I was able to import them from syncevolution to radicale.. And later I can't download them to BB10.

@ghost
Copy link
Author

ghost commented Nov 26, 2013

10.2.0.429 is known good; I ran that against Radicale for quite a while.

What's in the "props" file associated with the contact file (under the Radicale working directory)?

It should be: {"tag": "VADDRESSBOOK"}

If that's not there fix that and try again.

I've wiped my device several times loading leaks and have never had problems with contacts repopulating.

@dionorgua
Copy link

Yes. It's {"tag": "VADDRESSBOOK"}.

@ghost
Copy link
Author

ghost commented Nov 26, 2013

Hmmm... I'm running 0.8 against FreeBSD here and it's working fine. One thing I have found is that the BB10 client will create calendar events that Lightning cannot read and refuses to display, but they're there and are valid. It has to do with the timezones that BB10 uses -- apparently Lightning insists on GMT offsets instead of complex names (in which zones can be named as well as offset) and barfs in the entries.

Other than that I've not had any problems.....

@dionorgua
Copy link

Another interesting thing is that I can't update existing contacts on server. I've initially added contact named "User5" with just email address. It was synced to server. Later I've tried to add phone number. It looks like corresponding VCARD in addressbook.vcf was not updated at all.

log:
http://dion.org.ua/uploads/2013/11/radicale2.log

@dionorgua
Copy link

It also looks like 'removing' doesn't work. (Removed contacts stays in .vcf file on server)

@Zbri
Copy link

Zbri commented Aug 29, 2014

I'm having the sames issues as @dionorgua with using Radicale's CardDAV functionality with a BlackBerry OS 10(.2.1) device. Looking through the logs it appears that each time the device tries to sync it will make a request for the change time (getctag) of all items in the collection, and Radicale returns an empty list and a 404 error for each item.

I realise that fixing this is classed as a feature for release 2.0, but could someone take a look at the log output I've pasted below, as I think it isolates/demonstrates the problem better than has been previously achieved in this bug.

The device's request, as in the Radicale log file.

2014-08-29 21:15:46,359 - DEBUG: Request content:
<ns0:propfind xmlns:ns0="DAV:" xmlns:ns1="http://calendarserver.org/ns/"><ns0:prop><ns0:resourcetype /><ns0:displayname /><ns1:getctag /></ns0:prop></ns0:propfind>

The debug log continues like this (I've only included a single response as they're the same for each item).

2014-08-29 21:15:46,365 - DEBUG: Rights type 'owner_only'
2014-08-29 21:15:46,373 - DEBUG: Test if 'me:me/addressbook.vcf' matches against '.+:^me(/.*)?$' from section 'rw'
2014-08-29 21:15:46,374 - DEBUG: Section 'rw' matches
2014-08-29 21:15:46,376 - DEBUG: me has read access to collection me/addressbook.vcf/
2014-08-29 21:15:46,377 - DEBUG: Rights type 'owner_only'
2014-08-29 21:15:46,385 - DEBUG: Test if 'me:me/addressbook.vcf' matches against '.+:^me(/.*)?$' from section 'rw'
2014-08-29 21:15:46,386 - DEBUG: Section 'rw' matches
2014-08-29 21:15:46,387 - DEBUG: me has write access to collection me/addressbook.vcf/
2014-08-29 21:15:46,389 - DEBUG: me has read access to item fc4bdcba-2fb3-55e4-9b06-b578cac908b7.vcf
2014-08-29 21:15:46,390 - DEBUG: me has write access to item fc4bdcba-2fb3-55e4-9b06-b578cac908b7.vcf
2014-08-29 21:15:46,391 - DEBUG: me has read access to item 1f52e100-2fb3-55e4-bfc9-b578cac908b7.vcf
2014-08-29 21:15:46,392 - DEBUG: me has write access to item 1f52e100-2fb3-55e4-bfc9-b578cac908b7.vcf
2014-08-29 21:15:46,394 - DEBUG: me has read access to item df115de4-2fb4-55e4-b78a-b578cac908b7.vcf
2014-08-29 21:15:46,400 - DEBUG: me has write access to item df115de4-2fb4-55e4-b78a-b578cac908b7.vcf
2014-08-29 21:15:46,401 - DEBUG: me has read access to item 71594d9c-2fb3-55e4-bdde-b578cac908b7.vcf
2014-08-29 21:15:46,402 - DEBUG: me has write access to item 71594d9c-2fb3-55e4-bdde-b578cac908b7.vcf
2014-08-29 21:15:46,403 - DEBUG: me has read access to item 01594d9c-2fb3-55e4-bdde-b578cac908b7.vcf
2014-08-29 21:15:46,405 - DEBUG: me has write access to item 01594d9c-2fb3-55e4-bdde-b578cac908b7.vcf
2014-08-29 21:15:46,441 - DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/me/addressbook.vcf/71594d9c-2fb3-55e4-bdde-b578cac908b7.vcf</href>
    <propstat>
      <prop>
        <resourcetype />
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <displayname />
        <CS:getctag />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>

@ducapedia
Copy link

Same here... Radicale 0.9 and blackberry z10 with last official stable 10.2.1.2977
In log aperars the same error as above "404 Not Found" and what I do put in BlackBerry goes to radicale, but, what I put in another client doesnt go to BlackBerry, include that one I made in BB but edit in another client, come back as deleted in BB device.
all props are correct, that ones for Calendar are tag, VCALENDAR etc, and the one for conctacts tag VADDRESSBOOK etc.
I cant find whats is wrong, because with Fruux (www.fruux.com, free CardDAV and CalDAV online), works fine in BlackBerry, Evolution, Lightning/Thunderbird etc... but in Radicale only CalDAV is working fine for the same situation.

@singpolyma
Copy link
Contributor

Do updates work with BB10 for anyone else? Editing seems to not work... it seems that when I edit a contact BB10 first does a PROPFIND and then does a PUT to /singpolyma/addressbook.vcf/UID.vcf where the UID does not match the UID of the existing contact, and radicale issues 412 Precondition Failed

@singpolyma
Copy link
Contributor

Seems this is likely the result of sending the header:

'HTTP_IF_MATCH': '"417df693767b12517efa320f2f1b59a6"'

@singpolyma
Copy link
Contributor

Ok, so the problem is that BB10 is sending up an edit with a new UID and URL, but with an etag, which of course fails. Blergh.

@singpolyma
Copy link
Contributor

I worked with this a lot more, trying to get BB10 to even fetch contacts down at all, and I'm not sure what's going on. It may just be completely broken. I got Contacts Sync from blackberry world and that is working for now.

@allwi
Copy link

allwi commented Sep 18, 2016

Hi, I only tried this weekend to move my calendar and address book off the public cloud.

As mentioned in this thread, the calendar sync works very well between BB10 and radicale but not the addressbook: I also can add entries but not retrieve them.
I'm using Radicale 1.1 and BB OS 10.3.2.2848.

Do you have a native solution? or any idea how to patch Radicale so that no other app is needed on the BB device?

@nerdcraft
Copy link

Hi allwi,
can you please tell me the entries you have made in the BB OS10 caldav account? I desperately try to get my BB passport to work with radicale for month now. Nothing works!

Thank you!

Eric

@pbiering pbiering removed this from the 3.0.0 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants