Apps fail to update - "An error occured during the request. Unable to proceed. Couldn't update app."

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.10
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:
Security warning:
Your data directory and files are probably accessible from the internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Navigate to administration page in settings

The output of your Nextcloud log in Admin > Logging:

I have a ludicrous amount of log entries here. I need to know which items are useful for this problem.

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

<?php
$CONFIG = array (
  'instanceid' => '<redacted>',
  'passwordsalt' => '<redacted>',
  'secret' => '<redacted>',
  'trusted_domains' => 
  array (
    0 => '<redacted>',
    1 => '<redacted>',
    2 => '<redacted>',
    3 => '<redacted>',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.10.1',
  'overwrite.cli.url' => '<redacted>',
  'dbname' => '<redacted>',
  'dbhost' => '<redacted>',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '<redacted>',
  'dbpassword' => '<redacted>',
  'installed' => true,
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => false,
  'has_rebuilt_cache' => true,
  'app_install_overwrite' => 
  array (
    0 => 'spreed',
    1 => 'workflow_pdf_converter',
    2 => 'impersonate',
    3 => 'files_accesscontrol',
    4 => 'deck',
    5 => 'external',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

[Fri Oct 14 00:00:06.673938 2022] [ssl:warn] [pid 48395] AH01906: 127.0.1.1:444:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Oct 14 00:00:06.673974 2022] [ssl:warn] [pid 48395] AH01909: 127.0.1.1:444:0 server certificate does NOT include an ID which matches the server name
[Fri Oct 14 00:00:06.674043 2022] [ssl:error] [pid 48395] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=<redacted>,O=<redacted>,ST=<redacted>,C=<redacted> / issuer: CN=<redacted>,O=<redacted>,ST=<redacted>,C=<redacted> / serial: <redacted> / notbefore: Jun  7 03:59:02 2021 GMT / notafter: Jun  5 03:59:02 2031 GMT]
[Fri Oct 14 00:00:06.674047 2022] [ssl:error] [pid 48395] AH02604: Unable to configure certificate 127.0.1.1:444:0 for stapling
[Fri Oct 14 00:00:06.674123 2022] [mpm_prefork:notice] [pid 48395] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Fri Oct 14 00:00:06.674176 2022] [core:notice] [pid 48395] AH00094: Command line: '/usr/sbin/apache2'

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
CP\Http\Client\LocalServerException: Host violates local access rules
/var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php - line 136:
OC\Http\Client\LocalAddressChecker->ThrowIfLocalIp()
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php - line 35:
OC\Http\Client\DnsPinMiddleware->OC\Http\Client{closure}(“*** sensiti … “)
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 31:
GuzzleHttp\PrepareBodyMiddleware->__invoke()
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 71:
GuzzleHttp\Middleware::GuzzleHttp{closure}(”
** sensiti … “)
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 63:
GuzzleHttp\RedirectMiddleware->__invoke()
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php - line 75:
GuzzleHttp\Middleware::GuzzleHttp{closure}(”
** sensiti … “)
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 331:
GuzzleHttp\HandlerStack->__invoke()
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 168:
GuzzleHttp\Client->transfer()
/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 187:
GuzzleHttp\Client->requestAsync()
/var/www/nextcloud/lib/private/Http/Client/Client.php - line 223:
GuzzleHttp\Client->request()
/var/www/nextcloud/lib/private/Installer.php - line 296:
OC\Http\Client\Client->get()
/var/www/nextcloud/lib/private/Installer.php - line 194:
OC\Installer->downloadApp()
/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php - line 536:
OC\Installer->updateAppstoreApp(”
** sensiti … “)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:
OCA\Settings\Controller\AppSettingsController->updateApp(”
** sensiti … *”)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 157:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 302:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1015:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()


I get the following error when attempting to update any app: "An error occured during the request. Unable to proceed. Couldn't update app."