Error "Request failed with status code 412" when creating new account

Nextcloud version (eg, 12.0.2): Nextcloud version: 17.0.1 -
Operating system and version (eg, Ubuntu 17.04): Operating system: Linux 4.4.59+ #24922 SMP PREEMPT Mon Aug 19 12:13:37 CST 2019 x86_64
Apache or nginx version (eg, Apache 2.4.25): Webserver: Apache/2.4.39 (Unix) (fpm-fcgi)
PHP version (eg, 7.1): PHP version: 7.3.7

The issue you are facing:
Error “Request failed with status code 412” when creating new account

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

Steps to replicate it:

  1. Creat a user
  2. Then the user set the passeword
  3. Then the user facing the error “Request failed with status code 412” when initializing passeword

The output of your Nextcloud log in Admin > Logging:
There is no error on the log

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

$CONFIG = array (
  'instanceid' => 'ocz6hhtw8n41',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => '<hostname>',
  'datadirectory' => '/volume1/NextCloud',
  'dbtype' => 'pgsql',
  'version' => '',
  'overwrite.cli.url' => 'https://<hostname>/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'app_install_overwrite' => 
  array (
    0 => 'ojsxc',
    'onlyoffice' => 
    array (
      'verify_peer_off' => true,
  'filelocking.enabled' => false,

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

Hi! Did you managed to resolve this?

I have the same error when resetting password.

Although in my situation after updating Nextcloud to 18 beta version and then trying to run it on php 7.4 I fail to login, it either tells me that username or password is wrong or simply blacklists my ip.
Only the session where I was logged in worked for few minutes and in logs i saw error - login failed.
No other errors in logs so far (nextcloud.log, server log, php-fpm log)… Checked nginx config file, changed a little bit, but still not working after reload. PC and phone clients can’t login too.


Password reset through command line helped.

It has been a while that I didn’t have this error.
The last things I did was upgrading from nc16 to nc17 and putting the instance in a container, but I don’t know if it’s related?!

Good luck.