Failing to delete a user : An error occured during the request. Unable to proceed

Nextcloud version (eg, 20.0.5): 22.2.0
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): PHP 7.4.3

The issue you are facing:

Failing to delete a user.

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

Steps to replicate it:

  1. Created a user to safely evaluate a external product using Webdav.
  2. Used it for 10 minutes.
  3. Decided to delete the user, by selecting “Delete user” in the User section
  4. Could not proceed. Received notification: “An error occured during the request. Unable to proceed.”

Also tried to disable user before deleting, also making sure user was not logged in from anywhere.
Still failing.

Side note about “An error occured during the request. Unable to proceed.”
The correct spelling in English is “occurred”, not “occured”. :wink:

The output of your Nextcloud log in Admin > Logging:

Formatted:
[no app in context] Error: Class 'andreskrey\Readability\Configuration' not found

Raw:
{"reqId":"5YjQZUY1xY74U3XOV7CF","level":3,"time":"2021-11-06T11:43:47+00:00","remoteAddr":"xxx","user":"xxx","app":"no app in context","method":"GET","url":"/ocs/v2.php/search/providers?from=%2Fsettings%2Fadmin%2Flogging","message":"Class 'andreskrey\\Readability\\Configuration' not found","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15","version":"22.2.0.2","exception":{"Exception":"Exception","Message":"Class 'andreskrey\\Readability\\Configuration' not found","Code":0,"Trace":[{"file":"/var/www/xxx/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/xxx/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/xxx/ocs/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/xxx/ocs/v2.php","line":23,"args":["/var/www/xxx/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/xxx/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"Error","Message":"Class 'andreskrey\\Readability\\Configuration' not found","Code":0,"Trace":[{"function":"__construct","class":"OCA\\News\\Scraper\\Scraper","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"array_map"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"array_map"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"array_map"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":87,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"array_map"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/xxx/lib/private/ServerContainer.php","line":145,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/xxx/lib/private/Search/SearchComposer.php","line":98,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/xxx/lib/private/Search/SearchComposer.php","line":121,"function":"loadLazyProviders","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"/var/www/xxx/core/Controller/UnifiedSearchController.php","line":80,"function":"getProviders","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"getProviders","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/xxx/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/xxx/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/xxx/ocs/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/xxx/ocs/v2.php","line":23,"args":["/var/www/xxx/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/xxx/apps/news/lib/Scraper/Scraper.php","Line":29},"CustomMessage":"--"},"id":"61866a73d2a56"}

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
  ),
  'datadirectory' => '/mnt/xxx',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'https://xxx',
  'overwriteprotocol' => 'https',
  'dbname' => 'xxx',
  'dbhost' => 'xxx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'log_type' => 'file',
  'logfile' => 'xxx',
  'loglevel' => 2,
  'log_rotate_size' => 104857600,
  'trashbin_retention_obligation' => 'auto, 7',
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'xxx',
    'port' => xxx,
    'timeout' => xxx,
    'password' => 'xxx',
  ),
  'allow_local_remote_servers' => true,
  'onlyoffice' =>
  array (
    'verify_peer_off' => xxx,
    'jwt_header' => 'xxx',
  ),
  'maintenance' => false,
  'force_language' => 'en',
  'lost_password_link' => 'disabled',
  'auth.webauthn.enabled' => false,
  'theme' => '',
  'simpleSignUpLink.shown' => false,
  'updater.release.channel' => 'stable',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\Movie',
    4 => 'OC\\Preview\\TIFF',
  ),
  'preview_max_x' => 1920,
  'preview_max_y' => 1080,
  'preview_max_scale_factor' => 1,
  'mail_smtpmode' => 'xxx',
  'mail_sendmailmode' => 'xxx',
  'mail_smtpsecure' => 'ssl',
  'default_phone_region' => 'XX',
  ),
);

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

no errors

What version of database are you using… and what method of communicating does it use UNIX sockets or TCP ?

Hi,
Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1-log Ubuntu 20.04

As for the method, I must admit a doubt. Database is on localhost only, I would say probably unix socket @localhost.

Thanks !

Hi, What were you thinking about ? :slight_smile:

Any ideas, suggestions, insights, hopes !? :slight_smile:

Hi, I’m still unable to delete a user. Any insights ?
Is this going to have to go through editing the Database directly ?

Have you restarted (or stop/start) apache??

I know that my answer could sound weird, but I had some issues in the past with something similar to this :sweat_smile:

1 Like

Hi and thanks for your help.
I am completely confused as to how or why but after running systemctl stop apache2 and systemctl start apache2, I was then able to delete the user.
Mystery !
:+1:

It’s a “common known issue” of php.
Restarting apache also restart php (that’s the reason that it worked).

Glad to see that it helps :slight_smile:

Good afternoon! Same problem.
I’m trying to delete a user via OCC:

ncadmin@sava:~$ sudo -u www-data php /var/www/nextcloud/occ user:delete herr
An unhandled exception has been thrown:
TypeError: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(): Argument #1 ($node) must be of type OCA\Files_Reader\Node, OC\Files\Node\File given in /var/www/nextcloud/apps/files_reader/lib/Hooks.php:18
Stack trace:
#0 [internal function]: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}()
#1 /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php(106): call_user_func_array()
#2 /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php(40): OC\Hooks\BasicEmitter->emit()
#3 /var/www/nextcloud/lib/private/Files/Node/Root.php(143): OC\Hooks\PublicEmitter->emit()
#4 /var/www/nextcloud/lib/private/Files/Node/Node.php(117): OC\Files\Node\Root->emit()
#5 /var/www/nextcloud/lib/private/Files/Node/File.php(129): OC\Files\Node\Node->sendHooks()
#6 /var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php(149): OC\Files\Node\File->delete()
#7 /var/www/nextcloud/lib/private/Avatar/UserAvatar.php(212): OC\Files\SimpleFS\SimpleFile->delete()
#8 /var/www/nextcloud/lib/private/Server.php(1485): OC\Avatar\UserAvatar->remove()
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(264): OC\Server->OC\{closure}()
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
#11 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#12 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(122): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#13 /var/www/nextcloud/lib/private/User/User.php(256): OC\EventDispatcher\SymfonyAdapter->dispatch()
#14 /var/www/nextcloud/core/Command/User/Delete.php(65): OC\User\User->delete()
#15 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\User\Delete->execute()
#16 /var/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run()
#17 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#18 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#19 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#20 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#21 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#22 /var/www/nextcloud/occ(11): require_once('...')

Restarting the apache service does nothing (((