Broken after update to 12.0.5

Nextcloud version 12.0.5
Operating system and version: Ubuntu 16.04
Apache or nginx version: Apache 2.4.29
PHP version: 7.1

The issue you are facing:
After I updated to 12.0.5 via the admin interface, nothing works anymore. I was asked to update webdav, but even that didn’t work so I did it via the cli, and then after that, it says I have no file, no css is loaded, no JS. Even the login page doesn’t work anymore, you can try with whatever you want:

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

Steps to replicate it:
I just updated from the admin web ui.

The output of your Nextcloud log in Admin > Logging:

can't access

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

$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>
  array (
    0 => '',
  'datadirectory' => '/path/to/nextcloud',
  'overwrite.cli.url' => '',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'XXX',
  'dbhost' => 'X.X.X.X',
  'dbport' => 'XXXX',
  'dbtableprefix' => 'XX',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' =>
  array (
    'host' => 'X.X.X.X',
    'port' => XXXX,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'objectstore' =>
  array (
    'class' => 'OC\\Files\\ObjectStore\\Swift',
    'arguments' =>
    array (
      'username' => 'XXXX',
      'password' => 'XXXX',
      'bucket' => 'XXXX',
      'autocreate' => false,
      'region' => 'XXXX',
      'url' => 'XXXX',
      'tenantName' => 'XXXX',
      'serviceName' => 'swift',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => '',
  'maintenance' => false,
  '' => 'stable',
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'XXXX',

The output of your Apache/nginx/system log in /var/log/____:


I checked the log file from the cli, here is what it says:

{“reqId”:“1RRQzvsa2muufEwjGf1n”,“level”:3,“time”:“2018-01-24T11:46:49+00:00”,“remoteAddr”:“X.X.X.X”,“user”:“XXXX”,“app”:“PHP”,“method”:“GET”,“url”:"/apps/files/",“message”:“Invalid argument supplied for foreach() at /home/cloud/public_html/nextcloud/lib/private/Template/SCSSCacher.php#151”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”,“version”:“”}

EDIT: w2g2 wasn’t gulty, but disabling and enabling it fixed the issue for me

In my case w2g2 broke nc after upgrade to 12.0.5

so perhaps if you have it enabled, you will try
sudo -u www-data php occ app:disable w2g2

or just rename the w2g2 directory

1 Like

I don’t have w2g2, I’ll check my other apps, but for a minor update like that I don’t expect the system to break that hard :frowning:
(it’s not like there are thousands of apps)

I have to correct me. w2g2 wasn’t guilty. Because, now I reactivated it and every thin now works fine.

I think it coult be something related to the cache. So trying to flush the cache or/and deactivate and activate apps witch are manipulation the output should be worth a try…

No luck, I disabled almost everything. I’m a bit worried because in the error message it says “/apps/files/”, but you can’t disable files, it’s the main app. I’d love some help from a developer.

I am not an expert, but it looks like the error occurs when this file is being processed:

which has to do with caching css-files. Therefore I don’t think it has to do with the files-app.
I am sorry that my skills are not sufficient enough though to help any further.


I had a look at your login page and opened the web console. This are the error messages, that I see:

JQMIGRATE: Migrate is installed, version 1.4.0
ReferenceError: OCA is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OCA is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OC is not defined
[Weitere Informationen]
ReferenceError: OCA is not defined
[Weitere Informationen]

Seems this is blocking the login (and probably anything else).
I post that real quick and search for a solution for that. Just that you maybe get an idea already.

1 Like

Well yeah, for plugins that I can disable (like contacts) the error goes away (but that’s completely not normal already), but for the core files, there is nothing I can do…

I’m all for nextcloud, but if I minor update like that broke everything, it’s not ready for mass adoption.

No no, disabling the apps will not help. It’s not about the apps. Mandatory files can’t be loaded and the apps mentioned there are just indicating that.

If I understand it correctly, then

is the file that defines the variables/ objects OC and OCA. And this js file is not processed for any reason.
I assume this file exists and is readable with correct permissions for the web server user. On github I found some OC/ NC issues describing that problem, but never with a (well documented) solution.
One reason I read about, was a misconfigured nginx and using the default nginx config helped:

Have there been any changes/ optimizations to the configs lately or do you remember making your server in any way “extra secure”?

Could you maybe post your nextcloud.log and the web server logs? I’m hoping to find another hint there.

mm no, I haven’t changed anything for a while, and I just followed the recommendations from the admin panel, nothing more. The errors are all like the one I posted earlier, about SCSScacher.php

Just found that:

Can you try commenting out „instanceid=>‘XXX‘“ and „theme=>‘‘“ and refresh your login page?

1 Like

I can confirm this issue.

  • During and after the update the buttons on the web interface were not working (therefore needed to finish upgrade through CLI)
  • One of my browsers was logged in, and still is. It seems as if the CSS files are not loaded and applied.

Commenting out instanceid and removing theme did not resolve the issue

Same here, commenting didn’t fix the problem :frowning:

Not sure it will work for you but another user reported this command solved the problem:

./occ maintenance:mimetype:update-js


1 Like

Thank you for the suggestion; did not help out…

@arvi89: did mostly same things (removed redis cache, restart all related services, …) - same outcome

Yep, doesn’t work.
I’ve deactivated pagespeed from my server, also removed the apcu and redis cache from the config, removed instance ID restarted apache, still the same problem.

Could you set the loglevel to “0” (debug), reload the page, do something on the server and post the latest logs of nextcloud.log.

And there are no log entries in the logs under

We are coming to a point, where I believe it is best to open an issue on Github:

The more we try, the more we could make it worse.

I hope you have a backup.

Tried to remove the theming app as per

but no help - reverting back might be a good idea indeed…