[RESOLVED] After upgrade NC to v17, graphic elements in WebUI are lost, raw version of nextcloud is show

Support intro

Nextcloud version 17.0.0.9
Operating system and version FreeNAS 11.2(FreeBSD)
Apache or nginx version Apache 2.4
PHP version 7.2

The issue you are facing:

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

Steps to replicate it:

  1. Go to shell jail where Nextcloud is installed
  2. Upgrade from NC 16.0.4 to 17.0.0.9 with command line
  • pkg update
  • pkg upgrade nextcloud-php72
  • cd /usr/local/www/nextcloud
  • su -m www -c “php ./occ upgrade”
  1. go to WebUI https://cloud.DOMAINE.fr
  2. enter username et password

This picture show the first page after successful login, the login page where I enter my username and password don’t have this problem.

The output of your Nextcloud log in Admin > Logging:

Can't acces

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'XXXXXXXX',
  'passwordsalt' => 'XXXXXXXX',
  'secret' => 'XXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'local ip',
    1 => 'cloud.DOMAINE.fr',
    2 => 'office.DOMAINE.fr',
  ),
  'datadirectory' => '/mnt/data',
  'dbtype' => 'mysql',
  'version' => '17.0.0.9',
  'overwrite.cli.url' => 'http://localIP',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXX',
  'dbpassword' => 'XXXXXXXX',
  'installed' => true,
  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'enable_previews' => true,
  'preview_max_x' => NULL,
  'preview_max_y' => NULL,
  'preview_max_scale_factor' => NULL,
  'maintenance' => false,
  'loglevel' => 2,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud_service',
  'mail_domain' => 'DOMAINE.fr',
  'default_language' => 'fr',
  'default_locale' => 'fr_FR',
  'logtimezone' => 'Europe/Paris',
  'theme' => '',
);

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

nextcloud.log

...
{"reqId":"U71HRSRuKGUTeRxcrtHT","level":3,"time":"2019-10-08T15:06:15+02:00","remoteAddr":"83.154.227.37","user":"REGULAR USER","app":"no app in context","method":"GET","url":"\/ocs\/v2.php\/core\/navigation\/apps?absolute=true&format=json","message":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: \/usr\/local\/www\/nextcloud\/apps\/files_external\/lib\/config.php","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/lib\/autoloader.php","line":162,"function":"isValidPath","class":"OC\\Autoloader","type":"->","args":["\/usr\/local\/www\/nextcloud\/apps\/files_external\/lib\/config.php"]},{"function":"load","class":"OC\\Autoloader","type":"->","args":["OC_Mount_Config"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/files_external\/appinfo\/app.php","line":36,"function":"spl_autoload_call","args":["OC_Mount_Config"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":260,"args":["\/usr\/local\/www\/nextcloud\/apps\/files_external\/appinfo\/app.php"],"function":"require_once"},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":154,"function":"requireAppFile","class":"OC_App","type":"::","args":["files_external"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":127,"function":"loadApp","class":"OC_App","type":"::","args":["files_external"]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v2.php","line":24,"args":["\/usr\/local\/www\/nextcloud\/ocs\/v1.php"],"function":"require_once"}],"File":"\/usr\/local\/www\/nextcloud\/lib\/autoloader.php","Line":137,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.3release (build 20190724) (Nextcloud)","version":"17.0.0.9"}
{"reqId":"U71HRSRuKGUTeRxcrtHT","level":3,"time":"2019-10-08T15:06:15+02:00","remoteAddr":"83.154.227.37","user":"REGULAR USER","app":"no app in context","method":"GET","url":"\/ocs\/v2.php\/core\/navigation\/apps?absolute=true&format=json","message":{"Exception":"InvalidArgumentException","Message":"Notifier Statistiques d'utilisation (id: survey_client) is not considered because it is using the old way to register.","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/apps\/survey_client\/appinfo\/app.php","line":37,"function":"registerNotifier","class":"OC\\Notification\\Manager","type":"->","args":[{"__class__":"Closure"},{"__class__":"Closure"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":260,"args":["\/usr\/local\/www\/nextcloud\/apps\/survey_client\/appinfo\/app.php"],"function":"require_once"},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":154,"function":"requireAppFile","class":"OC_App","type":"::","args":["survey_client"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":127,"function":"loadApp","class":"OC_App","type":"::","args":["survey_client"]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v2.php","line":24,"args":["\/usr\/local\/www\/nextcloud\/ocs\/v1.php"],"function":"require_once"}],"File":"\/usr\/local\/www\/nextcloud\/lib\/private\/Notification\/Manager.php","Line":86,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.3release (build 20190724) (Nextcloud)","version":"17.0.0.9"}
{"reqId":"U71HRSRuKGUTeRxcrtHT","level":3,"time":"2019-10-08T15:06:15+02:00","remoteAddr":"83.154.227.37","user":"REGULAR USER","app":"no app in context","method":"GET","url":"\/ocs\/v2.php\/core\/navigation\/apps?absolute=true&format=json","message":{"Exception":"OCP\\AutoloadNotAllowedException","Message":"Autoload path not allowed: \/usr\/local\/www\/nextcloud\/apps\/files_external\/lib\/config.php","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/lib\/autoloader.php","line":162,"function":"isValidPath","class":"OC\\Autoloader","type":"->","args":["\/usr\/local\/www\/nextcloud\/apps\/files_external\/lib\/config.php"]},{"function":"load","class":"OC\\Autoloader","type":"->","args":["OC_Mount_Config"]},{"file":"\/usr\/local\/www\/nextcloud\/apps-pkg\/files_external\/appinfo\/routes.php","line":32,"function":"spl_autoload_call","args":["OC_Mount_Config"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":351,"args":["\/usr\/local\/www\/nextcloud\/apps-pkg\/files_external\/appinfo\/routes.php"],"function":"include_once"},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":151,"function":"requireRouteFile","class":"OC\\Route\\Router","type":"->","args":["\/usr\/local\/www\/nextcloud\/apps-pkg\/files_external\/appinfo\/routes.php","files_external"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":331,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["theming.Theming.getStylesheet",{"v":"1"},false]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/URLGenerator.php","line":79,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->","args":["theming.Theming.getStylesheet",{"v":"1"}]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/theming\/appinfo\/app.php","line":34,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["theming.Theming.getStylesheet",{"v":"1"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":260,"args":["\/usr\/local\/www\/nextcloud\/apps\/theming\/appinfo\/app.php"],"function":"require_once"},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":154,"function":"requireAppFile","class":"OC_App","type":"::","args":[{"__class__":"OCP\\AppFramework\\App"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/legacy\/app.php","line":127,"function":"loadApp","class":"OC_App","type":"::","args":["theming"]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v1.php","line":56,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/ocs\/v2.php","line":24,"args":["\/usr\/local\/www\/nextcloud\/ocs\/v1.php"],"function":"require_once"}],"File":"\/usr\/local\/www\/nextcloud\/lib\/autoloader.php","Line":137,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.3release (build20190724) (Nextcloud)","version":"17.0.0.9"}

I have forget something the Brave(chromum) console show lot of Js errors:

Refused to apply style from 'https://cloud.DOMAINE.fr/index.php/apps/files/' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 1.4.1
5Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
globals.js:26 oc_config is deprecated: use OC.config instead
je @ globals.js:26
get @ globals.js:52
mounted @ App.vue:97
Wt @ vue.esm.js:1863
rn @ vue.esm.js:4222
insert @ vue.esm.js:3148
A @ vue.esm.js:6351
(anonymous) @ vue.esm.js:6570
t._update @ vue.esm.js:3948
r @ vue.esm.js:4069
mn.get @ vue.esm.js:4482
mn @ vue.esm.js:4471
(anonymous) @ vue.esm.js:4076
On.$mount @ vue.esm.js:9057
On.$mount @ vue.esm.js:11953
t._init @ vue.esm.js:5021
On @ vue.esm.js:5088
(anonymous) @ init.js:41
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ notifications.js?v=fdde78d8-1:1
sharedfilelist.js:30 Uncaught TypeError: Cannot read property 'FileList' of undefined
    at Object.13 (sharedfilelist.js:30)
    at t (bootstrap:19)
    at Module.11 (files_sharing.js:1)
    at t (bootstrap:19)
    at bootstrap:83
    at files_sharing.js?v=fdde78d8-1:1
13 @ sharedfilelist.js:30
t @ bootstrap:19
11 @ files_sharing.js:1
t @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ files_sharing.js?v=fdde78d8-1:1
filelist.js:45 Uncaught TypeError: Cannot read property 'FileList' of undefined
    at filelist.js:45
    at Object.<anonymous> (filelist.js:10)
    at i (bootstrap:19)
    at Module.<anonymous> (files_trashbin.js:1)
    at i (bootstrap:19)
    at bootstrap:83
    at files_trashbin.js?v=fdde78d8-1:1
(anonymous) @ filelist.js:45
(anonymous) @ filelist.js:10
i @ bootstrap:19
(anonymous) @ files_trashbin.js:1
i @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ files_trashbin.js?v=fdde78d8-1:1
checksum.tabview.js?v=fdde78d8-1:3 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at checksum.tabview.js?v=fdde78d8-1:3
    at checksum.tabview.js?v=fdde78d8-1:150
(anonymous) @ checksum.tabview.js?v=fdde78d8-1:3
(anonymous) @ checksum.tabview.js?v=fdde78d8-1:150
circles.files.list.js?v=fdde78d8-1:42 Uncaught TypeError: Cannot read property 'FileList' of undefined
    at circles.files.list.js?v=fdde78d8-1:42
    at circles.files.list.js?v=fdde78d8-1:292
(anonymous) @ circles.files.list.js?v=fdde78d8-1:42
(anonymous) @ circles.files.list.js?v=fdde78d8-1:292
commentstabview.js:18 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at commentstabview.js:18
    at Object.<anonymous> (commentstabview.js:13)
    at n (bootstrap:19)
    at Module.<anonymous> (comments.js:1)
    at n (bootstrap:19)
    at bootstrap:83
    at comments.js?v=fdde78d8-1:1
(anonymous) @ commentstabview.js:18
(anonymous) @ commentstabview.js:13
n @ bootstrap:19
(anonymous) @ comments.js:1
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ comments.js?v=fdde78d8-1:1
versionstabview.js:18 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at Module.<anonymous> (versionstabview.js:18)
    at n (bootstrap:19)
    at bootstrap:83
    at files_versions.js?v=fdde78d8-1:1
(anonymous) @ versionstabview.js:18
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ files_versions.js?v=fdde78d8-1:1
sharetabview.js:23 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at Object.<anonymous> (sharetabview.js:23)
    at a (bootstrap:64)
    at Module.<anonymous> (additionalScripts.js:1)
    at a (bootstrap:64)
    at bootstrap:199
    at additionalScripts.js?v=fdde78d8-1:1
(anonymous) @ sharetabview.js:23
a @ bootstrap:64
(anonymous) @ additionalScripts.js:1
a @ bootstrap:64
(anonymous) @ bootstrap:199
(anonymous) @ additionalScripts.js?v=fdde78d8-1:1
printer.tabview.js?v=fdde78d8-1:3 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at printer.tabview.js?v=fdde78d8-1:3
    at printer.tabview.js?v=fdde78d8-1:146
(anonymous) @ printer.tabview.js?v=fdde78d8-1:3
(anonymous) @ printer.tabview.js?v=fdde78d8-1:146
tabview.js?v=fdde78d8-1:2 Uncaught TypeError: Cannot read property 'DetailTabView' of undefined
    at tabview.js?v=fdde78d8-1:2
    at tabview.js?v=fdde78d8-1:205
(anonymous) @ tabview.js?v=fdde78d8-1:2
(anonymous) @ tabview.js?v=fdde78d8-1:205
systemtagsfilelist.js:27 Uncaught TypeError: Cannot read property 'FileList' of undefined
    at Object.<anonymous> (systemtagsfilelist.js:27)
    at i (bootstrap:19)
    at Module.<anonymous> (systemtags.js:1)
    at i (bootstrap:19)
    at bootstrap:83
    at systemtags.js?v=fdde78d8-1:1
(anonymous) @ systemtagsfilelist.js:27
i @ bootstrap:19
(anonymous) @ systemtags.js:1
i @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ systemtags.js?v=fdde78d8-1:1
Viewer.js:37 OCA.Viewer initialized
10[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
search.js?v=fdde78d8-1:67 New search handler registered
mindmap.js?v=fdde78d8-1:169 Uncaught TypeError: Cannot read property 'fileActions' of undefined
    at String.<anonymous> (mindmap.js?v=fdde78d8-1:169)
    at Function.each (jquery.js:374)
    at Object.registerFileActions (mindmap.js?v=fdde78d8-1:168)
    at Object.init (mindmap.js?v=fdde78d8-1:6)
    at HTMLDocument.<anonymous> (mindmap.js?v=fdde78d8-1:242)
    at c (jquery.js:3099)
    at Object.fireWith [as resolveWith] (jquery.js:3211)
    at Function.ready (jquery.js:3417)
    at HTMLDocument.P (jquery.js:3433)
(anonymous) @ mindmap.js?v=fdde78d8-1:169
each @ jquery.js:374
registerFileActions @ mindmap.js?v=fdde78d8-1:168
init @ mindmap.js?v=fdde78d8-1:6
(anonymous) @ mindmap.js?v=fdde78d8-1:242
c @ jquery.js:3099
fireWith @ jquery.js:3211
ready @ jquery.js:3417
P @ jquery.js:3433
Viewer.vue:371 Uncaught TypeError: Cannot read property 'fileActions' of undefined
    at i (Viewer.vue:371)
    at Viewer.vue:403
    at Array.forEach (<anonymous>)
    at a.registerHandler (Viewer.vue:396)
    at Viewer.vue:187
    at Array.forEach (<anonymous>)
    at HTMLDocument.<anonymous> (Viewer.vue:186)
i @ Viewer.vue:371
(anonymous) @ Viewer.vue:403
registerHandler @ Viewer.vue:396
(anonymous) @ Viewer.vue:187
(anonymous) @ Viewer.vue:186
(index):1 [DOM] Password forms should have (optionally hidden) username fields for accessibility: (More info: https://goo.gl/9p2vKq) <form id=​"sudo-login-form" class=​"hidden">​…​</form>​
[Violation] Forced reflow while executing JavaScript took 61ms
xhr.js:172 GET https://cloud.DOMAINE.fr/ocs/v2.php/apps/notifications/api/v2/notifications 404 (Not Found)
(anonymous) @ xhr.js:172
t.exports @ xhr.js:11
t.exports @ dispatchRequest.js:57
Promise.then (async)
s.request @ Axios.js:53
s.<computed> @ Axios.js:68
(anonymous) @ bind.js:9
_fetch @ App.vue:172
mounted @ App.vue:94
Wt @ vue.esm.js:1863
rn @ vue.esm.js:4222
insert @ vue.esm.js:3148
A @ vue.esm.js:6351
(anonymous) @ vue.esm.js:6570
t._update @ vue.esm.js:3948
r @ vue.esm.js:4069
mn.get @ vue.esm.js:4482
mn @ vue.esm.js:4471
(anonymous) @ vue.esm.js:4076
On.$mount @ vue.esm.js:9057
On.$mount @ vue.esm.js:11953
t._init @ vue.esm.js:5021
On @ vue.esm.js:5088
(anonymous) @ init.js:41
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ notifications.js?v=fdde78d8-1:1
App.vue:192 Shutting down notifications: app is disabled.
app.js?v=fdde78d8-1:8 OCR could not be initiallized. Some of the required resources (OC, OCA, Tesseract, etc.) did not load in time.

Nobody have idea how to resolve it?
Do you think I need to open bug ticket on github?

Due to the fact that you seem to be the only one having this problem it most likely isn’t a Nextcloud error but a local on on your server. Therefore wouldn’t help to create an issue ticket on GitHub.
Based on other postings containing “Autoload path not allowed” messages, I would assume that you have an incompatible app installed which causes the trouble. I would recommend to use the occ-command to disable all kind of 3rd-party apps etc. first and then try to login again. Once a login is possible again, you could re-enable the apps, one-by-one.

What apps do you have currently enabled? Use the following command to get an overview:

> ./occ app:list
1 Like

Thank you so much for your answering.

I thing that is the good way to resolve this issu, but before your replay I tried an other solution but not much conventional but now all work fine again.

In config.php I tried to change this original lines

  'path' => '/usr/local/www/nextcloud/apps',
  'url' => '/apps',

To this:

  'path' => '/usr/local/www/nextcloud/apps2',
  'url' => '/apps/files2',

When I had refresh Nextcloud one page appear to invite me to upload nextcloud to V17.0.0 without apps. I clicked on update button, and when update process has finish all worked fine again.

After that to retur to normal situation I moved apps folder to apps-old mv apps app-old , recreate apps folder with same owner:group permission of original folder, and changed again config.php file to original configuration at lines path and url.

For futures upgrading I would like to use one occ command for turn off all apps before upgrading.
Do you know what occ command I can use?

There is no command to disable all apps with one command. You could only loop through all apps and run the disable command against each.

The following command could help you, but needs to be adapted to your server environment. You didn’t write which OS your server is running on, so I just assume your web server user is “www-data” (for sudo -u command).
Please cd into your nextcloud directory before running that loop.

for app in $(sudo -u www-data php occ app:list | awk '{print $1 $2}' ); do if [ "$app" = "Disabled:" ]; then break; fi; if [[ "$app" =~ ^-.* ]]; then tmp_app=`echo "$app" | sed -e 's/^-//' -e 's/:$//'`; sudo -u www-data php occ app:disable $tmp_app; fi; done

There will come up a few messages that app xy cannot be disabled. That’s an expected behavior. I noticed the list command shows apps which seem rather internal and even don’t appear in the admin view of apps.
I hope this helps.

I also recommend to separate all core apps, which are part of the base package, and all other 3rd-party and apps by using to separate app directories. That’s the way how I make easier to find app related problems and I think you will find it also documented in the Nextcloud documentation somewhere.

  'apps_paths' => array (
    0 =>  array (
      'path' => '/usr/local/www/nextcloud/apps',        # base apps
      'url' => '/apps',
      'writable' => false,
    ),
    1 => array (
      'path' => '/usr/local/www/nextcloud/apps2',       # 3rd-party apps
      'url' => '/apps2',
      'writable' => true,
    ),
  ),