‘Couldn’t find CalDAV or CardDAV service’ when setting up new accounts, while synchronisation works fine



  • I have some Nextcloud-accounts synced via CalDAV with DavX⁵. These accounts work fine and are still syncing.

    However, when i want to connect a new account with DavX⁵, it shows the error message:

    Couldn't find CalDAV or CardDAV service
    

    It happens on different servers with different reverse proxy software and configuration (all nextcloud but different versions and different operators) and on multiple devices, that’s why i believe it might be a DavX⁵ issue.

    Debug Log: https://pastebin.com/MLh4fka0 (example.com + 1.2.3.4 are just replacements for the real domain/ip)


  • developer

    Hello,

    2019-01-28 21:59:27 360 [ui.setup.DavResourceFinder] PROPFIND/OPTIONS on user-given URL failed
    EXCEPTION java.net.ConnectException: Failed to connect to example.com/1.2.3.4:443
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:248)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:166)
        at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
        at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
        at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:225)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
        at okhttp3.RealCall.execute(RealCall.java:92)
        at at.bitfire.dav4jvm.DavResource$propfind$1.invoke(DavResource.kt:323)
        at at.bitfire.dav4jvm.DavResource$propfind$1.invoke(DavResource.kt:34)
        at at.bitfire.dav4jvm.DavResource.followRedirects(DavResource.kt:378)
        at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:318)
        at at.bitfire.davdroid.ui.setup.DavResourceFinder.checkUserGivenURL(DavResourceFinder.kt:187)
        at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:122)
        at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:79)
        at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(DetectConfigurationFragment.kt:136)
        at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(DetectConfigurationFragment.kt:120)
        at androidx.loader.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:307)
        at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:60)
        at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:48)
        at androidx.loader.content.ModernAsyncTask$2.call(ModernAsyncTask.java:141)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
    Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
    

    means that DAVx⁵ couldn’t connect to the server because there is no open port (or maybe some firewall blocked it with RST). Can you access the Base URL in your Android browser?



  • @rfc2822 said in ‘Couldn’t find CalDAV or CardDAV service’ when setting up new accounts, while synchronisation works fine:

    Can you access the Base URL in your Android browser?

    If you mean example.com/remote.php/dav then i can open it in the webbrowser, and it shows the classic “This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client”.

    The Sync client works fine just as the existing DavX⁵ synchronisation. Just setting up a new sync does not work with DavX⁵.

    Is there a way/tool to investigate the DAV connection, so i can give you more useful information?


  • developer

    Maybe you can have a look at the server/proxy/firewall logs to see why the connection is being refused by the server?



  • @rfc2822
    Yes, i found something, however it doesn’t make it any less weird:

    My account is syncing properly, i can see it in DavX⁵ and i see it in the access logs of nginx (answer code 207). Now, if i want to add the same account again, the requests are all answered with an error 401 at the same time the error shows in DavX⁵.

    For the other account i added, the access is immediately denied for all requests.

    This totally looks like a wrong credentials issue, however, as i mentioned, my own account works just fine, as long as i do not want to add it again. I am clueless. 🤔


  • developer

    @moonlies Did you use an app password for the first account? In this case, the app password would stay valid even when the main password changes.


Log in to reply
 

Maybe you're interested in these topics?

  • 3
  • 2
  • 2
  • 3
  • 26