Filemanager does not load due to JS error

When I try to open the files section the files doesn’t load at all. The edit bar is also not shown. The following errors are thrown in the javascript console:

Uncaught ReferenceError: OC is not defined
Uncaught ReferenceError: OCA is not defined
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
Uncaught TypeError: can't access property "FileInfo", OC.Files is undefined
Uncaught TypeError: can't access property "FileInfo", OC.Files is undefined
Uncaught TypeError: can't access property "Client", OC.Files is undefined
 TypeError: can't access property "prototype", OCA.Files.FileList is undefined
Uncaught TypeError: can't access property "prototype", OCA.Files.FileList is undefined
Uncaught TypeError: OCA.Files.Navigation is not a constructor
Uncaught (in promise) TypeError: can't access property "Client", OC.Files is undefined

These errors are partically repeating multiple times. Also the errors just appeared without changes of mine at the application, it’s configs or source code. The Nextcloud instance was installed using the Nextcloud Plesk addon.
Because I haven’t changed any relevant settings or modified the source code I cannot provide steps to reproduce the error.

Details

Nextcloud version 18.0.6:
Operating system and version Linux OS; Webserver using Plesk:
Apache or nginx version nginx newest version:
PHP version 7.4.7:

Nextcloud log
[files_antivirus] Fatal: OCA\Files_Antivirus\BackgroundJob\BackgroundScanner::run, exception: The antivirus executable could not be found at /usr/bin/clamscan
[mail] Warning: not enough messages to train a classifier

config.php
<?php
$CONFIG = array (
  'passwordsalt' => '####',
  'secret' => '####',
  'trusted_domains' => 
  array (
    0 => '####',
    1 => '####',
  ),
  'datadirectory' => '#####',
  'dbtype' => 'mysql',
  'version' => '18.0.6.0',
  'overwrite.cli.url' => '####',
  'dbname' => '####',
  'dbhost' => '####',
  'dbport' => '####',
  'dbtableprefix' => '####',
  'mysql.utf8mb4' => true,
  'dbuser' => '####',
  'dbpassword' => '####',
  'installed' => true,
  'instanceid' => 'oc9q5###wpf',
  'theme' => '',
  'loglevel' => 1,
  'maintenance' => false,
  'mail_from_address' => 'no-reply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '#######',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '######',
  'mail_smtpport' => '###',
  'htaccess.RewriteBase' => '/',
  'simpleSignUpLink.shown' => false,
  'updater.release.channel' => 'stable',
);

No errors in nginx logs.

Image of Nextcloud file tab

Can you test another browser and/or another pc without special cofiguration like adblocker, …? Also you can test it in a browser on a mobile device though another network (direct internet).

1 Like

I’ve tested the site without adblocker, on a different browser, on a different computer and on mobile and on different networks, but the error still appears. So there shouldn’t be a problem with the browser. All the browsers I used were on the newest version

Still not fixed

Please deactivate or delete the antivirus app.

I’ve deactivated it but the problem still occurs. Now I saw another error appearing (in the logs):

[PHP] Error: Trying to access array offset on value of type null at /.../cloud/3rdparty/leafo/scssphp/src/Compiler.php#5230
[fulltextsearch] Warning: Exception while cronIndex: OCA\FullTextSearch\Exceptions\PlatformNotSelectedException - Admin have not selected any IFullTextSearchPlatform
[PHP] Error: Trying to access array offset on value of type int at /.../cloud/lib/private/Files/Node/Node.php#327

I’ve deactivated the full text search app, which removed the last error. The first error message shows up about 100+ times on one page reload.

Search this way

SOLVED: Nextcloud Logs "Trying to access array offset on value of type null" Repeatedly

->

https://github.com/nextcloud/server/issues/18996

I’ve done further research on that topic but nothing suggested works. I really don’t want to edit the source files

Still no solution