Unable to create new users

Nextcloud version (eg, 20.0.5): 25.0.2.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.LTS
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0 (Ubuntu)
PHP version (eg, 7.4): PHP 8.1.2-1ubuntu2.9

The issue you are facing:

Unable to create new users

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

Steps to replicate it:

  1. Go into users module
  2. Click on “New user” button
  3. Enter user details and attempt to save

The output of your Nextcloud log in Admin > Logging:

{"reqId":"HvPDQTJEcx5UMufuYEGF","level":3,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardCreatedListener.php#53","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","exception":{"Exception":"Error","Message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardCreatedListener.php#53","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/maps/lib/Listener/CardCreatedListener.php","line":53,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Maps\\Listener\\CardCreatedListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php","line":673,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php","line":219,"function":"createCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/HookManager.php","line":114,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postCreateUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Server.php","line":583,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":476,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":413,"function":"createUserFromBackend","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":420,"function":"createUser","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"HvPDQTJEcx5UMufuYEGF","level":3,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"no app in context","method":"POST","url":"/ocs/v2.php/cloud/users","message":"This parser can only read from strings or streams.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","exception":{"Exception":"InvalidArgumentException","Message":"This parser can only read from strings or streams.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","line":83,"function":"setInput","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Reader.php","line":47,"function":"parse","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/var/www/nextcloud/apps/maps/lib/Service/AddressService.php","line":223,"function":"read","class":"Sabre\\VObject\\Reader","type":"::"},{"file":"/var/www/nextcloud/apps/maps/lib/Listener/CardCreatedListener.php","line":54,"function":"scheduleVCardForLookup","class":"OCA\\Maps\\Service\\AddressService","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Maps\\Listener\\CardCreatedListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php","line":673,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php","line":219,"function":"createCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/HookManager.php","line":114,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postCreateUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Server.php","line":583,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":476,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":413,"function":"createUserFromBackend","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":420,"function":"createUser","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","Line":135,"CustomMessage":"--"}}
{"reqId":"HvPDQTJEcx5UMufuYEGF","level":3,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardUpdatedListener.php#53","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","exception":{"Exception":"Error","Message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardUpdatedListener.php#53","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/maps/lib/Listener/CardUpdatedListener.php","line":53,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Maps\\Listener\\CardUpdatedListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php","line":732,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php","line":226,"function":"updateCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/AppInfo/Application.php","line":230,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":264,"function":"OCA\\DAV\\AppInfo\\{closure}","class":"OCA\\DAV\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":239,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php","line":122,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Accounts/AccountManager.php","line":307,"function":"dispatch","class":"OC\\EventDispatcher\\SymfonyAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/Accounts/AccountManager.php","line":835,"function":"updateUser","class":"OC\\Accounts\\AccountManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Accounts/Hooks.php","line":69,"function":"updateAccount","class":"OC\\Accounts\\AccountManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Accounts/Hooks.php","line":77,"function":"changeUserHook","class":"OC\\Accounts\\Hooks","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Accounts\\Hooks","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Server.php","line":658,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/User.php","line":584,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/User.php","line":170,"function":"triggerChange","class":"OC\\User\\User","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":851,"function":"setDisplayName","class":"OC\\User\\User","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":433,"function":"editUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"HvPDQTJEcx5UMufuYEGF","level":3,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardDeletedListener.php#53","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","exception":{"Exception":"Error","Message":"Attempt to read property \"uri\" on array at /var/www/nextcloud/apps/maps/lib/Listener/CardDeletedListener.php#53","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/maps/lib/Listener/CardDeletedListener.php","line":53,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Maps\\Listener\\CardDeletedListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php","line":763,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php","line":245,"function":"deleteCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/HookManager.php","line":134,"function":"deleteUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postDeleteUser","class":"OCA\\DAV\\HookManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Server.php","line":594,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/User.php","line":313,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":436,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"HvPDQTJEcx5UMufuYEGF","level":2,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"ocs_api","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Failed addUser attempt with ocs exception.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","exception":{"Exception":"OCP\\AppFramework\\OCS\\OCSException","Message":"This parser can only read from strings or streams.","Code":101,"Trace":[{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":433,"function":"editUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","Line":853,"message":"Failed addUser attempt with ocs exception.","exception":{},"CustomMessage":"Failed addUser attempt with ocs exception."}}
{"reqId":"HvPDQTJEcx5UMufuYEGF","level":3,"time":"2023-01-02T11:14:30+00:00","remoteAddr":"hidden_ip_address","user":"admin_user","app":"PHP","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Return type of OCA\\GeoBlocker\\Db\\RIRServiceDBEntity::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/geoblocker/lib/Db/RIRServiceDBEntity.php#15","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
[02-Jan-2023 11:15:07 UTC] PHP Deprecated:  Return type of OCA\GeoBlocker\Db\RIRServiceDBEntity::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/nextcloud/apps/geoblocker/lib/Db/RIRServiceDBEntity.php on line 15

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.0',
    1 => 'redacted.1',
  ),
  'allow_local_remote_servers' => true,
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'redacted',
  'overwritehost' => 'redacted',
  'overwriteprotocol' => 'https',
  'dbname' => 'redacted',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'default_language' => 'en',
  'session_lifetime' => 28800,
  'session_keepalive' => true,
  'remember_login_cookie_lifetime' => 28800,
  'logtimezone' => 'UTC',
  'default_phone_region' => 'redacted',
  'skeletondirectory' => '',
  'logo_url' => 'https://redacted',
  'defaultapp' => 'files,dashboard',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'activity_expire_days' => 14,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' => 
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'read_timeout' => 0.0,
    'user' => '',
    'password' => '',
    'dbindex' => 0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'mail_from_address' => 'notice',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'redacted',
  'mail_smtphost' => 'localhost',
  'logfile' => 'redacted',
  'trashbin_retention_obligation' => 'auto, 30',
  'maintenance' => false,
  'loglevel' => 2,
);

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

Nothing.

I think you hit this bug also when trying to add/invite a “guest” account to a share/directory.
You get a “this parser can only be read from strings or streams”.
The account is created nevertheless.
( NC 24.0.7, php 7.4.33)

Maybe you can change the code like in this issue.
I found also “CardCreatedListener.php#53” there.

Hmm. Yes, this is possible I guess. But it’s so strange that I haven’t seen this before on this instance. I can’t figure out why it started happening, and now it’s happening all the time.

In my case, even using occ doesn’t work fully. I get an error, the user is created, but not assigned to any of the group passed as a parameter.

Thanks for the suggestion!

If I can avoid it, I’d rather not “hotpatch” it until there’s an “official fix”. But I guess before an “official fix”, there needs to be an “official error” …