Error while enabling app

Nextcloud version: 11.0.2

Operating system and version: CentOS 7

Nginx: 1.10.2

PHP version: 7.1.2 (php-fpm)

Is this the first time you’ve seen this error?: Yes but it is also first time I’ve seen Nextcloud :wink:

The issue you are facing:
I am unable to install any apps. When I go to apps, to any Not enabled app and click on ‘Enable’ I get message saying ‘Error while enabling app’ with no more information. There is nothing in Nextcloud log nor server log.

The output of your Nextcloud log in Admin > Logging:
Absolutely nothing. Well, there is 1 entry, but it is almost 2 hours old so it is unrelated (last time I tried enable app was few minutes ago):

Log

Error internet_connection_check GuzzleHttp\Exception\ServerException: Server error response [url] https://nextcloud.com/ [status code] 500 [reason phrase] Internal Server Error 2017-02-28T12:05:22+0100

The output of your config.php:

config.php <?php $CONFIG = array ( 'instanceid' => '__blanked__', 'passwordsalt' => '__blanked__', 'secret' => '__blanked__', 'trusted_domains' => array ( 0 => 'nextcloud.stibila.eu', ), 'datadirectory' => '/data/nextcloud/data', 'overwrite.cli.url' => __blanked__, 'dbtype' => 'mysql', 'version' => '11.0.2.7', 'dbname' => '__blanked__', 'dbhost' => '127.0.0.1', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '__blanked__', 'dbpassword' => '__blanked__', 'logtimezone' => 'UTC', 'installed' => true, );

The output of nginx log: error log contains absolutely nothing, access log usual stuff.

I am just trying Nextcloud to see, what it can do. Yesterday I installed it on virtual server, connected to the internet, but behind NAT and face this issue. Today I tried another server, with dedicated IP, reachable from the internet, with proper DNS entry, but have same issue.

Did you check permissions? You http user needs to be able to write to apps folder. There is a script in admin manual to set permissions as strict as possible for nc to work.

Yes. All files are owned by nginx:nginx, webserver is running under nginx user, php-fpm is running under nginx user. apps directory has chmod set to 755. Permissions are OK.
Nextcloud can write to config.php or to data directory with no problem. And those have same permissions as apps directory.

I have had the same issue yesterday. I reckon it was due to the server outage at Amazon on which many apps are hosted. Try again today, servers are up again and running.

Tried, still doesn’t work.

Does it only occur for apps that need to be downloaded (are not part of nextcloud core installation) or also for the ones already in apps folder by default?

In case you could try to download the apps manually from github to your apps directory and enable them.

Since nextcloud so far works (creating/uploading files, saving admin settings etc.?) databases access will not be the problem…

€: Ah and did you check if browser console shows some error?

I don’t know which ones are part of core installation, so I tried few:

  • Auditing / Logging
  • Default encryption module
  • External sites
  • External storage support
  • External user support

all without success. Downloading and unpacking app into apps directory had same result.
Also when I try to disable some already enabled app, for example Activity, it shows “Enabling app …” and do nothing.
Browser console revealed nothing of interest.

Oh my god. I suspected some kind of misconfiguration and sure it was.
In nginx config I replaced:
location ~ "^(.+\.php)($|/.*)" { fastcgi_split_path_info ^(.+\.php)(.*)$;
with
location ~ "^(.+\.php)($|/.*)" { fastcgi_split_path_info ^(.+\.php)(/.*)$;
and it works now. this slash after index.php was a problem. Weird that it didn’t break whole NC, just apps enabling/disabling.

Hi i am facing similar issue but i cannot find nginx, where can i find this file? i dont’ see a "etc " folder in my folder.

Nginx is webserver application, it’s alternative to Apache2. /etc is folder containing all system and apps configurations in Unix/Linux systems. This thread is relevant top your problem only if you manage your own web server and you are using Nginx, not Apache.

Also hint: never ever copy & paste any solution you find on internet. Always try to understand how this solution works and only then it apply, with appropriate changes for your environment.