-
Notifications
You must be signed in to change notification settings - Fork 4
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
No "sync signal" #5
Comments
CardDAV clients can either receive changes by regularly polling the server (e. g. every hour) or by server push. Apple has a propriety push service for contacts, that it uses for iOS, maybe also for macOS. I don't know if synology has access to the apple push notification service for contacts. If the server is polled, then I would not expect a new contact to show immediately but only after the next sync / triggering a manual refresh (if thats possible). In any case, there is no way for a client to tell a CardDAV server that it should trigger a synchronization with other clients after making a change. There is also absolutely no need to, since at the time the client writes a new card to the server the server knows there has been a change. Unfortunately, I cannot help you with that problem, but I think the answer you got from the support is nonsense. The only thing I might imagine is that the card you store via script is broken in some way that mac addressbook refuses to process it, and editing it in the synology app may fix the card. For that, you should log the HTTP traffic by passing a HTTP logger to the library and see the vcard that is uploaded. You can paste it here, maybe I can see something obvious that is not ok with it. |
can you show me how I can use a http logger? |
Config::init(
new \Wa72\SimpleLogger\FileLogger('lib.log', \Psr\Log\ LogLevel::DEBUG),
new \Wa72\SimpleLogger\FileLogger('http.log', \Psr\Log\LogLevel::DEBUG)
); |
Fatal error: Uncaught Error: Class 'Wa72\SimpleLogger\FileLogger' not found in carddav.php:32 Stack trace: #0 {main} thrown in carddav.php on line 32 |
You can run composer update (without --no-dev option) to fetch it. Alternatively you can log to console, for that see quickstart.php for example. |
Which code part of QuickStart.php log to console? |
Maybe this information can help: I created a contact manually via web interface and export this contact as vcf This is the content:
I will create the vcard like the same scheme:
This is the output of "var_dump($vcard)":
And I get this error messages now:
|
Well the error messages tell you what the problem is. See https://tools.ietf.org/html/rfc6350#page-29 for N, you find ADR in the same document. |
yes, this is my first version, which works:
var_dump($vcard);
No errors. But will not shown in the apple address book, like I explained in the first. post :( ** UPDATE **
This is the vcard content of the contact, which I created via php and which will be NOT shown in the apple address book:
If I modified the "problem contact" via web interface : It will shown in the apple address book.
Could it be, that the apple address book has a problem with "Version 4.0"? |
Maybe. You can set version like any other property to see if it helps. Normally, the CardDAV server must convert a card to 3.0 version if the client does not explicitly request a different version or format. So simply add to your array when you create the vcard: 'VERSION' => '3.0', In the meantime, I could try myself with a synology server. I cannot reproduce your behavior, but then again I used a client that creates v3.0 cards. For me, mac os contacts will only refresh the server contacts when I quit (command-Q) the program completely and start it again, then it would sync on start. This is even when I configure it to update every minute. With a nextcloud server, I don't get any contacts downloaded with apple contacts at all... |
I am using the DSM 7.0 Beta of Synology. And you know what? |
Great that it works for, as I said my experience using mac os contacts with anything different than iCloud was less positive :-) |
Good morning,
there is a issue - I hope you can help.
I am using "Synology Contacts" (carddav server) in combination with your carddav php script.
Situation 1 (OK):
Situation 2 (Issue):
I asked the Synology hotline for this issue:
They told me, that your script should "send a signal" that the carddav server have to start a synchronization or something like that. maybe a "signal" that something has changed.
Have you an idea?
The text was updated successfully, but these errors were encountered: