UnauthorizedException in auto-detection when using Basic Auth reverse proxy



  • Hi,

    I’m using Radicale as CalDAV/CardDAV server behind a reverse proxy which is setup according to this documentation: The whole Radicale server is protected via Basic authentication by the reverse proxy (this includes auto-detection URLs). The auto-detection fails with at.bitfire.dav4jvm.exception.UnauthorizedException because it seems that it does not use the provided authentication (username + password) for the account.

    Is there a way to get my setup work?

    Thanks!


    More details:

    curl without authentication:

    $ curl -v https://________.____________.de
    > GET / HTTP/2
    > Host: ________.____________.de
    > User-Agent: curl/7.65.3
    > Accept: */*
    > 
    < HTTP/2 401 
    < server: openresty/1.15.8.1
    < date: Mon, 26 Aug 2019 07:55:47 GMT
    < content-type: text/html
    < content-length: 185
    < www-authenticate: Basic realm=""
    < strict-transport-security: max-age=15724800; includeSubDomains
    < 
    <html>
    <head><title>401 Authorization Required</title></head>
    <body>
    <center><h1>401 Authorization Required</h1></center>
    <hr><center>openresty/1.15.8.1</center>
    </body>
    </html>
    

    curl with authentication:

    $ curl -v -u '_______:__________________________' https://________.____________.de
    > GET / HTTP/2
    > Host: ________.____________.de
    > Authorization: Basic ___________________________________________
    > User-Agent: curl/7.65.3
    > Accept: */*
    > 
    < HTTP/2 302 
    < server: openresty/1.15.8.1
    < date: Mon, 26 Aug 2019 07:30:40 GMT
    < content-type: text/plain; charset=utf-8
    < content-length: 18
    < location: .web
    < strict-transport-security: max-age=15724800; includeSubDomains
    < 
    Redirected to .web
    

    DAVx5 logs:

    
    

    — BEGIN DEBUG INFO —

    LOGS:
    2019-08-26 09:01:29 73578 [ui.setup.DavResourceFinder] Finding initial carddav service configuration
    2019-08-26 09:01:29 73578 [ui.setup.DavResourceFinder] Checking user-given URL: https://..de/
    2019-08-26 09:01:29 73578 [HttpClient] --> PROPFIND https://
    ..de/
    2019-08-26 09:01:29 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:29 73578 [HttpClient] Content-Length: 290
    2019-08-26 09:01:29 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:29 73578 [HttpClient]
    2019-08-26 09:01:29 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><resourcetype /><displayname /><CARD:addressbook-description /><CARD:addressbook-home-set /><current-user-principal /></prop></propfind>
    2019-08-26 09:01:29 73578 [HttpClient] --> END PROPFIND (290-byte body)
    2019-08-26 09:01:30 73578 [HttpClient] <-- 401 https://
    .____________.de/ (843ms)
    2019-08-26 09:01:30 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:30 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:27 GMT
    2019-08-26 09:01:30 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] www-authenticate: Basic realm=“Radicale - Password Required”
    2019-08-26 09:01:30 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] Access to the requested resource forbidden.
    2019-08-26 09:01:30 73578 [HttpClient] <-- END HTTP (43-byte body)
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] PROPFIND/OPTIONS on user-given URL failed
    EXCEPTION at.bitfire.dav4jvm.exception.UnauthorizedException: HTTP 401
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:352)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.checkUserGivenURL(DavResourceFinder.kt:180)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:115)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:73)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:30 73578 [HttpClient] --> PROPFIND https://..de/.well-known/carddav
    2019-08-26 09:01:30 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:30 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:30 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:30 73578 [HttpClient] <-- 404 https://
    .________.de/.well-known/carddav (71ms)
    2019-08-26 09:01:30 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:30 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:27 GMT
    2019-08-26 09:01:30 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] The requested resource could not be found.
    2019-08-26 09:01:30 73578 [HttpClient] <-- END HTTP (42-byte body)
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] Well-known URL detection failed
    EXCEPTION at.bitfire.dav4jvm.exception.NotFoundException: HTTP 404
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:356)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:119)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:73)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] No principal found at user-given URL, trying to discover
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] Looking up SRV records for carddavs.tcp...de
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] Didn’t find carddav service, trying at https://
    ..de:443
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] Trying to determine principal from initial context path=https://
    ..de/.well-known/carddav
    2019-08-26 09:01:30 73578 [HttpClient] --> PROPFIND https://
    .
    .de/.well-known/carddav
    2019-08-26 09:01:30 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:30 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:30 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:30 73578 [HttpClient] <-- 404 https://
    .
    __________.de/.well-known/carddav (46ms)
    2019-08-26 09:01:30 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:30 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:28 GMT
    2019-08-26 09:01:30 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] The requested resource could not be found.
    2019-08-26 09:01:30 73578 [HttpClient] <-- END HTTP (42-byte body)
    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] No resource found
    EXCEPTION at.bitfire.dav4jvm.exception.NotFoundException: HTTP 404
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:356)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.discoverPrincipalUrl(DavResourceFinder.kt:365)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:138)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:73)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:30 73578 [ui.setup.DavResourceFinder] Trying to determine principal from initial context path=https://..de/
    2019-08-26 09:01:30 73578 [HttpClient] --> PROPFIND https://
    ..de/
    2019-08-26 09:01:30 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:30 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:30 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:30 73578 [HttpClient]
    2019-08-26 09:01:30 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:30 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:31 73578 [HttpClient] <-- 401 https://
    .____________.de/ (99ms)
    2019-08-26 09:01:31 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:31 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:28 GMT
    2019-08-26 09:01:31 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] www-authenticate: Basic realm=“Radicale - Password Required”
    2019-08-26 09:01:31 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] Access to the requested resource forbidden.
    2019-08-26 09:01:31 73578 [HttpClient] <-- END HTTP (43-byte body)
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] No resource found
    EXCEPTION at.bitfire.dav4jvm.exception.UnauthorizedException: HTTP 401
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:352)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.discoverPrincipalUrl(DavResourceFinder.kt:365)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:138)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:73)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Finding initial caldav service configuration
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Checking user-given URL: https://..de/
    2019-08-26 09:01:31 73578 [HttpClient] --> PROPFIND https://
    ..de/
    2019-08-26 09:01:31 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] Content-Length: 435
    2019-08-26 09:01:31 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><resourcetype /><displayname /><n0:calendar-color xmlns:n0=“http://apple.com/ns/ical/” /><CAL:calendar-description /><CAL:calendar-timezone /><current-user-privilege-set /><CAL:supported-calendar-component-set /><CAL:calendar-home-set /><current-user-principal /></prop></propfind>
    2019-08-26 09:01:31 73578 [HttpClient] --> END PROPFIND (435-byte body)
    2019-08-26 09:01:31 73578 [HttpClient] <-- 401 https://
    .____________.de/ (68ms)
    2019-08-26 09:01:31 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:31 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:28 GMT
    2019-08-26 09:01:31 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] www-authenticate: Basic realm=“Radicale - Password Required”
    2019-08-26 09:01:31 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] Access to the requested resource forbidden.
    2019-08-26 09:01:31 73578 [HttpClient] <-- END HTTP (43-byte body)
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] PROPFIND/OPTIONS on user-given URL failed
    EXCEPTION at.bitfire.dav4jvm.exception.UnauthorizedException: HTTP 401
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:352)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.checkUserGivenURL(DavResourceFinder.kt:189)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:115)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:80)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:31 73578 [HttpClient] --> PROPFIND https://..de/.well-known/caldav
    2019-08-26 09:01:31 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:31 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:31 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:31 73578 [HttpClient] <-- 404 https://
    .________.de/.well-known/caldav (179ms)
    2019-08-26 09:01:31 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:31 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:28 GMT
    2019-08-26 09:01:31 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] The requested resource could not be found.
    2019-08-26 09:01:31 73578 [HttpClient] <-- END HTTP (42-byte body)
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Well-known URL detection failed
    EXCEPTION at.bitfire.dav4jvm.exception.NotFoundException: HTTP 404
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:356)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:119)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:80)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] No principal found at user-given URL, trying to discover
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Looking up SRV records for caldavs.tcp...de
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Didn’t find caldav service, trying at https://
    ..de:443
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Trying to determine principal from initial context path=https://
    ..de/.well-known/caldav
    2019-08-26 09:01:31 73578 [HttpClient] --> PROPFIND https://
    .
    .de/.well-known/caldav
    2019-08-26 09:01:31 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:31 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:31 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:31 73578 [HttpClient] <-- 404 https://
    .
    __________.de/.well-known/caldav (173ms)
    2019-08-26 09:01:31 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:31 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:28 GMT
    2019-08-26 09:01:31 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] The requested resource could not be found.
    2019-08-26 09:01:31 73578 [HttpClient] <-- END HTTP (42-byte body)
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] No resource found
    EXCEPTION at.bitfire.dav4jvm.exception.NotFoundException: HTTP 404
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:356)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.discoverPrincipalUrl(DavResourceFinder.kt:365)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:138)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:80)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] Trying to determine principal from initial context path=https://..de/
    2019-08-26 09:01:31 73578 [HttpClient] --> PROPFIND https://
    ..de/
    2019-08-26 09:01:31 73578 [HttpClient] Content-Type: application/xml; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] Content-Length: 198
    2019-08-26 09:01:31 73578 [HttpClient] Depth: 0
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] <?xml version=‘1.0’ encoding=‘UTF-8’ ?><propfind xmlns=“DAV:” xmlns:CAL=“urn:ietf:params:xml:ns:caldav” xmlns:CARD=“urn:ietf:params:xml:ns:carddav”><prop><current-user-principal /></prop></propfind>
    2019-08-26 09:01:31 73578 [HttpClient] --> END PROPFIND (198-byte body)
    2019-08-26 09:01:31 73578 [HttpClient] <-- 401 https://
    .____________.de/ (55ms)
    2019-08-26 09:01:31 73578 [HttpClient] server: openresty/1.15.8.1
    2019-08-26 09:01:31 73578 [HttpClient] date: Mon, 26 Aug 2019 07:01:29 GMT
    2019-08-26 09:01:31 73578 [HttpClient] content-type: text/plain; charset=utf-8
    2019-08-26 09:01:31 73578 [HttpClient] www-authenticate: Basic realm=“Radicale - Password Required”
    2019-08-26 09:01:31 73578 [HttpClient] strict-transport-security: max-age=15724800; includeSubDomains
    2019-08-26 09:01:31 73578 [HttpClient]
    2019-08-26 09:01:31 73578 [HttpClient] Access to the requested resource forbidden.
    2019-08-26 09:01:31 73578 [HttpClient] <-- END HTTP (43-byte body)
    2019-08-26 09:01:31 73578 [ui.setup.DavResourceFinder] No resource found
    EXCEPTION at.bitfire.dav4jvm.exception.UnauthorizedException: HTTP 401
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:352)
    at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:338)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:432)
    at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:325)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:385)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.discoverPrincipalUrl(DavResourceFinder.kt:365)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:138)
    at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:80)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:83)
    at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:62)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

    SOFTWARE INFORMATION

    • at.bitfire.davdroid 2.5.4-ose (298) from com.google.android.packageinstaller
    • com.android.providers.contacts 8.1.0 (27)
    • com.android.providers.calendar 8.1.0 (27)
    • com.google.android.contacts 3.7.7.260733580 (2243311) from com.android.vending
    • com.google.android.calendar 6.0.44-261313226-release (2016267978) from com.android.vending
    • ws.xsoh.etar 1.0.17 (19) from com.google.android.packageinstaller

    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED

    CONFIGURATION
    Power saving disabled: yes
    android.permission.READ_CONTACTS: granted
    android.permission.WRITE_CONTACTS: granted
    android.permission.READ_CALENDAR: granted
    android.permission.WRITE_CALENDAR: granted
    org.dmfs.permission.READ_TASKS: denied
    org.dmfs.permission.WRITE_TASKS: denied
    android.permission.ACCESS_COARSE_LOCATION: granted
    System-wide synchronization: automatically
    Account: @..de
    Address book sync. interval: 240 min
    Calendar sync. interval: 240 min
    OpenTasks sync. interval: —
    WiFi only: true, SSIDs: [TklQRQ==, TklQRS1sZWdhY3k=]
    [CardDAV] Contact group method: GROUP_VCARDS
    [CalDAV] Time range (past days): 90
    Manage calendar colors: true
    Use event colors: false
    Address book account: Kontakte (
    @..de +A)
    Main account: Account {name=@..de, type=bitfire.at.davdroid}
    URL: http://
    :5232/____/88f47c0d-ee8c-44b1-a3db-5b70f1153712/
    Sync automatically: true

    SQLITE DUMP
    android_metadata
    | locale |
    | en_US |

    sqlite_sequence
    | name | seq |
    | service | 4 |
    | homeset | 4 |
    | collection | 8 |

    service
    | id | accountName | type | principal |
    | 3 | @..de | carddav | http://:5232// |
    | 4 | @..de | caldav | http://
    :5232/
    ______/ |

    homeset
    | id | serviceId | url | privBind | displayName |
    | 3 | 3 | http://:5232// | 1 | <null> |
    | 4 | 4 | http://
    :5232/__/ | 1 | <null> |

    collection
    | id | serviceId | type | url | privWriteContent | privUnbind | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | supportsVJOURNAL | source | sync |
    | 7 | 3 | ADDRESS_BOOK | http://:5232//88f47c0d-ee8c-44b1-a3db-5b70f1153712/ | 1 | 1 | 0 | Kontakte | <null> | <null> | <null> | 0 | 0 | <null> | <null> | 1 |
    | 8 | 4 | CALENDAR | http://
    :5232/__/a32410fc-a6b2-4028-9b98-f9e7a33d98b4/ | 1 | 1 | 0 | Calendar | <null> | -37632 | <null> | 1 | 0 | <null> | <null> | 1 |

    room_master_table
    | id | identity_hash |
    | 42 | a7554d1ebc5ecfe0c7aefe271485d63c |

    SYSTEM INFORMATION
    Android version: 8.1.0 (OPM7.181205.001)
    Device: LGE Nexus 5X (bullhead)

    — END DEBUG INFO —


  • developer

    This configuration shouldn’t be a problem. Why do you think that no authentication is used, instead of user name/password are wrong? Does it work when you turn off Basic authentication in your proxy for testing purpose?

    Otherwise, can you provide a test account so that I can have a look?



  • Thanks for the quick answer!

    While enabling debug logging in Radicale, I’ve noticed a misconfiguration in the authentication of Radicale, which causes the problems. After correcting the configuration (changed auth.type from none to http_x_remote_user) another test creating an account with DAVx5 succeeds.

    Thanks for the great app!


  • developer

    @NIPE-SYSTEMS Thanks for the update!


Log in to reply
 

Similar topics

  • 3
  • 3
  • 9