Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jul 24, 2014 · 27 comments

Comments

@ghost
Copy link

commented Jul 24, 2014

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

@PVince81

This comment has been minimized.

Copy link
Member

commented Jul 25, 2014

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

CC @blizzz to test on his Jolla

@PVince81 PVince81 added the Bug label Jul 25, 2014
@ghost

This comment has been minimized.

Copy link
Author

commented Jul 25, 2014

$ sudo a2enmod rewrite
Module rewrite already enabled

So seems to be done...
On together.jolla.com I read that other got it working from the start.

@stonerl

This comment has been minimized.

Copy link

commented Jul 26, 2014

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.

@elek02

This comment has been minimized.

Copy link

commented Jul 30, 2014

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.

@elek02

This comment has been minimized.

Copy link

commented Jul 30, 2014

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

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

This comment has been minimized.

Copy link
Author

commented Jul 30, 2014

Could you be a little more precise in what file you did the change? There are there .htaccess files in my OC installation...

My owncloud/.htaccess looks like this:

RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]

@stonerl

This comment has been minimized.

Copy link

commented Jul 30, 2014

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.

@elek02

This comment has been minimized.

Copy link

commented Jul 31, 2014

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
@ghost

This comment has been minimized.

Copy link
Author

commented Jul 31, 2014

I added your lines in /etc/apache2/sites-available/000-default.conf
but I still get these
Debug webdav Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found
and my Jolla is not syncing.

Your .htaccess seems to be entirely different. I run OC 7 on Ubuntu 14.04 you too?

@benjoz

This comment has been minimized.

Copy link

commented Aug 3, 2014

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

@elek02

This comment has been minimized.

Copy link

commented Aug 4, 2014

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

@Gifftron

This comment has been minimized.

Copy link

commented Aug 8, 2014

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

@Gifftron

This comment has been minimized.

Copy link

commented Aug 8, 2014

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

@blizzz

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2014

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.

@blizzz

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2014

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

@blizzz

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2014

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

@ghost

This comment has been minimized.

Copy link
Author

commented Aug 14, 2014

I just updated to 7.0.1 but I still have the
Debug webdav Sabre\DAV\Exception\NotAuthenticated: No basic authentication headers were found
I did a clean install for 7.0.0 and now followed the instruction for updating 7.0.1 with no failures. So I do not see how my installation is different to yours. Where is this error coming from? I am certain that my login data is correct.

@blizzz

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2014

I don't run PHP as fastcgi.

@Mikhail-I

This comment has been minimized.

Copy link

commented Aug 17, 2014

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

@JanMalte

This comment has been minimized.

Copy link

commented Aug 20, 2014

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
@ghost

This comment has been minimized.

Copy link
Author

commented Aug 20, 2014

Hi,

seeing also a lot of this in my logfiles running OC 7.0.1 and NginX 1.6.x with php-fpm 5.5.x. Strange enough file sync via WebDAV and CalDAV/CardDAV is working without any problems.

@t2d

This comment has been minimized.

Copy link

commented Sep 24, 2014

I get the same error. ownCloud 7.0.2 (stable)

@mathiasuhl

This comment has been minimized.

Copy link

commented Sep 30, 2014

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"}

@Mooni123

This comment has been minimized.

Copy link

commented Oct 19, 2014

Some news about this problem ?

I have the same issue.

@ghost

This comment has been minimized.

Copy link
Author

commented Oct 24, 2014

Is there still no update on this issue? Today I tried some more but could not get my Jolla to sync. Using the new Cal and CardDav functions nothing happens. If I use Syncevolution I get an error 403 and the no basic authentication headers found in the OC log. What else can I do to solve this?

@tomtana

This comment has been minimized.

Copy link

commented Nov 23, 2014

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.

@blizzz

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2015

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
Projects
None yet
You can’t perform that action at this time.