"Error while enabling app" on fresh install

Hi,

I installed Nextcloud a few days ago on my unraid server and am very happy with it. I have the linuxserver letsencrypt and duckdns dockers for ssl remote access.

Unfortunately, i am unable to install any nextcloud app.

My problem: When i click on “Enable” to enable an app (any app), i get within a fraction of a second the following message: " Error while enabling app".

When clicking “Disable” to disable an app, the button turns to “Disabling app…” but stays like this and nothing actually happens.

Log status: Nothing in the Nextcloud, or letsencrypt dockers. Nothing relevant in the web browser console (just a missing font not being downloaded).

What i have already tried: I have tried this guys solution : Error while enabling app

But it didn’t work for me (and yes i did restart the docker and even the whole server).
I have seen this and do not have this problem: https://github.com/linuxserver/docker-nextcloud/issues/22
I have searched limetech’s, nextcloud’s and owncloud’s forums for other possible solutions but didn’t find anything relevant or that helped with my problem.

I also accessed the web interface via the local IP (instead of the remote ), but the problem still persists.

I added some lines in config.php, hoping it would help, but it didn’t. Here is the version i tried (i erased the private stuff):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '',
    1 => '',
    2 => '',
  ),
  'trusted_proxies' =>
  array (
    0 => '',
  ),
  'overwritewebroot' => '/nextcloud',
  'overwrite.cli.url' => '/nextcloud',
  'dbtype' => 'mysql',
  'version' => '12.0.2.0',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_root',
  'dbpassword' => '',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => '',
  'mail_domain' => 'gmail.com',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'ssl',
  'mail_smtpport' => '465',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'has_internet_connection' => true,
  'appstoreenabled' => true,
  'apps_paths' => array(
        array(
                'path'=> '/config/www/nextcloud/apps',
                'url' => '/apps',
                'writable' => true,
        ),
),
  'appcodechecker' => false,
);

I would really appreciate any suggestions as to how i could download nextcloud apps.

A big thanks to all the nextclouds developers for developing such an amazing solution for giving the users control over their own data.

Regards,

PS: Full disclosure: I also posted this question on the unraid forums but i haven’t got a solution to my problem yet. I will report back here if i do (and vice versa).

Ok, so i wiped everything and reinstalled the nextcloud docker.

I can now install apps in the webui from the local IP, but not from mysubdomain.duckdns.org

I also have the following security warnings when accessing the ui from duckdns:

The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.
The "X-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.

I had managed to fix this warnings in my previous install by commenting some lines in a nextcloud config file. But i now wonder if this also has to do with my issue installing apps?

Does it have something to do with my whole letsencrypt / duckdns / nextcloud setup?

Any ideas suggestion?

Hi @Lynxphp,
I am having a similar issue. See VHost config on ispConfig and App-Activation
Mine seems to be related to the order of the directives inside the vhost-file.

What is the order of your file now?

Regards

Let me contribute my findings.

I also did a fresh install, with PHP v7.2.9 and Nginx v1.14. I remember installing Nextcloud a couple of weeks ago when I could easily enable those fancy apps, but for this couple of recent installation, I failed.

Then fiddling with the Nginx conf file for some time with worse consequences, I had to check the log file, and it told that there has been sth wrong with visiting lib/private/Log/File.php. I couldn’t believe that so I did a through check, and you know what I got?

All the files under the installation dir are owned by nobody, while when I set up Nginx and PHP, I gave a new user, www. That means, if I didn’t compile the two software with customized user name, Nextcloud would run OK.

I then chowned all the directories and files related and refresh my browser, and everything is now OK. Just enable whatever app you want, even the bundles.