OCA.Files.Navigation is not a constructor after upgrade to NC 26 and 27

Nextcloud version (eg, 20.0.5): 27.0.0 in Docker (27.0.0-apache)
Operating system and version (eg, Ubuntu 20.04): Fedora
Apache or nginx version (eg, Apache 2.4.25): Apache in Docker image
PHP version (eg, 7.4): PHP in Docker image

The issue you are facing:

I went through the upgrade from NC 25.0.7 to NC 26 and then NC 27.0.0. Migration process went without any error. The occ status seems fine:

  - installed: true
  - version: 27.0.0.8
  - versionstring: 27.0.0
  - edition:
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false

But when I log in and open Files app, I face an error in the DevTools Console and the area, where file list should show is blank (white). The Photos app loads fine and displays what I expected.

The error:

app.js:54 Uncaught TypeError: OCA.Files.Navigation is not a constructor
    at Object.initialize (app.js:54:22)
    at app.js:445:17
    at regexp-tree.js:406:6

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

Steps to replicate it:

  1. Upgrade from 25.0.7 to NC 27 (spotted also on NC26)

The output of your Nextcloud log in Admin > Logging: no error, only debug

[logreader] Debug: Could not find resource file "/apps/logreader/css/../js/logreader-main.css"

GET /settings/admin/logging
from 109.230.41.6 by admin at 2023-06-18T19:21:38+00:00

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

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'password' => 'REDACTED',
    'port' => 6379,
  ),
  'trusted_proxies' =>
  array (
    0 => '172.18.0.0/16',
  ),
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'REDACTED',
    2 => 'REDACTED',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '27.0.0.8',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'instanceid' => 'REDACTED',
  'maintenance' => false,
  'loglevel' => 0,
  'overwriteprotocol' => 'https',
  'theme' => '',
  'app_install_overwrite' =>
  array (
    0 => 'files_mindmap',
    1 => 'drawio',
  ),
  'debug' => true,
  'log_type' => 'file',
  'logfile' => 'nextcloud_log.log',
  'logdateformat' => 'F d, Y H:i:s',

It seems there are other errors. I found another JS one in Dashboard, but unsure if it is related:

bootstrap:15 Uncaught TypeError: Cannot read properties of undefined (reading 'call')
    at o (bootstrap:15:13)
    at 25714 (chunk loaded:1:5)
    at o (bootstrap:15:13)
    at core-unsupported-browser-redirect.js:2:2798
    at o.O (chunk loaded:26:14)
    at core-unsupported-browser-redirect.js:2:2814
    at core-unsupported-browser-redirect.js:2:2819

Proxying an event bus of version 2.1.1 with 1.3.0
e @ index.es.js:627
70903 @ index.es.js:1351
i @ core-unified-search.js:2
71894 @ floating-ui.core.browser.min.mjs:1
i @ core-unified-search.js:2
22200 @ floating-ui.core.browser.min.mjs:1
i @ core-unified-search.js:2
55058 @ main.js:18
i @ core-unified-search.js:2
17499 @ main.js:19
i @ core-unified-search.js:2
56874 @ chunk loaded:1
i @ core-unified-search.js:2
(anonymous) @ core-unified-search.js:2
i.O @ core-unified-search.js:2
(anonymous) @ core-unified-search.js:2
(anonymous) @ core-unified-search.js:2
ocdialog.js:252 jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.
Un @ ocdialog.js:252
get @ ocdialog.js:262
(anonymous) @ trusted-types.js:1
(anonymous) @ resource-timing.js:1
19755 @ resource-timing.js:1
r @ .*$:7
2784 @ chunk loaded:1
r @ .*$:7
(anonymous) @ .*$:116
r.O @ .*$:33
(anonymous) @ .*$:117
(anonymous) @ .*$:118
ocdialog.js:252 $ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.
Un @ ocdialog.js:252
get @ ocdialog.js:262
(anonymous) @ trusted-types.js:1
(anonymous) @ resource-timing.js:1
19755 @ resource-timing.js:1
r @ .*$:7
2784 @ chunk loaded:1
r @ .*$:7
(anonymous) @ .*$:116
r.O @ .*$:33
(anonymous) @ .*$:117
(anonymous) @ .*$:118
index.es.js:627 Proxying an event bus of version 2.1.1 with 1.3.0
e @ index.es.js:627
70903 @ index.es.js:1351
r @ .*$:7
71894 @ floating-ui.core.browser.min.mjs:1
r @ .*$:7
22200 @ floating-ui.core.browser.min.mjs:1
r @ .*$:7
4820 @ index.es.js:1358
r @ .*$:7
2784 @ chunk loaded:1
r @ .*$:7
(anonymous) @ .*$:116
r.O @ .*$:33
(anonymous) @ .*$:117
(anonymous) @ .*$:118
Sidebar.vue:485 OCA.Files.Sidebar initialized
sidebar.js:36 OCA.Files.Sidebar initialized

bootstrap:19 Uncaught TypeError: Cannot read properties of undefined (reading 'call')
    at o (bootstrap:19:32)
    at 95754 (chunk loaded:1:5)
    at o (bootstrap:19:32)
    at files-reference-files.js:2:10214
    at o.O (chunk loaded:25:12)
    at files-reference-files.js:2:10229
    at files-reference-files.js:2:10235

Uncaught TypeError: Cannot read properties of undefined (reading 'call')
    at a (bootstrap:19:32)
    at 24103 (chunk loaded:1:5)
    at a (bootstrap:19:32)
    at files_sharing-files_sharing_tab.js:2:85140
    at a.O (chunk loaded:25:12)
    at files_sharing-files_sharing_tab.js:2:85155
    at files_sharing-files_sharing_tab.js:2:85161
a @ bootstrap:19
24103 @ chunk loaded:1
a @ bootstrap:19
(anonymous) @ files_sharing-files_sharing_tab.js:2
a.O @ chunk loaded:25
(anonymous) @ files_sharing-files_sharing_tab.js:2
(anonymous) @ files_sharing-files_sharing_tab.js:2

bootstrap:19 Uncaught TypeError: Cannot read properties of undefined (reading 'call')
    at o (bootstrap:19:32)
    at 24308 (chunk loaded:1:5)
    at o (bootstrap:19:32)
    at dashboard-main.js:2:43837
    at o.O (chunk loaded:25:12)
    at dashboard-main.js:2:43852
    at dashboard-main.js:2:43858
o @ bootstrap:19
24308 @ chunk loaded:1
o @ bootstrap:19
(anonymous) @ dashboard-main.js:2
o.O @ chunk loaded:25
(anonymous) @ dashboard-main.js:2
(anonymous) @ dashboard-main.js:2

Sidebar.vue:1 Uncaught Error: The icon argument is not a valid string
    at new e (Sidebar.vue:1:1255)
    at sidebar.js:38:21
    at sidebar.js:66:45
    at sidebar.js:66:45

Thank you for your help.

Do you typically run with debug set to true? I ask because that changes a bunch of frontend behavior (among other things).

Anyhow the issue you’re reporting has only ever come up twice:

Poking through the comments on them might turn up something.

Also don’t forget to:

  • Try to reproduce without browser extensions
  • Try to reproduce in a different browser

What browser is this?

Thank you @jtr for pointing the debug flag. I turned it off, as I usually don’t run it with it and the problem is gone.

Previously tested with Brave, Chrome and also Private browsing.

1 Like