ERR_TOO_MANY_REDIRECTS after updating from 11.0.3 to 12.0.1

Nextcloud version (eg, 10.0.2): 12.0.1
Operating system and version (eg, Ubuntu 16.04): don’t know (shared hosting)
Apache or nginx version (eg, Apache 2.4.25): Apache (don’t know, shared hosting)
PHP version (eg, 5.6): 7.1
Is this the first time you’ve seen this error?: Yes

Can you reliably replicate it? (If so, please outline steps):

remove cookies related to nextcloud, open login page, enter login information, then the redirection error occurs

The issue you are facing:

  • redirection error after providing login data (Firefox: ‘The page isn’t redirecting properly’, Chrome: ‘### redirected you too many times. ERR_TOO_MANY_REDIRECTS’)
  • before updating to 12.0.1 everything worked just fine in 11.0.3

The output of your Nextcloud log in Admin > Logging:

{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #2 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“file_get_contents(/home/webvs5x4i/html/nextcloud/resources/config//mimetypemapping.dist.json): failed to open stream: No such file or directory at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#141”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“array_merge(): Argument #1 is not an array at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#101”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“vMD6Gs4iTJR3IeKx7ymd”,“level”:3,“time”:“2017-08-07T20:36:43+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/login”,“message”:“Invalid argument supplied for foreach() at /home/webvs5x4i/html/nextcloud/lib/private/Files/Type/Detection.php#104”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“F1KVPrquISIlUclpezvg”,“level”:3,“time”:“2017-08-07T20:36:44+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“core”,“method”:“GET”,“url”:“/cron.php”,“message”:“Error while running background job (class: OC\Command\CommandJob, arguments: O:33:"OCA\Files_Versions\Command\Expire":2:{s:43:"\u0000OCA\Files_Versions\Command\Expire\u0000fileName";s:14:"/Notes/todo.md";s:39:"\u0000OCA\Files_Versions\Command\Expire\u0000user";s:3:"uli";}): {"Exception":"InvalidArgumentException","Message":"Invalid serialized command","Code":0,"Trace":"#0 \/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/BackgroundJob\/Job.php(59): OC\\Command\\CommandJob->run(‘O:33:\"OCA\\\\Files…’)\n#1 \/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/BackgroundJob\/QueuedJob.php(43): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#2 \/home\/webvs5x4i\/html\/nextcloud\/cron.php(147): OC\\BackgroundJob\\QueuedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#3 {main}","File":"\/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/Command\/CommandJob.php","Line":37}”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0”,“version”:“12.0.1.5”}
{“reqId”:“CsaUJHoOKtg7GiuCfb7x”,“level”:3,“time”:“2017-08-07T20:39:51+00:00”,“remoteAddr”:“31.7.56.134”,“user”:“–”,“app”:“core”,“method”:“GET”,“url”:“/cron.php”,“message”:“Error while running background job (class: OC\Command\CommandJob, arguments: O:33:"OCA\Files_Versions\Command\Expire":2:{s:43:"\u0000OCA\Files_Versions\Command\Expire\u0000fileName";s:12:"/Notes/TV.md";s:39:"\u0000OCA\Files_Versions\Command\Expire\u0000user";s:3:"uli";}): {"Exception":"InvalidArgumentException","Message":"Invalid serialized command","Code":0,"Trace":"#0 \/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/BackgroundJob\/Job.php(59): OC\\Command\\CommandJob->run(‘O:33:\"OCA\\\\Files…’)\n#1 \/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/BackgroundJob\/QueuedJob.php(43): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#2 \/home\/webvs5x4i\/html\/nextcloud\/cron.php(147): OC\\BackgroundJob\\QueuedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#3 {main}","File":"\/home\/webvs5x4i\/html\/nextcloud\/lib\/private\/Command\/CommandJob.php","Line":37}”,“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36”,“version”:“12.0.1.5”}

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

<?php $CONFIG = array ( 'instanceid' => '###', 'passwordsalt' => '###', 'secret' => '###', 'trusted_domains' => array ( 0 => '###.de', ), 'overwriteprotocol' => 'https', 'datadirectory' => '/home/webvs5x4i/html/nextcloud/data', 'overwrite.cli.url' => 'https://###.de', 'dbtype' => 'mysql', 'version' => '12.0.1.5', 'dbname' => 'dblbn8cp', 'dbhost' => '###', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '###', 'dbpassword' => '###', 'logtimezone' => 'UTC', 'installed' => true, 'default_language' => 'en', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'updater.secret' => '###', );

The output of your Apache/nginx/system log in /var/log/____: cannot access, shared hosting