Hi all!
after upgrading to NC21 device login and registration is not possible any more. My Yubikeys are fine on tests with Webauthn.io.
Nextcloud version (eg, 20.0.5): 21.0.2 RC1 - 21.0.2.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04, Linux 5.4.0-73-generic
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu) (fpm-fcgi)
PHP version (eg, 7.4): r7.4.3
Database: mysql 10.3.29 (mariadb)
after upgrading to NC21 nothing happens on tapping the Yubikey button. I realized some databases errors.
Is this the first time you’ve seen this error? (Y/N): yes, on NC21, worked on NC20
Steps to replicate it (sorry for mistakes, its manually translated from german UI):
- Peronal > Security > Passwordless authentication: delete all devices
- Add webAuthn device
- launch a different browser, e.g. chrome (error seen on FF&Chrome)
- click on Log in with a divice
- enter username
- click on log in
- insert the yubikey
- tap the key button on the yubikey
- every time a tap on the button the same error occoures in the log.
- if i add another key or delete all keys again the number for dublicte entry whill be increased by one number
The output of your Nextcloud log in Admin > Logging (hopy you are fine with that; if someone like it, I’ll copy and paste the other formats):
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1728:
Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1667:
Doctrine\DBAL\Connection->handleDriverException()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1146:
Doctrine\DBAL\Connection->convertExceptionDuringQuery()
/var/www/nextcloud/lib/private/DB/Connection.php - line 257:
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 213:
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 287:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 135:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 159:
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 89:
OCP\AppFramework\Db\QBMapper->insertOrUpdate()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 93:
OC\Authentication\WebAuthn\CredentialRepository->saveAndReturnCredentialSource()
/var/www/nextcloud/3rdparty/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php - line 206:
OC\Authentication\WebAuthn\CredentialRepository->saveCredentialSource()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/Manager.php - line 235:
Webauthn\AuthenticatorAssertionResponseValidator->check()
/var/www/nextcloud/core/Controller/WebAuthnController.php - line 107:
OC\Authentication\WebAuthn\Manager->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 218:
OC\Core\Controller\WebAuthnController->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 127:
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 993:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 37:
OC::handleRequest()
Verursacht durchDoctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 84:
Doctrine\DBAL\Driver\PDO\Exception::new()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1136:
Doctrine\DBAL\Driver\PDO\Statement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php - line 257:
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 213:
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 287:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 135:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 159:
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 89:
OCP\AppFramework\Db\QBMapper->insertOrUpdate()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 93:
OC\Authentication\WebAuthn\CredentialRepository->saveAndReturnCredentialSource()
/var/www/nextcloud/3rdparty/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php - line 206:
OC\Authentication\WebAuthn\CredentialRepository->saveCredentialSource()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/Manager.php - line 235:
Webauthn\AuthenticatorAssertionResponseValidator->check()
/var/www/nextcloud/core/Controller/WebAuthnController.php - line 107:
OC\Authentication\WebAuthn\Manager->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 218:
OC\Core\Controller\WebAuthnController->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 127:
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 993:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 37:
OC::handleRequest()
Verursacht durchPDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 82:
PDOStatement->execute()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1136:
Doctrine\DBAL\Driver\PDO\Statement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php - line 257:
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 213:
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 287:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 135:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 159:
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 89:
OCP\AppFramework\Db\QBMapper->insertOrUpdate()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/CredentialRepository.php - line 93:
OC\Authentication\WebAuthn\CredentialRepository->saveAndReturnCredentialSource()
/var/www/nextcloud/3rdparty/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php - line 206:
OC\Authentication\WebAuthn\CredentialRepository->saveCredentialSource()
/var/www/nextcloud/lib/private/Authentication/WebAuthn/Manager.php - line 235:
Webauthn\AuthenticatorAssertionResponseValidator->check()
/var/www/nextcloud/core/Controller/WebAuthnController.php - line 107:
OC\Authentication\WebAuthn\Manager->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 218:
OC\Core\Controller\WebAuthnController->finishAuthentication()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 127:
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 993:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 37:
OC::handleRequest()
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'xx',
'passwordsalt' => 'xx',
'secret' => 'xx,
'trusted_domains' =>
array (
0 => 'cloud.xx.de',
),
'datadirectory' => '/var/oc-data',
'dbtype' => 'mysql',
'version' => '21.0.2.0',
'overwrite.cli.url' => 'https://cloud.xx.de',
'htaccess.RewriteBase' => '/',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'owncloud',
'dbpassword' => 'xx',
'installed' => true,
'maintenance' => false,
'filelocking.enabled' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'mail_from_address' => 'bb',
'mail_domain' => 'xx.de',
'mail_smtpauth' => 1,
'mail_smtphost' => 'xxx.xxx.net',
'mail_smtpname' => 'xx.de',
'mail_smtppassword' => 'xx',
'mail_smtpsecure' => 'tls',
'mail_smtpport' => '25',
'theme' => '',
'loglevel' => 1,
'updater.release.channel' => 'beta',
'updater.secret' => 'xxx',
'versions_retention_obligation' => 'auto, 14',
'encryption.legacy_format_support' => false,
'encryption.key_storage_migrated' => false,
'default_phone_region' => 'DE',
'force_locale' => 'de_DE',
);
The output of your Apache/nginx/system log in /var/log/____
:
Nothing interesting here
Regards, Benjamin