Login Authentication on Fresh 14 RC1 Fails

Nextcloud version 14.0.0.19RC1:
Operating system and version Centos 7.5.1804:
Apache or nginx version Apache 2.4.6:
PHP version 7.1.21:

The issue you are facing:
On a clean server and a fresh install of the RC1 candidate for purposes of migration evaluation, when attempting to migrate data from 13.0.6 and upgrade the upgrade seemly completes successfully via both the web updater or the CLI.

Upon attempting to login, the login for all users on separate machines and networks is in an infinite loop. The user gives correct authentication and the login page refreshes with no information. The user is not redirected to their account.

It is important to note that all system functions are working properly outside the login. Passwords can be reset, emails can be received, files with public links can be accessed, and private links still allow for successful upload of files which is verified by the entry in the “data” folder.

I believe 14 is handling authentication a bit different than 13 based on my review of several issue threads, which could potentially be causing the issue.

Is this the first time you’ve seen this error?
No, I have been troubleshooting with the same issue over the past few days, updating to the latest branch each time.

Services (httpd, mysql, etc) verified as operating and site is accessible without an issue. Upon checking the database tables there is no discernible issue and the data is present.

Steps to replicate it:

  1. Fresh server with all requirements (successfully runs 13 no problem)
  2. migrate a 13.0.6 data set to 14 via CLI or web interface (no issues going from 12 to 13)
  3. Attempt to login

The output of your Nextcloud log in Admin > Logging:

/data/nextcloud.log
Blank - No errors
/log/httpd.log
Blank - No errors
/log/mariadb.log
Blank - No errors

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'passwordsalt' => ,
  'secret' => ,
  'trusted_domains' => 
  array (
    0 => ,
    1 => ,
    2 => ,
  ),
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => ,
  'dbtype' => 'mysql',
  'version' => '14.0.0.19',
  'dbname' => ,
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => ,
  'dbpassword' => ,
  'installed' => true,
  'default_language' => 'en',
  'defaultapp' => 'files',
  'knowledgebaseenabled' => true,
  'enable_avatars' => true,
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 86400,
  'session_keepalive' => true,
  'skeletondirectory' => '/var/www/html/core/skeleton',
  'mail_domain' => ,
  'mail_from_address' => ,
  'mail_smtpdebug' => false,
  'mail_smtpmode' => 'php',
  'mail_smtphost' => '127.0.0.1',
  'htaccess.RewriteBase' => '/',
  'versions_retention_obligation' => 'auto',
  'updatechecker' => true,
  'updater.server.url' => 'https://updates.owncloud.com/server/',
  'has_internet_connection' => true,
  'loglevel' => 0,
  'maintenance' => false,
  'instanceid' => ,
  'data-fingerprint' => ,
);
1 Like

With some minor changes to the nextcloud php files, I was able to get an error report produced back to the nextcloud.log. I am not sure why it is not printing by default.

The repeating errors when attempting to login only occur with a successful user/pass pair, whereas an unsuccessful one returns the expected wrong password message and no error.

{"reqId":"W5KDCjQJgGxKNN7HwayefQAAAAI","level":0,"time":"2018-09-07T13:54:19+00:00","remoteAddr":"","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ViewController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"files.view.index"}]},{"file":"\/var\/www\/html\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"\/var\/www\/html\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/files\/"]},{"file":"\/var\/www\/html\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/lib\/private\/AppFramework\/Middleware\/Security\/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/68.0.3440.106 Safari\/537.36","version":"14.0.0.19"}
{"reqId":"W5KDC2HKcSqnPDfSA4pqHAAAAAM","level":0,"time":"2018-09-07T13:54:19+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"No cache entry found for \/appdata_oc0bcxgdx57i\/theming\/images (storage: local::\/var\/www\/html\/data\/, internalPath: appdata_oc0bcxgdx57i\/theming\/images)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/68.0.3440.106 Safari\/537.36","version":"14.0.0.19"}

I am also running into this login loop when upgrading to 14.0.0.19
I opened an issue on github: https://github.com/nextcloud/server/issues/11114

I also created an issue on this login loop : https://github.com/nextcloud/server/issues/10885

This bug is the same than this issue in github : https://github.com/nextcloud/server/issues/10885.

It has been fixed yesterday and it will be deployed in 14.0.1. The PR is here : https://github.com/nextcloud/server/pull/11173

1 Like