OwnCloud service detection failed after migration from 0.9.x



  • Hi,
    I just updated to 1.0.4 and can no longer sync with my ownCloud 9 server.
    I get the following message "Service detection failed. Couldn't refresh collection list"
    I tried to remove the account then add it again as well as reinstalling the app.
    My laptop got stolen and I'm currently on mobile phone only. Please excuse the limited detail, but that's currently all the information I can provide.

    Here is the debug log (I altered the request token and the domain):

    Account name: maximilian@myserver.tld
    
    HTTP REQUEST:
    PROPFIND /remote.php/carddav/principals/users/maximilian/
    Content-Length: 221
    Content-Type: application/xml; charset=utf-8
    Depth: 0
    
    <?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><CARD:addressbook-home-set /><group-membership /></prop></propfind>
    
    HTTP RESPONSE:
    spdy/3.1 404 
    cache-control: no-store, no-cache, must-revalidate
    content-security-policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
    content-type: text/html; charset=UTF-8
    date: Thu, 31 Mar 2016 12:48:55 GMT
    expires: Thu, 19 Nov 1981 08:52:00 GMT
    OkHttp-Received-Millis: 1459428534421
    OkHttp-Sent-Millis: 1459428534006
    pragma: no-cache
    server: nginx/1.8.1
    x-powered-by: PHP/7.0.4
    
    <!DOCTYPE html>[LF]
    <!--[if lte IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="en" ><![endif]-->[LF]
    <!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="en" ><![endif]-->[LF]
    <!--[if (gt IE 9)|!(IE)]><!--><html class="ng-csp" data-placeholder-focus="false" lang="en" ><!--<![endif]-->[LF]
    [9]<head data-requesttoken="YABJFJ1U=:ijux0zYUywg+J59NT9gBpQ=">[LF]
    [9][9]<meta charset="utf-8">[LF]
    [9][9]<title>[LF]
    [9][9]ownCloud[9][9]</title>[LF]
    [9][9]<meta http-equiv="X-UA-Compatible" content="IE=edge">[LF]
    [9][9]<meta name="referrer" content="never">[LF]
    [9][9]<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">[LF]
    [9][9]<meta name="apple-itunes-app" content="app-id=543672169">[LF]
    [9][9]<meta name="theme-color" content="#1d2d44">[LF]
    [9][9]<link rel="shortcut icon" href="/core/img/favicon.ico">[LF]
    [9][9]<link rel="apple-touch-icon-precomposed" href="/core/img/favicon-touch.png">[LF]
    [9][9]<link rel="mask-icon" sizes="any" href="/core/img/favicon-mask.svg" color="#1d2d44">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/styles.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/inputs.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/header.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/mobile.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/icons.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/fonts.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/apps.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/global.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/fixes.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/multiselect.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/jquery-ui-fixes.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/tooltip.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9]<link rel="stylesheet" href="/core/css/jquery.ocdialog.css?v=bc3eaade0807dfc3432a5581c4b4fe79" media="screen">[LF]
    [9][9][9][9][9][9][9]<script src="/index.php/core/js/oc.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/jquery/jquery.min.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/jquery-migrate/jquery-migrate.min.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/jquery-ui/ui/jquery-ui.custom.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/underscore/underscore.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/moment/min/moment-with-locales.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/handlebars/handlebars.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/blueimp-md5/js/md5.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/bootstrap/js/tooltip.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/backbone/backbone.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/es6-promise/dist/es6-promise.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/davclient.js/lib/client.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/placeholders.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/compatibility.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/jquery.ocdialog.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/oc-dialogs.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/js.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/l10n.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/octemplate.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/eventsource.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/config.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/search/js/search.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/oc-requesttoken.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/apps.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/mimetype.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/mimetypelist.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/snapjs/dist/latest/snap.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/vendor/backbone/backbone.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/oc-backbone.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/placeholder.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/jquery.avatar.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/files/fileinfo.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]<script src="/core/js/files/client.js?v=bc3eaade0807dfc3432a5581c4b4fe79"></script>[LF]
    [9][9][9][9][9]</head>[LF]
    [9]<body id="body-login">[LF]
    [9][9]<noscript>[LF]
    [9]<div id="nojavascript">[LF]
    [9][9]<div>[LF]
    [9][9][9]This application requires JavaScript for correct operation. Please <a href="http://enable-javascript.com/" target="_blank" rel="noreferrer">enable JavaScript</a> and reload the page.[9][9]</div>[LF]
    [9]</div>[LF]
    </noscript>[LF]
    [9][9]<div class="wrapper">[LF]
    [9][9][9]<div class="v-align">[LF]
    [9][9][9][9][9][9][9][9][9]<header role="banner">[LF]
    [9][9][9][9][9][9]<div id="header">[LF]
    [9][9][9][9][9][9][9]<div class="logo svg">[LF]
    [9][9][9][9][9][9][9][9]<h1 class="hidden-visually">[LF]
    [9][9][9][9][9][9][9][9][9]ownCloud[9][9][9][9][9][9][9][9]</h1>[LF]
    [9][9][9][9][9][9][9]</div>[LF]
    [9][9][9][9][9][9][9]<div id="logo-claim" style="display:none;"></div>[LF]
    [9][9][9][9][9][9]</div>[LF]
    [9][9][9][9][9]</header>[LF]
    [9][9][9][9][9][9][9][9][9]<ul>[LF]
    [9][9]<li class="error">[LF]
    [9][9][9]File not found<br>[LF]
    [9][9][9]<p class="hint">The specified document has not been found on the server.</p>[LF]
    [9][9][9]<p class="hint"><a href="/index.php">You can click here to return to ownCloud.</a></p>[LF]
    [9][9]</li>[LF]
    [9]</ul>[LF]
    [9][9][9][9]<div class="push"></div><!-- for sticky footer -->[LF]
    [9][9][9]</div>[LF]
    [9][9]</div>[LF]
    [9][9]<footer role="contentinfo">[LF]
    [9][9][9]<p class="info">[LF]
    [9][9][9][9]<a href="https://owncloud.org" target="_blank" rel="noreferrer">ownCloud</a> [ffffffe2][ffffff80][ffffff93] web services under your control[9][9][9]</p>[LF]
    [9][9]</footer>[LF]
    [9]</body>[LF]
    </html>[LF]
    
    
    EXCEPTION:
    at.bitfire.dav4android.exception.NotFoundException: 404 
    	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:309)
    	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:290)
    	at at.bitfire.dav4android.DavResource.propfind(DavResource.java:275)
    	at at.bitfire.davdroid.DavService$RefreshCollections.queryHomeSets(DavService.java:323)
    	at at.bitfire.davdroid.DavService$RefreshCollections.run(DavService.java:183)
    	at java.lang.Thread.run(Thread.java:818)
    
    SOFTWARE INFORMATION
    DAVdroid version: 1.0.4 (94) Thu Mar 31 14:12:23 GMT+02:00 2016
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: maximilian@myserver.tld
      Address book sync. interval: 1440 min
      Calendar     sync. interval: —
      OpenTasks    sync. interval: —
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  en_US |
    ----------
    settings
    	|  setting | value |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  1 | maximilian@myserver.tld | carddav | https://owncloud.my server.tld/remote.php/carddav/principals/users/maximilian/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 1 |
    ----------
    homesets
    	|  _id | serviceID | url |
    ----------
    collections
    	|  _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
    ----------
    
    SYSTEM INFORMATION
    Android version: 5.1.1 (ONE A2003_14_160226)
    Device: OnePlus ONE A2003 (OnePlus2)
    

  • developer

    When does this error occur? There are no logs (only the erroneous HTTP request), so I can't tell anything except that OwnCloud returned a 404 Not Found error for PROPFIND /remote.php/carddav/principals/users/maximilian/.

    If the "Service detection failed" appears on a sync, the sync has caused a migration to 1.0 and initiated the service refresh. I suggest to add the account again.

    If this does not help, please provide steps to reproduce.



  • @rfc2822 I removed and then added the account again as well as removing and reinstalling the entire app. Both didn't help.
    I used the same server before the update without problems. Here is a debug log 0_1459434751200_davdroid-22597-20160331-160830_no_creds.txt

    I just added the account and enabled debug logging. This is one of the logs created by what I believe to be the initial synchronization.



  • This post is deleted!


  • Hi,
    @Nanu I tried your (by now deleted) suggestion. I didn't work but thanks for trying to help. I appreciate it.
    @rfc2822 I upgraded to 1.0.5 by now but no change. I get the "Service detection failed. Couldn't refresh collection list" right after clicking on "create account". The debug log looks like this: 0_1459595843412_davdroid-20333-20160402-103837_no_creds.txt
    Neither clicking on the synchronization icon (the two circular arrows) nor using the "Refresh address book list" function produce anything more.

    This was different with 1.0.4. See the debug log above.
    Cheers



  • @maximilian I realised auto-discovery was working again without the /remote.php/dav/ so deleted. ownCloud was kicking up a 301 error for me after upgrading to 9.0. I'm now having issues with contact sync since upgrading to DD 1.0 so I've had to fall back to the cardDav app until I can resolve the issue.


  • developer

    Just wanted to add that OwnCloud 9 has been tested with DAVdroid 1.0 and it works. Are your Contacts and Calendars apps in OwnCloud up to date?

    I'm sorry that I can't give you in-depth OwnCloud support (I don't have the knowledge for that) – I can just suggest to do some research on your own, maybe ask in the OwnCloud community. I'm sure that OwnCloud 9 (fresh install) works with DAVdroid 1.0, because we have (of course) tested that. There may be 1000s of reasons why there may be problems with exactly your OwnCloud, which was probably updated from previous versions, too. You may try a new user, your, as as a last resort, a fresh OwnCloud 9 installation.



  • @rfc2822 Don't get me wrong. I'm not saying it's DAVdroid's fault. I'm just saying it used to work and now it doesn't. I have used ownCloud long enough to know that it has a lot of weird behavior.

    To be constructive: I found this bug report and the first comment by DeepDiver made me try out different base URLs.
    Using the URL https://owncloud.myserver.tld/remote.php/dav/addressbooks/users/maximilian/ worked. I now have a working addressbook (and surprisingly also a working calendar - I expected to have to use calendars instead of addressbooks to get this working but both work with addressbooks).
    I'm using ownCloud 9.0.0, with Calendar 1.0 and Contacts 1.1.0.0. These are the latest versions, as far as I know.

    @Nanu I hope you get notified when I mention your name here. This could be interesting for you, too.



  • It turns out that my issue was neither DAVdroid's nor owncloud's fault. I misconfigured nginx (well-known URLs). It now works with base URL https://owncloud.myserver.tld
    Sorry for the noise and thanks for all your help. I appreciate it.
    How do I mark this topic as solved?


  • developer

    @maximilian Thanks for the clarification. Flagged the topic as solved.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.