Nextcloud 16.0.1 Login Loop on Install

Steps to reproduce

  1. Downloaded Next Cloud Server Package, 16.0.1
  2. Installed with nginx, php-fpm 7.3
  3. Able to see initial setup page
  4. Configure admin password and set to use mariadb
  5. Greeted by login page
  6. Attempt to Login, get redirected to .com/login?redirect_url=/apps/files/ and get another login page

Expected behaviour

To login as the admin account that was just created, and be greeted by the main dashboard

Actual behaviour

redirects to .com/login?redirect_url=/apps/files/. nextcloud.log shows no activity during login process even when set to info. Debug shows some information.

Server configuration

Operating system:
CentOS Linux release 7.6.1810 (Core)

Web server:
nginx version: nginx/1.12.2

Database:
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

PHP version:
PHP 7.3.5

Nextcloud version: (see Nextcloud admin page)
Cannot see the admin page but i downloaded 16.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
Fresh Install

Where did you install Nextcloud from:

Signing status:
Cannot Log in

List of activated apps:
Enabled:

  • accessibility: 1.2.0
  • activity: 2.9.1
  • bruteforcesettings: 1.3.0
  • cloud_federation_api: 0.2.0
  • comments: 1.6.0
  • dav: 1.9.2
  • federatedfilesharing: 1.6.0
  • federation: 1.6.0
  • files: 1.11.0
  • files_pdfviewer: 1.5.0
  • files_rightclick: 0.13.0
  • files_sharing: 1.8.0
  • files_texteditor: 2.8.0
  • files_trashbin: 1.6.0
  • files_versions: 1.9.0
  • files_videoplayer: 1.5.0
  • firstrunwizard: 2.5.0
  • gallery: 18.3.0
  • logreader: 2.1.0
  • lookup_server_connector: 1.4.0
  • nextcloud_announcements: 1.5.0
  • notifications: 2.4.1
  • oauth2: 1.4.2
  • password_policy: 1.6.0
  • privacy: 1.0.0
  • provisioning_api: 1.6.0
  • recommendations: 0.4.0
  • serverinfo: 1.6.0
  • sharebymail: 1.6.0
  • support: 1.0.0
  • survey_client: 1.4.0
  • systemtags: 1.6.0
  • theming: 1.7.0
  • twofactor_backupcodes: 1.5.0
  • updatenotification: 1.6.0
  • viewer: 1.0.0
  • workflowengine: 1.6.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap

Nextcloud configuration:
{
“system”: {
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
cloud.domain1.com
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “16.0.1.1”,
“overwrite.cli.url”: “https://cloud.domain1.com”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“tempdirectory”: “/var/www/nextcloud/data/tmp”
}
}

Are you using external storage, if yes which one: local/smb/sftp/…
It is mounted drive, so local

Are you using encryption: yes/no
have not set it up, i assume no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
No

Client configuration

Browser:
Firefox 67.0 && Chromium Version 74.0.3729.157

Operating system:
Arch Linux

Logs

Web server error log

Empty

Nextcloud log (data/nextcloud.log)

loglevel = Debug or 0
did tail -fn0 /var/www/nextcloud/data/nextcloud.log and attempted to login

{“reqId”:“I9zLlyRDSFIdm8FJHQKq”,“level”:0,“time”:“2019-05-26T07:58:55+00:00”,“remoteAddr”:“37.120.130.4”,“user”:"–",“app”:“cron”,“method”:“GET”,“url”:"/cron.php",“message”:“Run OCA\Survey_Client\BackgroundJobs\AdminNotification job with ID 12”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0”,“version”:“16.0.1.1”}
{“reqId”:“I9zLlyRDSFIdm8FJHQKq”,“level”:0,“time”:“2019-05-26T07:58:55+00:00”,“remoteAddr”:“37.120.130.4”,“user”:"–",“app”:“cron”,“method”:“GET”,“url”:"/cron.php",“message”:“Finished OCA\Survey_Client\BackgroundJobs\AdminNotification job with ID 12 in 0 seconds”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0”,“version”:“16.0.1.1”}
{“reqId”:“ApAe0efuNkxBVnUeZLfh”,“level”:0,“time”:“2019-05-26T07:59:28+00:00”,“remoteAddr”:“37.120.130.4”,“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/nextcloud/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/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:97,“function”:“beforeController”,“class”:“OC\AppFramework\Middleware\MiddlewareDispatcher”,“type”:"->",“args”:[{“class”:“OCA\Files\Controller\ViewController”},“index”]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/App.php",“line”:126,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Files\Controller\ViewController”},“index”]},{“file”:"/var/www/nextcloud/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/nextcloud/lib/private/Route/Router.php",“line”:297,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{"_route":“files.view.index”}]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:975,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/files/"]},{“file”:"/var/www/nextcloud/index.php",“line”:42,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/var/www/nextcloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php",“Line”:143,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0”,“version”:“16.0.1.1”}
{“reqId”:“lvwyXCJThP2mxqlOu55v”,“level”:0,“time”:“2019-05-26T07:59:29+00:00”,“remoteAddr”:“37.120.130.4”,“user”:"–",“app”:“cron”,“method”:“GET”,“url”:"/cron.php",“message”:“Run OCA\Files\BackgroundJob\ScanFiles job with ID 13”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0”,“version”:“16.0.1.1”}
{“reqId”:“lvwyXCJThP2mxqlOu55v”,“level”:0,“time”:“2019-05-26T07:59:29+00:00”,“remoteAddr”:“37.120.130.4”,“user”:"–",“app”:“cron”,“method”:“GET”,“url”:"/cron.php",“message”:“Finished OCA\Files\BackgroundJob\ScanFiles job with ID 13 in 0 seconds”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0”,“version”:“16.0.1.1”}

Browser log

JQMIGRATE: Migrate is installed, version 1.4.1 main.js:278:531
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://cloud.harmonygardencafe.com/core/js/dist/main.js?v=90f2442c-0
Source Map URL: main.js.map

Thank you for your help

Hi,

I have the same problem after update some packets in my Centos 7 server.

Did you find the solution or reason for this error?

I my case after packets update, owner and group changed for php-fpm sessions folder (for Centos 7 it will be /var/lib/php/session)

I changed owner and group back, made restart php-fpm, nginx and finally I could login…

Thank you so much, this was the fix.