Windows Client login fails since upgrade from 9.0.2 to 9.1.4 / 9.1.6

possible_bug
client
ldap
upgrade
9.1.x

#1

Steps to reproduce
1. Upgrade from 9.0.2 to 9.1.4
2. Reboot Windows Desktop PC
3. ownCloud Desktop Client starts with asking for credentials
4. filling in credentials
5. Hit ok
6. ownCloud Client asks again for the credentials
7. Hitting OK with filled in credentials for 30 times and more, no connection
8. Remove Account from Client
9. Configure the same account again
10. At the end of configuration hitting "Connect" - Client is connected.

In addition: If I disconnect the account after a succesful login, then I´m in the Loop again and need to delete the account and configure it again.

Expected behaviour
Login to ownCloud site in the client is done in background - connection is established without the need of filling in credentials

Actual behaviour I will be asked for credentials in a loop. Sometimes it works if I wait for several minutes after reboot of the PC and then I need to hit "ok" only once.

Client configuration
Client version: Tested with 2.2.3 / 2.2.4 / 2.3.0 / 2.3.2 Client operating system: Windows 7 x64 / Windows Vista x86

Server configuration
Operating system: Debian 8 Jessie
Web server: Apache 2.4.10-10+deb8u7
Database: mySQL 5.5.54-0+deb8u1
PHP version: 5.6.30+dfsg-0+deb8u1
ownCloud version (see ownCloud admin page): 9.1.6 stable
Updated from an older ownCloud or fresh install: Updated from 9.1.4 <- 9.0.2 and before 8.x (Problem exists since upgrade from 9.0.2 -> 9.1.4)
Special configurations: LDAP auth. (Open LDAP)

ownCloud log (data/owncloud.log)
If I hit ok and the credentials aren´t accepted no log is written in the owncloud.log - sometimes later I get this errors:

 {"reqId":"WNk7EgoAAgwAAEchB8oAAAAG","remoteAddr":"87.78.93.65","app":"user_ldap","message":"Configuration Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.","level":2,"time":"2017-03-27T18:17:22+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7EgoAAgwAAEchB8oAAAAG","remoteAddr":"87.78.93.65","app":"core","message":"Login failed: 'ben' (Remote IP: '87.78.93.65')","level":2,"time":"2017-03-27T18:17:22+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7EgoAAgwAAEchB8oAAAAG","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:17:22+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7HgoAAgwAAAu8xAoAAAAC","remoteAddr":"87.78.93.65","app":"user_ldap","message":"Configuration Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.","level":2,"time":"2017-03-27T18:17:34+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7HgoAAgwAAAu8xAoAAAAC","remoteAddr":"87.78.93.65","app":"core","message":"Login failed: 'ben' (Remote IP: '87.78.93.65')","level":2,"time":"2017-03-27T18:17:34+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7HgoAAgwAAAu8xAoAAAAC","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:17:34+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7QAoAAgwAAAu@jKsAAAAE","remoteAddr":"87.78.93.65","app":"user_ldap","message":"Configuration Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.","level":2,"time":"2017-03-27T18:18:08+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7QAoAAgwAAAu@jKsAAAAE","remoteAddr":"87.78.93.65","app":"core","message":"Login failed: 'ben' (Remote IP: '87.78.93.65')","level":2,"time":"2017-03-27T18:18:08+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7QAoAAgwAAAu@jKsAAAAE","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:18:08+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XgoAAgwAAAu9Lx8AAAAB","remoteAddr":"87.78.93.65","app":"user_ldap","message":"Configuration Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.","level":2,"time":"2017-03-27T18:18:38+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XgoAAgwAAAu9Lx8AAAAB","remoteAddr":"87.78.93.65","app":"core","message":"Login failed: 'ben' (Remote IP: '87.78.93.65')","level":2,"time":"2017-03-27T18:18:38+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XgoAAgwAAAu9Lx8AAAAB","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:18:38+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XwoAAgwAADPppGoAAAAF","remoteAddr":"87.78.93.65","app":"user_ldap","message":"Configuration Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.","level":2,"time":"2017-03-27T18:18:39+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XwoAAgwAADPppGoAAAAF","remoteAddr":"87.78.93.65","app":"core","message":"Login failed: 'ben' (Remote IP: '87.78.93.65')","level":2,"time":"2017-03-27T18:18:39+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"WNk7XwoAAgwAADPppGoAAAAF","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:18:39+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}

If I delete the Account in the client and configure it again, connections works and I get this error, which is normal and can´t be solved (I tried every solution in the knowledgebase):

 {"reqId":"WNk8NwoAAgwAAEchB9AAAAAG","remoteAddr":"87.78.93.65","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 No 'Authorization: Basic' header found. Either the client didn't send one, or the server is mis-configured\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(446): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(57): Sabre\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":188,\"User\":false}","level":0,"time":"2017-03-27T18:22:15+02:00","method":"GET","url":"\/remote.php\/webdav\/","user":"--"}

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

 
No errors in Apache error.log 
No errors in php.log

Additional Informations

  • Web login works
  • LDAP login works
  • WebDAV login works
  • It is no client bug (https://github.com/owncloud/client/issues/5714)
  • It is not a problem with the Credential manager from Windows
  • It is tested on 5 different PCs, everywhere the same problem
  • It is not related to PHP-FPM
  • This is, what happens on the client when it fails:

GET status.php
no cookies, with bad basic auth (no password)
RESPONSE
Set-Cookie:                     ocwoue...=u05lkk...; path=/; HttpOnly                     
Set-Cookie:                     oc_sessionPassphrase=YkMnI...; path=/; secure; httponly                                                   
GET status.php
with good basic auth, cookies from above
RESPONSE
no new cookies
PROPFIND
with good basic auth, cookies from above
RESPONSE
Set-Cookie:                     ocwoue...=243jgknd...; path=/; secure; HttpOnly
GET capabilities.php
with good basic auth, cookies updated
RESPONSE
Auth failed
  • This is the problem of the server

Configuration` Error (prefix ): either no password is given for theuser agent or a password is given, but not anLDAP agent.
Login failed: 'ben' (Remote IP: ...)
Exception: {\"Message\":\"HTTP\\\/1.1 401 Username or password was incorrect\

What can I do to get rid of this error?

I can provide more informations if you will need them.

Thanks and best regards,
Ben


#2

Hello,

no one has an idea? Maybe it is only an error in the configuration.

It would be nice if someone could help.

Best regards,
Ben


#3

I didn't find much about this error. It seems that Nextcloud is also hit by this problem (but they don't have a solution either: https://help.nextcloud.com/t/ldap-ad-error-after-update-to-11-0-2/10505). Because it happened after an upgrade, please report this directly to the bugtracker on github.com/owncloud/server/issues.