Not yet?
OSX 10.14.6 on MBP2017
1.7.1
--
Bug?
Yes, it appears to auto-guess where I'm hosting CardDAV. I've got a custom e-mail domain hosted with Mailfence [email protected], using their IMAP servers imap.mailfence.com. Looking at the logs, it tries to access https://example.com which is not hosting anything.
E-mail works fine, it's just giving me a "sync issue" warning.
70843 [2019-10-15 14:36:39.793] [calContacts] [info] Encountered exception: {"debuginfo":"https://example.com/","key":"Peer certificate cannot be authenticated with given CA certificates","retryable":false,"what":"std::exception"}
70843 [2019-10-15 14:36:39.793] [calContacts] [critical]
***
*** Mailspring GenericException occurred during program execution:
*** {"debuginfo":"https://example.com/","key":"Peer certificate cannot be authenticated with given CA certificates","retryable":false,"what":"std::exception"}
***
70843 [2019-10-15 14:36:39.793] [calContacts] [critical] *** Stack trace (line numbers are approximate):
*** in mailsync ValidateRequestResp(CURLcode, void*, __1::string)
*** in mailsync PerformRequest(void*)
*** in mailsync DAVWorker::performXMLRequest(__1::string, __1::string, __1::string)
*** in mailsync DAVWorker::resolveAddressBook()
*** in mailsync DAVWorker::runContacts()
*** in mailsync DAVWorker::run()
*** in mailsync runCalContactsSyncWorker()
*** in mailsync main::$_7::operator()() const
*** in mailsync void* __1::__thread_proxy(void*)
*** 0x7fff6a7b22eb _pthread_body
*** 0x7fff6a7b5249 _pthread_start
*** 0x7fff6a7b140d thread_start
***
I have the same issue using the mail-server of our hoster which is another domain than our webserver has.
This leads to exceptions and sets mailspring to a state of "unusableness". (Replaced URLs in the trace by placeholders)
_What operating system are you using?_
OSX 10.15 on MBP2016
_What version of Mailspring are you using?_
1.7.1
Error: null24106 [2019-10-16 10:54:10.076] [calContacts] [critical]
***
*** Mailspring GenericException occurred during program execution:
*** {\"debuginfo\":\"https://somedomain.de/\",\"key\":\"SSL peer certificate or SSH remote key was not OK\",\"retryable\":false,\"what\":\"std::exception\"}
***
24106 [2019-10-16 10:54:10.077] [calContacts] [critical] *** Stack trace (line numbers are approximate):
*** in mailsync ValidateRequestResp(CURLcode, void*, __1::string)
*** in mailsync PerformRequest(void*)
*** in mailsync DAVWorker::performXMLRequest(__1::string, __1::string, __1::string)
*** in mailsync DAVWorker::resolveAddressBook()
*** in mailsync DAVWorker::runContacts()
*** in mailsync DAVWorker::run()
*** in mailsync runCalContactsSyncWorker()
*** in mailsync main::$_7::operator()() const
*** in mailsync void* __1::__thread_proxy(void*)
*** 0x7fff70427d76 _pthread_start
*** 0x7fff704245d7 thread_start
***
libc++abi.dylib: terminate_handler unexpectedly threw an exception
at ChildProcess.onStreamCloseOrExit (file:///var/folders/bb/n7t3rs157850byt_jfdcq9k80000gn/T/nylas-build/electron-packager/darwin-x64/Mailspring-darwin-x64/Electron.app/Contents/Resources/app/src/mailsync-process.ts:289:17)
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:442:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
Exactly same problem for me, but on Arch Linux. Logs are similar.
Hey folks! Yep - Mailspring performs CardDAV lookup using DNS SRV records and the .well-known HTTP requests. Basically, given your email address [email protected] it:
1) Looks up a DNS srv record for _carddavs._tcp.example.com. If one exists, that gives it a domain to use for carddav, for example, card.dav.example.com.
2) Next, it tries to use the well-known URL standard to find the root of the carddav server at this address (or the root example.com if the SRV record lookup failed) by doing a GET to:
https://card.dav.example.com/.well-known/carddav
If the server supports this standard, it 301's or 302's to the carddav root, something like:
https://card.dav.example.com/carddav/v1
This /should/ all be failing quietly - it appears in that last crash excerpt above that not only is it encountering an error but it's ALSO terminating the process entirely, which is very different and not good. I'm investigating that now.
At some point we'll add support for custom carddav servers, but in the meantime you can help Mailspring discover your CardDAV server by adding a SRV record to your custom domain example.com. Doing that will actually allow virtually every CardDAV / CalDAV application to work without custom configuration on your part, so it may be a quick win!
Most helpful comment
Hey folks! Yep - Mailspring performs CardDAV lookup using DNS SRV records and the
.well-knownHTTP requests. Basically, given your email address[email protected]it:1) Looks up a DNS srv record for
_carddavs._tcp.example.com. If one exists, that gives it a domain to use for carddav, for example,card.dav.example.com.2) Next, it tries to use the
well-knownURL standard to find the root of the carddav server at this address (or the root example.com if the SRV record lookup failed) by doing a GET to:https://card.dav.example.com/.well-known/carddavIf the server supports this standard, it 301's or 302's to the carddav root, something like:
https://card.dav.example.com/carddav/v1This /should/ all be failing quietly - it appears in that last crash excerpt above that not only is it encountering an error but it's ALSO terminating the process entirely, which is very different and not good. I'm investigating that now.
At some point we'll add support for custom carddav servers, but in the meantime you can help Mailspring discover your CardDAV server by adding a SRV record to your custom domain example.com. Doing that will actually allow virtually every CardDAV / CalDAV application to work without custom configuration on your part, so it may be a quick win!