Skip to content

Cannot sync with Jolla after update to 7.0.0 No basic authentication headers were found #9880

Closed

Description

Hi,

I am running OC on my own server (ubuntu) and just updated from 6.0.1 to 7.0.0. First of all the update wiped my calendar and address book. Good that I had a second copy but I did not expect that to happen.
However, since the update I am not able to sync to my Jolla anymore. I the log file I see this:
webdav Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found
Is it possible to solve that? Syncing with my computer works fine.

I am running Ubuntu 14.04 and do not use SSL currently.

Thanks

Activity

  1. PVince81 commented on Jul 25, 2014

    @PVince81
    Contributor

    Not sure. Can you check whether your server has "mod_rewrite" enabled ?

    CC @blizzz to test on his Jolla

  2. stonerl commented on Jul 26, 2014

    @stonerl

    I get the same debug-message

    {"reqId":"53d29ac498ef5","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:58:28+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/"}
    {"reqId":"53d29adbdbe56","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:58:51+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Android"}
    {"reqId":"53d29adde842b","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:58:53+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Music"}
    {"reqId":"53d29adfb8dec","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:58:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Videos"}
    {"reqId":"53d29ae23817b","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:58:58+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Documents"}
    {"reqId":"53d29ae46ba2f","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-25T17:59:00+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Pictures"}

    running Ubuntu 14.04 with owncloud 7 rewrite module is enabled.

  3. elek02 commented on Jul 30, 2014

    @elek02

    Same error here: "Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found".
    No problems with browser, only if I try to use the OwnCloud Sync Client on Windows or Linux it can not log in.

    {"reqId":"53d8de514b154","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-07-30T12:00:17+00:00","method":"PROPFIND","url":"\/remote.php\/webdav"}
    

    Ubuntu Server 14.04 with Apache, php fastcgi / suexec, ssl
    Needed Apache modules like "rewrite", "headers" and so on are all enabled.

  4. elek02 commented on Jul 30, 2014

    @elek02

    RewriteRule either in .htaccess or in apache virtualhost config fixes that problem!

    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    
  5. stonerl commented on Jul 30, 2014

    @stonerl

    This one

    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    and this one

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    look quite the same. I added the second one to my .htaccess in

    /var/www/owncloud

    and commented the first one out but I still get those log messages... My second attempt was to have both in my .htaccess but still those errors.

    Third try was

    RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    but again errors.

  6. elek02 commented on Jul 31, 2014

    @elek02

    I put this rewrite rule in my apache virtualhost config an it worked. Should also work in the .htaccess file in the root folder of owncloud.
    I left this .htaccess file untouched - it has only this content:

    ErrorDocument 403 /core/templates/403.php
    ErrorDocument 404 /core/templates/404.php
    
  7. benjoz commented on Aug 3, 2014

    @benjoz

    Exacte same issue with same config :) (OC 7, Ubuntu 14.04 fresh install) + SSL
    #9880

    Debug webdav Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found 2014-08-03T10:06:21+00:00

    I tried everything in .htaccess but nothing works

  8. elek02 commented on Aug 4, 2014

    @elek02

    @no-1: Maybe the .htaccess is different because I did an upgrade from OC6 to OC7 and no fresh install of OC7.

  9. Gifftron commented on Aug 8, 2014

    @Gifftron

    I'm having the same issue OC 7. I've tried adding the code to every .htaccess file.

  10. Gifftron commented on Aug 8, 2014

    @Gifftron

    I have a fresh install so its not because of the OC6 to OC7 upgrade.

  11. blizzz commented on Aug 13, 2014

    @blizzz
    Contributor

    I put up clean a test install (alas based on master) and configured my Jolla towards it. The test event was not importet, but a test event was synced up to ownCloud. Sailfish OS's CalDAV support is also experimental only… No errors in any log file. Auth works.

  12. blizzz commented on Aug 13, 2014

    @blizzz
    Contributor

    I will try to test it with 7.0.1 and stable7 tomorrow.

  13. blizzz commented on Aug 14, 2014

    @blizzz
    Contributor

    No, works for me with 7.0.1 as well. Also on Ubuntu 14.04, but not as fastcgi / php-fpm. All affected by this run this configuration, right?

    Seems similar to #9416

  14. blizzz commented on Aug 14, 2014

    @blizzz
    Contributor

    I don't run PHP as fastcgi.

  15. Mikhail-I commented on Aug 17, 2014

    @Mikhail-I

    I've got the same issue on kubuntu 14.04, lighttpd, fresh install owncloud 7.0.0.

  16. JanMalte commented on Aug 20, 2014

    @JanMalte

    Creating calendar entries with CalDav in KDE 4.13.3 seems not to work with OwnCloud 7 due to the same error.

    Owncloud log:

    Debug   webdav  Exception: #6 /srv/www/owncloud/3rdparty/sabre/dav/lib/Sabre/DAV/Server.php(214): Sabre\DAV\Server->invokeMethod('PROPFIND', '')    2014-08-20T04:57:14+00:00
    Debug   webdav  Exception: #5 /srv/www/owncloud/3rdparty/sabre/dav/lib/Sabre/DAV/Server.php(455): Sabre\DAV\Server->broadcastEvent('beforeMethod', Array)   2014-08-20T04:57:14+00:00
    Debug   webdav  Exception: #4 /srv/www/owncloud/3rdparty/sabre/dav/lib/Sabre/DAV/Server.php(433): call_user_func_array(Array, Array)    2014-08-20T04:57:14+00:00
    Debug   webdav  Exception: #3 [internal function]: Sabre\DAV\Auth\Plugin->beforeMethod('PROPFIND', '')  2014-08-20T04:57:14+00:00
    Debug   webdav  Exception: #2 /srv/www/owncloud/3rdparty/sabre/dav/lib/Sabre/DAV/Auth/Plugin.php(108): OC_Connector_Sabre_Auth->authenticate(Object(OC_Connector_Sabre_Server), 'ownCloud') 2014-08-20T04:57:14+00:00
    Debug   webdav  Exception: #1 /srv/www/owncloud/lib/private/connector/sabre/auth.php(78): OC_Connector_Sabre_Auth->auth(Object(OC_Connector_Sabre_Server), 'ownCloud')  2014-08-20T04:57:14+00:00
    Debug   webdav  Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found    2014-08-20T04:57:14+00:00
    
  17. t2d commented on Sep 24, 2014

    @t2d

    I get the same error. ownCloud 7.0.2 (stable)

  18. mathiasuhl commented on Sep 30, 2014

    @mathiasuhl

    well i have the same problem.

    {"reqId":"542a9d364b32f","app":"webdav","message":"Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-09-30T12:08:22+00:00","method":"PROPFIND","url":"/remote.php/webdav"}

  19. Mooni123 commented on Oct 19, 2014

    @Mooni123

    Some news about this problem ?

    I have the same issue.

  20. tomtana commented on Nov 23, 2014

    @tomtana

    Hey guys I had the same problem. And i was spending weeks on that issue. It turned out that it was related due to the fact that my hoster is using suexec, which does not pass environment variables to CGI scripts.

    The solution here made it work: Thank you so much :)
    http://www.blaicher.com/2012/07/fixing-authentication-of-owncloud-for-webfaction/#comment-275

    so you should change your .htaccess file like this:

    RewriteCond %{HTTP:Authorization} ^Basic.*
    RewriteRule ^(.*) $1?Authorization=%{HTTP:Authorization} [QSA,C]
    RequestHeader unset Authorization
    

    and add in lib/base.php in the handleAuthHeaders() function the following lines:

    if(isset($_GET['Authorization']) && preg_match('/Basic\s+(.*)$/i', $_GET['Authorization'], $matches))
    {
        list($name, $password) = explode(':', base64_decode($matches[1]));
        $_SERVER['PHP_AUTH_USER'] = strip_tags($name);
        $_SERVER['PHP_AUTH_PW'] = strip_tags($password);
    }
    

    Unfortunately I still have some issues with the android app. The sync of the files, contacts and calendar works all fine, but when i am trying to share a folder, i am getting again the unfamous "Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found” error. Maybe s.o. knows how to fix it.

  21. blizzz commented on Mar 24, 2015

    @blizzz
    Contributor

    The problem is unlikely in ownCloud but in the (experimental!) Jolla CalDAV implementation.

    The »No basic authentication headers were found« message is not a problem, as it is normal behaviour when an unauthenticated request is done. 401 is reported and the client will (is supposed to) send credentials the next time.

    On together.jolla.com many people got it somewhat running, I'd suggest to look it up there.
    See for instance here also here and here, but there a far more threads and replies about it.

    Opposed to @JanMalte's statement, the calendar works very well for me using Kontact 4.14.2 (except i saw it unmotivatedly delete entries few times -.-).

    As the calendar works fine elsewhere it is a client problem, therefore I close it here. If you still experience issues, please browse https://together.jolla.com and engage there. Or, even better, fix SailfishOS's CalDAV implementation https://github.com/nemomobile/buteo-sync-plugin-caldav/ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions