File Sharing is not possible on installation with docker

I have setup and installed Nextcloud on Ubuntu 20.04 via docker following this tutorial.

I finished the nextcloud installation and created some users and groups. After that I logged in as one of this users to the nextcloud and tried to share one of the default files that comes with the installation.

This is my docker-compose.yml

version: '2'


    image: mariadb:10.5
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      - ${NEXTCLOUD_ROOT}/mariadb:/var/lib/mysql
      - MYSQL_ROOT_PASSWORD=xxxxxxxxx
      - MYSQL_PASSWORD=xxxxxxxxx
      - MYSQL_DATABASE=xxxxxxxxx
      - MYSQL_USER=xxxxxxxxx

    image: nextcloud
    restart: always
      - 8080:80
      - db
      - ${NEXTCLOUD_ROOT}/html:/var/www/html
      - ${NEXTCLOUD_ROOT}/data:/srv/nextcloud/data
      - MYSQL_PASSWORD=xxxxxxxxx
      - MYSQL_DATABASE=xxxxxxxxx
      - MYSQL_USER=xxxxxxxxx
      - MYSQL_HOST=xxxxxxxxx

My problem is, that there is no sharing button visible in the file action menu. When I open details of the file and click on the sharing tab, the loading spinner keeps loading and I have no possibility to choose my sharing destination.

This is what I found in the Chrome debugger console logs:

vue.runtime.esm.js:1897 TypeError: Cannot read properties of undefined (reading 'SHARE_TYPE_USER')
    at (ShareTypes.js:28:31)
    at o.<anonymous> (vue.runtime.esm.js:1220:53)
    at o.<anonymous> (vue.runtime.esm.js:1230:21)
    at vue.runtime.esm.js:4761:17
    at vue.runtime.esm.js:4718:7
    at mn (vue.runtime.esm.js:4655:5)
    at o.t._init (vue.runtime.esm.js:5020:5)
    at new o (vue.runtime.esm.js:5168:12)
    at files_sharing_tab.js:62:19
    at c (runtime.js:63:40)



Nextcloud version : 23.0.2
Operating system and version: Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing:

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

Steps to replicate it:

  1. Login to nextcloud
  2. select a file, click on actions
  3. verify share icon is not visible

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

$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,
  'instanceid' => 'xxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxx',
  'secret' => 'xxxxxxxxx',
  'overwriteprotocol' => 'https',
  'trusted_domains' =>
  array (
    0 => '',
  'trusted_proxies' =>
  array (
    0 => '',
  'forwarded_for_headers' =>
  array (
    1 => 'HTTP_X_FORWARDED',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'xxxxxxxxx',
  'dbhost' => 'xxxxxxxxx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxxxx',
  'dbpassword' => 'xxxxxxxxx',
  'installed' => true,
  'updater.secret' => 'xxxxxxxxx,

Could you show a screenshot of the menu?

Hey KarlF12,
I added two screenshots of the view to my post.

Strange. I’ve done several installations like this with docker-compose and never had this issue.

You don’t have sharing disabled in the admin options or anything like that?

Yea, I find this behaviour also very strange. My nextcloud instance is running behind a apache2 proxy. Can this cause some issues? I’ve double checked the share configuration and the sharing aplication is also enabled. If it helps, I can share my apache2 proxy config. Can you maybe share your docker-compose and proxy configuration with me?

This is how my share settings looks like:

Screenshot 2022-03-23 at 20.55.41

Screenshot 2022-03-23 at 20.56.12

Check nextcloud.log for errors in /var/www or as admin user in top right menu.

I wouldn’t think an error in the Docker or Apache config would make a specific menu item disappear like that. Seems like it would have to be something specific to Nextcloud.

I found some logs that could be related to my issue:

[no app in context] Debug: Failed to get icon file /var/www/html/settings/img/share.svg

GET /settings/user
from by admin at 2022-03-26T01:34:10+00:00

[no app in context] Debug: Failed to get icon file 

GET /settings/user
from by admin at 2022-03-26T01:34:10+00:00

I 've checked my container and there is no settings folder. Either in /themes/example/core/img is sharing icon missing.

Do you need more logs, or do you have any idea what can be the issue here?

Has anybody the same problem or can somebody help me with the issue?

Just a wild guess: is the files_sharing app present and enabled?

Yes, like I described in my previous posts, the app is present and enabled.