UI issues after upgrade to 27.1.0

Nextcloud version: 27.1.0
Operating system and version: Ubuntu 22.04
Apache or nginx version: nginx/1.18.0 (Ubuntu)
PHP version: 8.2

The issue you are facing:

Previous Nextcloud version was 27.0.0. Used web-based updater to upgrade to 27.1.0 (automatic).
The upgrade went smoothly, but afterwards the web-based UI is unstyled (I have screenshots, is it possible to include them here? Nevermind, figured it out, see my next post.).
This happened last week, and I thought I’d messed up the upgrade procedure somehow.
So I restored from backup this morning and tried again, same result.

Is this the first time you’ve seen this error? N

Steps to replicate it:

  1. Restore system to 27.0.x
  2. Use web-based updater to upgrade to latest version
  3. Access web site for my cloud

The output of your Nextcloud log in Admin > Logging:

cat updater.log | grep 2023-09-18
2023-09-18T14:18:35+0000 xmRYqC3e1o [info] request to updater
2023-09-18T14:18:35+0000 xmRYqC3e1o [info] currentStep()
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] show HTML page
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] current version: 27.0.0 build time: 2023-06-12T14:58:06+00:00 add4e4365a4040d2e4e6aa79c0d03c3edd78583c
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] getUpdateServerResponse()
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] updaterServer: https://updates.nextcloud.com/updater_server/
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] releaseChannel: stable
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] internal version: 27.0.0.8
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] updateURL: https://updates.nextcloud.com/updater_server/?version=27x0x0x8xxxstablexx2023-06-12T14%3A58%3A06%2B00%3A00+add4e4365a4040d2e4e6aa79c0d03c3edd78583cx8x2x10
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] getUpdateServerResponse response: Array
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] checkForUpdate() Array
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] getChangelogURL()
2023-09-18T14:18:36+0000 xmRYqC3e1o [info] end of checkForUpdate() Update to Nextcloud 27.1.0 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-27.1.0.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#27-1-0" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2023-09-18T14:18:45+0000 chzcsCaTnH [info] request to updater
2023-09-18T14:18:45+0000 chzcsCaTnH [info] currentStep()
2023-09-18T14:18:45+0000 chzcsCaTnH [info] POST request for step "1"
2023-09-18T14:18:45+0000 chzcsCaTnH [info] startStep("1")
2023-09-18T14:18:45+0000 chzcsCaTnH [info] checkForExpectedFilesAndFolders()
2023-09-18T14:18:45+0000 chzcsCaTnH [info] end of checkForExpectedFilesAndFolders()
2023-09-18T14:18:45+0000 chzcsCaTnH [info] endStep("1")
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] request to updater
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] currentStep()
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] Step 1 is in state "end".
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] POST request for step "2"
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] startStep("2")
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] checkWritePermissions()
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] end of checkWritePermissions()
2023-09-18T14:18:45+0000 Fyqc5vB59c [info] endStep("2")
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] request to updater
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] currentStep()
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] Step 2 is in state "end".
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] POST request for step "3"
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] startStep("3")
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] createBackup()
2023-09-18T14:18:46+0000 8r4Ve0aG1W [info] backup folder location: /mnt/cloud/updater-ocncf1ocvpoh/backups/nextcloud-27.0.0.8-1695046726/
2023-09-18T14:19:17+0000 8r4Ve0aG1W [info] end of createBackup()
2023-09-18T14:19:17+0000 8r4Ve0aG1W [info] endStep("3")
2023-09-18T14:19:17+0000 MdXAIarCMV [info] request to updater
2023-09-18T14:19:17+0000 MdXAIarCMV [info] currentStep()
2023-09-18T14:19:17+0000 MdXAIarCMV [info] Step 3 is in state "end".
2023-09-18T14:19:17+0000 MdXAIarCMV [info] POST request for step "4"
2023-09-18T14:19:17+0000 MdXAIarCMV [info] startStep("4")
2023-09-18T14:19:17+0000 MdXAIarCMV [info] downloadUpdate()
2023-09-18T14:19:17+0000 MdXAIarCMV [info] getUpdateServerResponse()
2023-09-18T14:19:17+0000 MdXAIarCMV [info] updaterServer: https://updates.nextcloud.com/updater_server/
2023-09-18T14:19:17+0000 MdXAIarCMV [info] releaseChannel: stable
2023-09-18T14:19:17+0000 MdXAIarCMV [info] internal version: 27.0.0.8
2023-09-18T14:19:17+0000 MdXAIarCMV [info] updateURL: https://updates.nextcloud.com/updater_server/?version=27x0x0x8xxxstablexx2023-06-12T14%3A58%3A06%2B00%3A00+add4e4365a4040d2e4e6aa79c0d03c3edd78583cx8x2x10
2023-09-18T14:19:18+0000 MdXAIarCMV [info] getUpdateServerResponse response: Array
2023-09-18T14:19:18+0000 MdXAIarCMV [info] storage location exists
2023-09-18T14:19:28+0000 MdXAIarCMV [info] end of downloadUpdate()
2023-09-18T14:19:28+0000 MdXAIarCMV [info] endStep("4")
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] request to updater
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] currentStep()
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] Step 4 is in state "end".
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] POST request for step "5"
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] startStep("5")
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] verifyIntegrity()
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] getUpdateServerResponse()
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] updaterServer: https://updates.nextcloud.com/updater_server/
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] releaseChannel: stable
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] internal version: 27.0.0.8
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] updateURL: https://updates.nextcloud.com/updater_server/?version=27x0x0x8xxxstablexx2023-06-12T14%3A58%3A06%2B00%3A00+add4e4365a4040d2e4e6aa79c0d03c3edd78583cx8x2x10
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] getUpdateServerResponse response: Array
2023-09-18T14:19:28+0000 mW4lOTwtkn [info] storage location: /mnt/cloud/updater-ocncf1ocvpoh/downloads/
2023-09-18T14:19:30+0000 mW4lOTwtkn [info] end of verifyIntegrity()
2023-09-18T14:19:30+0000 mW4lOTwtkn [info] endStep("5")
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] request to updater
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] currentStep()
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] Step 5 is in state "end".
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] POST request for step "6"
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] startStep("6")
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] extractDownload()
2023-09-18T14:19:31+0000 dQhKdsOI8F [info] storage location: /mnt/cloud/updater-ocncf1ocvpoh/downloads/
2023-09-18T14:19:50+0000 dQhKdsOI8F [info] end of extractDownload()
2023-09-18T14:19:50+0000 dQhKdsOI8F [info] endStep("6")
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] request to updater
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] currentStep()
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] Step 6 is in state "end".
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] POST request for step "7"
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] startStep("7")
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] setMaintenanceMode("true")
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] configFileName /var/www/nextcloud/updater/../config/config.php
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] end of setMaintenanceMode()
2023-09-18T14:19:50+0000 VnOr7dUkHO [info] endStep("7")
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] request to updater
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] currentStep()
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] Step 7 is in state "end".
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] POST request for step "8"
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] startStep("8")
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replaceEntryPoints()
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace index.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace status.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace remote.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace public.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace ocs/v1.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] replace ocs/v2.php
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] end of replaceEntryPoints()
2023-09-18T14:19:50+0000 gYgeQ4gsll [info] endStep("8")
2023-09-18T14:19:51+0000 xEQJY2GLHK [info] request to updater
2023-09-18T14:19:51+0000 xEQJY2GLHK [info] currentStep()
2023-09-18T14:19:51+0000 xEQJY2GLHK [info] Step 8 is in state "end".
2023-09-18T14:19:51+0000 xEQJY2GLHK [info] POST request for step "9"
2023-09-18T14:19:51+0000 xEQJY2GLHK [info] startStep("9")
2023-09-18T14:19:52+0000 xEQJY2GLHK [info] deleteOldFiles()
2023-09-18T14:19:53+0000 xEQJY2GLHK [info] config sample exists
2023-09-18T14:19:53+0000 xEQJY2GLHK [info] themes README exists
2023-09-18T14:19:54+0000 xEQJY2GLHK [info] end of deleteOldFiles()
2023-09-18T14:19:54+0000 xEQJY2GLHK [info] endStep("9")
2023-09-18T14:19:54+0000 cx1Zm1bO9w [info] request to updater
2023-09-18T14:19:54+0000 cx1Zm1bO9w [info] currentStep()
2023-09-18T14:19:54+0000 cx1Zm1bO9w [info] Step 9 is in state "end".
2023-09-18T14:19:54+0000 cx1Zm1bO9w [info] POST request for step "10"
2023-09-18T14:19:55+0000 cx1Zm1bO9w [info] startStep("10")
2023-09-18T14:19:55+0000 cx1Zm1bO9w [info] moveNewVersionInPlace()
2023-09-18T14:19:55+0000 cx1Zm1bO9w [info] storage location: /mnt/cloud/updater-ocncf1ocvpoh/downloads/nextcloud/
2023-09-18T14:20:13+0000 cx1Zm1bO9w [info] end of moveNewVersionInPlace()
2023-09-18T14:20:13+0000 cx1Zm1bO9w [info] endStep("10")
2023-09-18T14:20:19+0000 9SWKh3cocn [info] request to updater
2023-09-18T14:20:19+0000 9SWKh3cocn [info] currentStep()
2023-09-18T14:20:19+0000 9SWKh3cocn [info] Step 10 is in state "end".
2023-09-18T14:20:19+0000 9SWKh3cocn [info] POST request for step "11"
2023-09-18T14:20:19+0000 9SWKh3cocn [info] startStep("11")
2023-09-18T14:20:19+0000 9SWKh3cocn [info] setMaintenanceMode("false")
2023-09-18T14:20:19+0000 9SWKh3cocn [info] configFileName /var/www/nextcloud/updater/../config/config.php
2023-09-18T14:20:19+0000 9SWKh3cocn [info] end of setMaintenanceMode()
2023-09-18T14:20:19+0000 9SWKh3cocn [info] endStep("11")
2023-09-18T14:20:19+0000 s2rISBv8QO [info] request to updater
2023-09-18T14:20:19+0000 s2rISBv8QO [info] currentStep()
2023-09-18T14:20:19+0000 s2rISBv8QO [info] Step 11 is in state "end".
2023-09-18T14:20:19+0000 s2rISBv8QO [info] POST request for step "12"
2023-09-18T14:20:19+0000 s2rISBv8QO [info] startStep("12")
2023-09-18T14:20:19+0000 s2rISBv8QO [info] finalize()
2023-09-18T14:20:19+0000 s2rISBv8QO [info] storage location: /mnt/cloud/updater-ocncf1ocvpoh/downloads/nextcloud/
2023-09-18T14:20:19+0000 s2rISBv8QO [info] call opcache_reset()
2023-09-18T14:20:19+0000 s2rISBv8QO [info] end of finalize()
2023-09-18T14:20:19+0000 s2rISBv8QO [info] endStep("12")

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

<?php
$CONFIG = array (
  'instanceid' => 'ocncf1ocvpoh',
  'passwordsalt' => 'randomstuff',
  'secret' => 'randomstuff',
  'trusted_domains' => 
  array (
    0 => 'cloud.mydomain.com',
  ),
  'datadirectory' => '/mnt/cloud',
  'overwrite.cli.url' => 'https://cloud.mydomain.com',
  'dbtype' => 'mysql',
  'version' => '27.0.0.8',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'easypeasy',
  'default_phone_region' => 'us',
  'installed' => true,
  'logtimezone' => 'UTC',
  'loglevel' => 1,
  'maintenance' => false,
  'theme' => '',
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => [
    'host' => 'localhost',
    'port' => 6379,
  ],
  'mysql.utf8mb4' => true,
  'has_rebuilt_cache' => true,
  'updater.secret' => 'randomstuff',
);

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

2023/09/18 07:12:33 [error] 562001#562001: *1241 open() "/var/www/nextcloud/index.php/.well-known/webfinger" failed (20: Not a directory), client: ip.ad.dres.s, server: cloud.mydomain.com, request: "GET /index.php/.well-known/webfinger HTTP/2.0", host: "cloud.mydomain.com"
2023/09/18 07:12:33 [error] 562001#562001: *1241 open() "/var/www/nextcloud/index.php/.well-known/nodeinfo" failed (20: Not a directory), client: ip.ad.dres.s, server: cloud.mydomain.com, request: "GET /index.php/.well-known/nodeinfo HTTP/2.0", host: "cloud.mydomain.com"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

/var/www/nextcloud/data# ll
total 12
drwxr-xr-x  2 www-data www-data 4096 Sep 18 06:35 ./
drwxr-xr-x 15 www-data www-data 4096 Sep 18 07:20 ../
-rw-r--r--  1 www-data www-data  284 Sep 18 06:35 .htaccess
-rw-r--r--  1 www-data www-data    0 Sep 18 06:35 index.html
-rw-r--r--  1 www-data www-data    0 Sep 18 06:35 nextcloud.log

I had some minor glitches in the UI as well after the update e.g. the “+ New” button" still had the old shape.

Clearing the browser cache fixed it for me.

Thanks!

I cleared my cache, disabled Shields (I use the Brave browser), and even tried Firefox. I also had a co-worker try on his machine (he uses Chrome). Same result.

I also checked the server to make sure UFW or iptables wasn’t interfering. Neither are currently active, while I’m troubleshooting.

To be clear, the Nextcloud clients on our machines are linking and syncing perfectly. It’s just the website UI that is messed up.


Not sure then, maybe you can look in the browser inspector (F12) for errors…

In general, there are several possible reasons why this could happen:

  • Incorrect web server configuration
  • Missing / wrongly configured dependencies on your server (PHP, Redis, Database)
  • Wrong file / folder permissions / ownership
  • Missing files in the Nextcloud folder

I think this is exactly what is nescessary for every NC user after the Update to 27.1.0

Everything seems better / ok after a propper browser cache clearance!
So i did a clear of “ALL” not only the last hour or last day cache! Really the whole cache

1 Like

Yep. Clearing the browser cache is the “Reboot” of the web application age. :wink:

Also the old problem of the sort files by date (from new to old)
see github issue

is not earlier “solved” until this cache clearance!

Thanks for the input!

I checked my browser console (after clearing cache again), and I get these Javascript errors:

xhr.js:251     GET https://cloud.mydomain.com/ocs/v2.php/apps/text/workspace?path=%2F 404

ServiceWorker.js:31 Refused to create a worker from 'https://cloud.mydomain.com/index.php/apps/files/preview-service-worker.js' because it violates the following Content Security Policy directive: "script-src 'nonce-NkVEVDJ6VjBFUEdLWjVwQnhweHFpVXBkTkpHN1NoaW9vZWI5S2d6dkgxUT06alNmaGkyY0ZaTWJMRmN3U29lUUE0UThaWmZmMkdYclI4cENGVEd2YVZSQT0='". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

My Nginx config uses these directives, taken directly from the Nginx setup docs:

    add_header Referrer-Policy                   "no-referrer"       always;
    add_header X-Content-Type-Options            "nosniff"           always;
    add_header X-Download-Options                "noopen"            always;
    add_header X-Frame-Options                   "SAMEORIGIN"        always;
    add_header X-Permitted-Cross-Domain-Policies "none"              always;
    add_header X-Robots-Tag                      "noindex, nofollow" always;
    add_header X-XSS-Protection                  "1; mode=block"     always;

I added a header piece in the Nginx config and restarted:
add_header Content-Security-Policy "worker-src *" always;
Same errors, so I surmise the code is overriding the Nginx directive.

I went to the code directory and did:

grep -rFn "script-src" . | grep nonce
./lib/private/legacy/OC_Response.php:84: ... . 'script-src \'self\' \'nonce-'.\OC::$server->getContentSecurityPolicyNonceManager()->getNonce().'\'; '

I’m running into a similar issue, but clearing the cache did not help.

In my case, after updating to 27.1.0, when I log in on the Web UI, there are no files listed in the main listing for my account. I can see deleted items in that view, and the files are there when I look in the actual file system on my server, but the files just don’t show up on the Web UI. I did clear my cache (Chrome is my main browser), and I logged in from a fresh / clean version of Firefox, but had the same results.

I replaced my nginx config (/etc/nginx/sites-available) with an older version that didn’t have all the “add_header” directives, and the site works now.

I’m comparing and experimenting with it now to see what might be breaking things. I’ll report back here. Maybe my findings will help you!

I think the CSP thing was a red herring.

After going through the configs, I found that my implementation of the line from the docs
NGINX configuration — Nextcloud latest Administration Manual latest documentation
about mime.types for javascript was causing the UI mess.

I added mjs to the /etc/nginx/mime.types file’s application/javascript line so it looks like this:
application/javascript js mjs;
and removed the mime.types stuff from the nextcloud config, and all is well.

Mind you, I still get all the CSP errors in the browser console, but

  1. Only on the Files page, and

  2. They’re not stopping the page from loading or the UI from working.

For documentation, here’re the errors:

text-files.js?v=fd2105cc-3:2     GET https://cloud.mydomain.com/ocs/v2.php/apps/text/workspace?path=%2F 404
Refused to create a worker from 'https://cloud.mydomain.com/index.php/apps/files/preview-service-worker.js' because it violates the following Content Security Policy directive: "script-src 'nonce-dlJlcnJYcEtyN1RsVEY5e ... ZVNqSVpJekp6dURlQm5wRT0='". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

core-common.js?v=fd2105cc-3:2 [ERROR] files: SW registration failed:  {app: 'files', uid: 'myuser', level: 1, error: DOMException: Failed to register a ServiceWorker: The provided scriptURL ('https://cloud.mydomain…}
1 Like

That looks like the update routine wasn’t called/finished. Can you check the version in version.php. If the version in version.php is newer you can try to start the upgrade process again with sudo -u www-data php occ upgrade

Thank you, I got it all updated. It’s reporting 27.1.0 as the current version, and there’s an update available to 27.1.1 now (which TBH I’m viewing with some suspicion :face_with_monocle: ).

I did end up upgrading from the CLI instead of the web page.

This topic was automatically closed after 39 hours. New replies are no longer allowed.