'An error occured during the request. Unable to proceed. Bad request' while creating a new user

Nextcloud version (eg, 12.0.2): 14.0.3
Operating system and version (eg, Ubuntu 17.04): Ubuntu Server 18.04.1
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2

The issue you are facing: A message: ‘An error occured during the request. Unable to proceed. Bad request’ while creating a new user appears each time I am doing this. However user is creating successfully.

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

Steps to replicate it:

  1. Log in as admin.
  2. Go to ‘Users’ submenu.
  3. Push the ‘+ new user’ button, create any user (in my case on no any group)

The output of your Nextcloud log in Admin > Logging:

https://pastebin.ubuntu.com/p/5Nx2fdYVcy/

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

<?php
$CONFIG = array (
  'instanceid' => SAMPINHERE',
  'passwordsalt' => 'SAMPINHERE',
  'secret' => 'SAMPINHERE',
  'trusted_domains' => 
  array (
    0 => 'domain.domain',
  ),
  'datadirectory' => '/srv/data',
  'overwrite.cli.url' => 'https://domain.domain',
  'dbtype' => 'pgsql',
  'version' => '14.0.3.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'SAMPINHERE',
  'dbpassword' => 'SAMPINHERE',
  'installed' => true,
  'maintenance' => false,
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'updater.secret' => 'SAMPINHERE',
);

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

https://pastebin.ubuntu.com/p/dZmvCz7G64/

Update. Seems, that was because SMTP has not been configured. But any suggestions regarding errors and warnings in my logs would be very appreciated.

I have the same issue, need it resolved. I have no idea why.
I and running
Ubuntu 18.04 LTS bionic, Apache/2.4.99 Nextcloud 19.01, PHP 7.4.9

[SOLVED WITH]
logged in to mysql
use nextcloud;
set global innodb_large_prefix=on;

had the same issue, for me the fix was that the data/username folder already existed, if I removed the folder and tried again it worked.