Sharing UI not visible at all / JS error on Nextcloud 15

Nextcloud version: 15.0.14
Operating system and version: Ubuntu 16.04.2 LTS
Apache or nginx version: Apache2
PHP version: 7.0

The issue you are facing:
I upgraded from Nextcloud 12 -> 13 -> 14 -> 15 and a week later I noticed that I’m not able to share folders/files anymore. The share options are simply not visible (not in the right-click context menu, nor the details pane of a folder).

A JavaScript error hints that something with the file_sharing JS is broken.

Also, old shared folders have the “normal” folder icon instead of the shared-folder icon (the sharing itself is still working).

Things I tried:

  • Disable theme
  • Disable/enable file sharing app
  • Delete data/appdata_*/[js,css], occ files:scan-app-data, occ maintenance:repair
  • occ maintenance:mimetype:update-js (this raises permission errors in the nextcloud log, but I recursively set 777 permissions for debugging purposes, so not sure whether this is related at all)

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

Steps to replicate it:
Not so sure about it, but I upgraded NC 12 -> … -> 15 and noticed the issue a week later.

  1. Go to files
  2. Click details
  3. Expect to see the sharing tab. No sharing tab shown at all.

The output of your Nextcloud log in Admin > Logging:

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

$CONFIG = array (
  'instanceid' => 'oc9z4gccp8e4',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
    1 => 'yyy',
  'datadirectory' => '/var/www/xxx/web/data',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'logfile' => '/var/www/xxx/web/data/nextcloud.log',
  'log_rotation_size' => '10000000',
  'loglevel' => 1,
  'maintenance' => false,
  '' => 'stable',
  '' => false,
  'allow_user_to_change_display_name' => false,
  'overwrite.cli.url' => 'https://xxx',
  'lost_password_link' => 'disabled',
  'theme' => 'muth-immobilien',

The output of your Apache/nginx/system log in /var/log/____:
Nothing related in the apache2 error log.

Some Screenshots:
Chrome JavaScript error message:

File content of merged-share-backend.js:

Details pane:

Sharing settings:

I’d be glad to get some hints about possible causes or related issues from our Nextcloud experts here :blush: