Web login loop after upgrade from 17.0.1.1 to 18.0.0.10

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 18.0.0.10
Operating system and version (eg, Ubuntu 17.04): openSUSE Tumbleweed
Apache or nginx version (eg, Apache 2.4.25): nginx/1.17.7
PHP version (eg, 7.1): 7.4.2

The issue you are facing: After upgrading PHP from 7.3.7 to 7.4.2 Nextcloud 17.0.1.1 refused to work. Then after upgrading Nextcloud to 18.0.0.10 Windows client is working fine, but the web login does not work, it loops to itself. To be more precise, it loops to the page: https://nextcloud.mydomain.tld/login?redirect_url=/apps/files/
I tried the browsers: Chrome, Opera, Firefox, Pale Moon. Internet Explorer behaves different, it suggests to save files/ and does not go further.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:
there is nothing in the log file concerning this issue after the upgrade

{"reqId":"MxNzQDTVVm64hRi7fzLG","level":1,"time":"2020-02-09T12:35:51+03:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"17.0.1.1"}
{"reqId":"MxNzQDTVVm64hRi7fzLG","level":1,"time":"2020-02-09T12:35:55+03:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"17.0.1.1"}
{"reqId":"MxNzQDTVVm64hRi7fzLG","level":1,"time":"2020-02-09T12:35:55+03:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"18.0.0.10"}
{"reqId":"MxNzQDTVVm64hRi7fzLG","level":1,"time":"2020-02-09T12:35:55+03:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceActive:Maintenance mode is kept active","userAgent":"--","version":"18.0.0.10"}
{"reqId":"MxNzQDTVVm64hRi7fzLG","level":1,"time":"2020-02-09T12:35:55+03:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"18.0.0.10"}
{"reqId":"OEWVCWIc31MLvlszXXBb","level":3,"time":"2020-02-09T12:40:13+03:00","remoteAddr":"192.168.2.3","user":"--","app":"PHP","method":"GET","url":"/apps/theming/styles?v=0","message":"Trying to access array offset on value of type null at /srv/www/nextcloud/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 OPR/66.0.3515.72","version":"18.0.0.10"}
{"reqId":"nEm08swLzDd3NI2UUt94","level":3,"time":"2020-02-09T13:43:48+03:00","remoteAddr":"192.168.2.3","user":"--","app":"PHP","method":"GET","url":"/apps/theming/styles?v=0","message":"Trying to access array offset on value of type null at /srv/www/nextcloud/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 OPR/66.0.3515.72","version":"18.0.0.10"}

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

# sudo -u nginx php occ config:list
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "18.0.0.10",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "overwriteprotocol": "https",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "syslog_tag": "nextcloud",
        "loglevel": 2,
        "logtimezone": "Europe\/Moscow",
        "knowledgebaseenabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "maintenance": false,
        "theme": "",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "PLAIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "updater.release.channel": "stable",
        "mail_sendmailmode": "smtp"
    },
    "apps": {
        "accessibility": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "activity": {
            "enabled": "yes",
            "installed_version": "2.11.0",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "19309"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "logging"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "enterpriseLogoChecked": "yes",
            "installedat": "1539350777.1317",
            "lastcron": "1581248103",
            "lastupdateResult": "{\"version\":\"17.0.3.1\",\"versionstring\":\"Nextcloud 17.0.3\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-17.0.3.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/17\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=17.0.3\",\"autoupdater\":\"1\",\"eol\":\"0\"}",
            "lastupdatedat": "0",
            "oc.integritycheck.checker": "[]",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "scss.variables": "db81cddf52fdb3c8ca1e4c859e214124",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
            "vendor": "nextcloud"
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "chunks_migrated": "1",
            "enabled": "yes",
            "installed_version": "1.14.0",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.13.1",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "files_rightclick": {
            "enabled": "yes",
            "installed_version": "0.15.2",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "no",
            "installed_version": "2.8.0",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "filesystem,dav"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.7.0",
            "types": "logging"
        },
        "gallery": {
            "enabled": "no",
            "installed_version": "18.4.0",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.3.0",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": "authentication"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.6.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "0.6.0",
            "types": ""
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "filesystem"
        },
        "support": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "last_report": "{\"id\":\"ocmij779d6tn\",\"items\":[[\"server\",\"version\",\"15.0.2.0\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\APCu\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"\\\\OC\\\\Memcache\\\\Redis\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.3.0\"],[\"php\",\"memory_limit\",536870912],[\"php\",\"max_execution_time\",3600],[\"php\",\"upload_max_filesize\",10737418240],[\"database\",\"type\",\"mysql\"],[\"database\",\"version\",\"10.2.19\"],[\"database\",\"size\",3604480],[\"apps\",\"accessibility\",\"1.1.0\"],[\"apps\",\"activity\",\"2.8.2\"],[\"apps\",\"cloud_federation_api\",\"0.1.0\"],[\"apps\",\"comments\",\"1.5.0\"],[\"apps\",\"dav\",\"1.8.1\"],[\"apps\",\"federatedfilesharing\",\"1.5.0\"],[\"apps\",\"federation\",\"1.5.0\"],[\"apps\",\"files\",\"1.10.0\"],[\"apps\",\"files_pdfviewer\",\"1.4.0\"],[\"apps\",\"files_sharing\",\"1.7.0\"],[\"apps\",\"files_texteditor\",\"2.7.0\"],[\"apps\",\"files_trashbin\",\"1.5.0\"],[\"apps\",\"files_versions\",\"1.8.0\"],[\"apps\",\"files_videoplayer\",\"1.4.0\"],[\"apps\",\"firstrunwizard\",\"2.4.0\"],[\"apps\",\"gallery\",\"18.2.0\"],[\"apps\",\"logreader\",\"2.0.0\"],[\"apps\",\"lookup_server_connector\",\"1.3.0\"],[\"apps\",\"nextcloud_announcements\",\"1.4.0\"],[\"apps\",\"notifications\",\"2.3.0\"],[\"apps\",\"oauth2\",\"1.3.0\"],[\"apps\",\"password_policy\",\"1.5.0\"],[\"apps\",\"provisioning_api\",\"1.5.0\"],[\"apps\",\"serverinfo\",\"1.5.0\"],[\"apps\",\"sharebymail\",\"1.5.0\"],[\"apps\",\"support\",\"1.0.0\"],[\"apps\",\"survey_client\",\"1.3.0\"],[\"apps\",\"systemtags\",\"1.5.0\"],[\"apps\",\"theming\",\"1.6.0\"],[\"apps\",\"twofactor_backupcodes\",\"1.4.1\"],[\"apps\",\"updatenotification\",\"1.5.0\"],[\"apps\",\"workflowengine\",\"1.5.0\"],[\"stats\",\"num_files\",4078],[\"stats\",\"num_users\",2],[\"stats\",\"num_storages\",5],[\"stats\",\"num_storages_local\",2],[\"stats\",\"num_storages_home\",3],[\"stats\",\"num_storages_other\",0],[\"stats\",\"num_comments\",0],[\"stats\",\"num_comment_markers\",0],[\"stats\",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",0],[\"files_sharing\",\"num_shares_user\",0],[\"files_sharing\",\"num_shares_groups\",0],[\"files_sharing\",\"num_shares_link\",0],[\"files_sharing\",\"num_shares_link_no_password\",0],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"no\"]]}",
            "last_sent": "1548425391",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "updatenotification": {
            "core": "17.0.3.1",
            "enabled": "yes",
            "files_rightclick": "0.15.1",
            "installed_version": "1.8.0",
            "types": "",
            "update_check_errors": "0"
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "filesystem"
        }
    }
}

The output of your Apache/nginx/system log in /var/log/____: there is nothing in the log concerning this issue

PASTE HERE

The problem was the php session.save_path was not writable for the web server user: https://github.com/nextcloud/server/issues/19409

It works properly now.