Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix' #42625

Closed
4 of 8 tasks
ChristophWurst opened this issue Jan 8, 2024 · 12 comments · Fixed by #42805 or #45055

Comments

@ChristophWurst
Copy link
Member

⚠️ This issue respects the following points: ⚠️

Bug description

I don't know (yet).

Log (sentry) says

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix'
#20 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): PDOStatement::execute
#19 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): Doctrine\DBAL\Driver\PDO\Statement::execute
#18 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1202): Doctrine\DBAL\Connection::executeStatement
#17 /var/www/nextcloud/lib/private/DB/Connection.php(294): OC\DB\Connection::executeStatement
#16 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(386): Doctrine\DBAL\Query\QueryBuilder::execute
#15 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): OC\DB\QueryBuilder\QueryBuilder::execute
#14 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(326): OC\DB\QueryBuilder\QueryBuilder::executeStatement
#13 /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php(137): OCP\AppFramework\Db\QBMapper::insert
#12 /user_status/lib/Listener/UserLiveStatusListener.php(113): OCA\UserStatus\Listener\UserLiveStatusListener::handle
#11 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(86): OC\EventDispatcher\ServiceEventListener::__invoke
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::callListeners
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher::dispatch
#8 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(94): OC\EventDispatcher\EventDispatcher::dispatch
#7 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher::dispatchTyped
#6 /user_status/lib/Controller/HeartbeatController.php(100): OCA\UserStatus\Controller\HeartbeatController::heartbeat
#5 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\App::main
#2 /var/www/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/nextcloud/ocs/v1.php(65): require_once
#0 /var/www/nextcloud/ocs/v2.php(23): null

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix'
#20 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php(28): Doctrine\DBAL\Driver\PDO\Exception::new
#19 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(132): Doctrine\DBAL\Driver\PDO\Statement::execute
#18 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1202): Doctrine\DBAL\Connection::executeStatement
#17 /var/www/nextcloud/lib/private/DB/Connection.php(294): OC\DB\Connection::executeStatement
#16 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(386): Doctrine\DBAL\Query\QueryBuilder::execute
#15 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): OC\DB\QueryBuilder\QueryBuilder::execute
#14 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(326): OC\DB\QueryBuilder\QueryBuilder::executeStatement
#13 /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php(137): OCP\AppFramework\Db\QBMapper::insert
#12 /user_status/lib/Listener/UserLiveStatusListener.php(113): OCA\UserStatus\Listener\UserLiveStatusListener::handle
#11 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(86): OC\EventDispatcher\ServiceEventListener::__invoke
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::callListeners
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher::dispatch
#8 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(94): OC\EventDispatcher\EventDispatcher::dispatch
#7 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher::dispatchTyped
#6 /user_status/lib/Controller/HeartbeatController.php(100): OCA\UserStatus\Controller\HeartbeatController::heartbeat
#5 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\App::main
#2 /var/www/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/nextcloud/ocs/v1.php(65): require_once
#0 /var/www/nextcloud/ocs/v2.php(23): null

Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix'
#21 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php(62): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter::convert
#20 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1938): Doctrine\DBAL\Connection::handleDriverException
#19 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1880): Doctrine\DBAL\Connection::convertExceptionDuringQuery
#18 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1208): Doctrine\DBAL\Connection::executeStatement
#17 /var/www/nextcloud/lib/private/DB/Connection.php(294): OC\DB\Connection::executeStatement
#16 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(386): Doctrine\DBAL\Query\QueryBuilder::execute
#15 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): OC\DB\QueryBuilder\QueryBuilder::execute
#14 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(326): OC\DB\QueryBuilder\QueryBuilder::executeStatement
#13 /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php(137): OCP\AppFramework\Db\QBMapper::insert
#12 /user_status/lib/Listener/UserLiveStatusListener.php(113): OCA\UserStatus\Listener\UserLiveStatusListener::handle
#11 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(86): OC\EventDispatcher\ServiceEventListener::__invoke
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::callListeners
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher::dispatch
#8 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(94): OC\EventDispatcher\EventDispatcher::dispatch
#7 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher::dispatchTyped
#6 /user_status/lib/Controller/HeartbeatController.php(100): OCA\UserStatus\Controller\HeartbeatController::heartbeat
#5 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\App::main
#2 /var/www/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/nextcloud/ocs/v1.php(65): require_once
#0 /var/www/nextcloud/ocs/v2.php(23): null

OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix'
#15 /var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php(71): OC\DB\Exceptions\DbalException::wrap
#14 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(328): OC\DB\QueryBuilder\QueryBuilder::executeStatement
#13 /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php(137): OCP\AppFramework\Db\QBMapper::insert
#12 /user_status/lib/Listener/UserLiveStatusListener.php(113): OCA\UserStatus\Listener\UserLiveStatusListener::handle
#11 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(86): OC\EventDispatcher\ServiceEventListener::__invoke
#10 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::callListeners
#9 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher::dispatch
#8 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(94): OC\EventDispatcher\EventDispatcher::dispatch
#7 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(106): OC\EventDispatcher\EventDispatcher::dispatchTyped
#6 /user_status/lib/Controller/HeartbeatController.php(100): OCA\UserStatus\Controller\HeartbeatController::heartbeat
#5 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\App::main
#2 /var/www/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/nextcloud/ocs/v1.php(65): require_once
#0 /var/www/nextcloud/ocs/v2.php(23): null

Steps to reproduce

  1. ???

Expected behavior

No error

Installation method

None

Nextcloud Server version

28

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

More error details in https://nextcloud-gmbh.sentry.io/issues/4628540536

@Rade0nFighter
Copy link

Also experiencing this - happy to share logs if needed.

Nextcloud server 27.1.4

@pilipovicn
Copy link

pilipovicn commented Jan 10, 2024

Also experiencing this, slightly different error in log.

DbalException An exception occurred while executing a query: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "user_status_uid_ix" DETAIL: Key (user_id)=(pilipovicn) already exists.

It seems to me that this starts appearing during events scheduled in the calendar (even though log says 'No app in context'). My status changes to "In a meeting" and I notice a couple of these errors appear. It seems it's got to do something with updating user status in DB? Some kind of conflicting status?

Other than the errors, seemingly no functionality is affected. Nextcloud 28.0.1.

@mobilevil
Copy link

I saw it in the log, too. It happened only once, though,

Steps to reproduce
It seems a user who rarely uses the server logged in

Expected behavior
No error

Installation method
Community Manual installation with Archive

Nextcloud Server version
27.1.5

Operating system
Ubuntu 22.04.3 LTS

PHP engine version
8.1.2

Web server
Apache 2.4.52-1ubuntu4.7

Database engine version
mariadb-server-10.6

Is this bug present after an update or on a fresh install?
not sure

Are you using the Nextcloud Server Encryption module?
Encryption is Disabled

What user-backends are you using?
Default user-backend (database)

Configuration report
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"my domain name"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "27.1.5.1",
"overwrite.cli.url": "https://my domain name",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"enable_previews": false,
"installed": true,
"default_phone_region": "ca",
"memcache.local": "\OC\Memcache\APCu",
"filelocking.enabled": true,
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0
},
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"maintenance": false,
"theme": "",
"loglevel": 2,
"filesystem_check_changes": "1"
}
}

List of activated Apps
Enabled:

activity: 2.19.0
circles: 27.0.1
cloud_federation_api: 1.10.0
comments: 1.17.0
contactsinteraction: 1.8.0
dashboard: 7.7.0
dav: 1.27.0
federatedfilesharing: 1.17.0
federation: 1.17.0
files: 1.22.0
files_reminders: 1.0.0
files_rightclick: 1.6.0
files_sharing: 1.19.0
files_trashbin: 1.17.0
files_versions: 1.20.0
firstrunwizard: 2.16.0
groupfolders: 15.3.2
logreader: 2.12.0
lookup_server_connector: 1.15.0
nextcloud_announcements: 1.16.0
notifications: 2.15.0
oauth2: 1.15.1
password_policy: 1.17.0
photos: 2.3.0
privacy: 1.11.0
provisioning_api: 1.17.0
recommendations: 1.6.0
related_resources: 1.2.0
serverinfo: 1.17.0
settings: 1.9.0
sharebymail: 1.17.0
support: 1.10.0
survey_client: 1.15.0
suspicious_login: 5.0.0
systemtags: 1.17.0
text: 3.8.0
theming: 2.2.0
twofactor_backupcodes: 1.16.0
updatenotification: 1.17.0
user_status: 1.7.0
viewer: 2.1.0
weather_status: 1.7.0
workflowengine: 2.9.0
Disabled:
admin_audit: 1.17.0
bruteforcesettings: 2.7.0 (installed 2.7.0)
encryption: 2.15.0
files_external: 1.19.0
files_pdfviewer: 2.8.0 (installed 2.8.0)
twofactor_totp: 9.0.0
user_ldap: 1.17.0
Nextcloud Signing status
No errors have been found.

Nextcloud Logs

[no app in context] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '<user_name>' for key 'user_status_uid_ix' at <>

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 328
OC\DB\Exceptions\DbalException::wrap()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 137
OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/nextcloud/apps/user_status/lib/Listener/UserLiveStatusListener.php line 104
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
OCA\UserStatus\Listener\UserLiveStatusListener->handle()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
OC\EventDispatcher\ServiceEventListener->__invoke()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94
Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106
OC\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/apps/user_status/lib/Controller/HeartbeatController.php line 91
OC\EventDispatcher\EventDispatcher->dispatchTyped()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\UserStatus\Controller\HeartbeatController->heartbeat()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
/var/www/nextcloud/ocs/v1.php line 65
OC\Route\Router->match()
/var/www/nextcloud/ocs/v2.php line 23
require_once("/var/www/nextcloud/ocs/v1.php")
Caused by:

Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '<user_name>' for key 'user_status_uid_ix' at <>

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1814
Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1749
Doctrine\DBAL\Connection->handleDriverException()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1163
Doctrine\DBAL\Connection->convertExceptionDuringQuery()
/var/www/nextcloud/lib/private/DB/Connection.php line 295
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 137
OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/nextcloud/apps/user_status/lib/Listener/UserLiveStatusListener.php line 104
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
OCA\UserStatus\Listener\UserLiveStatusListener->handle()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
OC\EventDispatcher\ServiceEventListener->__invoke()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94
Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106
OC\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/apps/user_status/lib/Controller/HeartbeatController.php line 91
OC\EventDispatcher\EventDispatcher->dispatchTyped()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\UserStatus\Controller\HeartbeatController->heartbeat()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
/var/www/nextcloud/ocs/v1.php line 65
OC\Route\Router->match()
/var/www/nextcloud/ocs/v2.php line 23
require_once("/var/www/nextcloud/ocs/v1.php")
Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '<user_name>' for key 'user_status_uid_ix' at <>

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103
Doctrine\DBAL\Driver\PDO\Exception::new()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
Doctrine\DBAL\Driver\PDO\Statement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php line 295
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 137
OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/nextcloud/apps/user_status/lib/Listener/UserLiveStatusListener.php line 104
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
OCA\UserStatus\Listener\UserLiveStatusListener->handle()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
OC\EventDispatcher\ServiceEventListener->__invoke()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94
Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106
OC\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/apps/user_status/lib/Controller/HeartbeatController.php line 91
OC\EventDispatcher\EventDispatcher->dispatchTyped()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\UserStatus\Controller\HeartbeatController->heartbeat()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
/var/www/nextcloud/ocs/v1.php line 65
OC\Route\Router->match()
/var/www/nextcloud/ocs/v2.php line 23
require_once("/var/www/nextcloud/ocs/v1.php")
Caused by:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '<user_name>' for key 'user_status_uid_ix' at <>

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101
PDOStatement->execute()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
Doctrine\DBAL\Driver\PDO\Statement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php line 295
Doctrine\DBAL\Connection->executeStatement()
/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
OC\DB\Connection->executeStatement()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 137
OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/nextcloud/apps/user_status/lib/Listener/UserLiveStatusListener.php line 104
OCP\AppFramework\Db\QBMapper->insert()
/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
OCA\UserStatus\Listener\UserLiveStatusListener->handle()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
OC\EventDispatcher\ServiceEventListener->__invoke()
/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94
Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106
OC\EventDispatcher\EventDispatcher->dispatch()
/var/www/nextcloud/apps/user_status/lib/Controller/HeartbeatController.php line 91
OC\EventDispatcher\EventDispatcher->dispatchTyped()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\UserStatus\Controller\HeartbeatController->heartbeat()
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
/var/www/nextcloud/ocs/v1.php line 65
OC\Route\Router->match()
/var/www/nextcloud/ocs/v2.php line 23
require_once("/var/www/nextcloud/ocs/v1.php")
PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json
from <ip_address> by <user_name> at 2024-01-08T20:41:28+00:00

Additional info

@dartcafe
Copy link
Contributor

dartcafe commented Jan 14, 2024

@ChristophWurst

It seems to me the the exception has changed. I ran into a similar issue and had to change the exception catch from

} catch (Exception $e) {
	if ($e->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {

to

} catch (Exception $e) {
	// TODO: Change exception catch to actual exception
	// Currently OC\DB\Exceptions\DbalException is thrown instead of
	// UniqueConstraintViolationException
	// since the exception is from private namespace, we check the type string
	if (get_class($e) === 'OC\DB\Exceptions\DbalException') {

in my case this was thrown

 DbalException An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '126-arnold' for key 'UNIQ_shares'
    /www/htdocs/w017b2c3/instances/dev/server/lib/private/DB/QueryBuilder/QueryBuilder.phpline 328
    OC\DB\Exceptions\DbalException::wrap(
      [
        "Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException"
      ]
    )

@miaulalala
Copy link
Contributor

We can wrap the insert in a try- catch, but the question is why it doesn't find the existing status (thus the unique constrain violation) and updates it instead. Anyone got a full stack trace?

@Rade0nFighter
Copy link

@miaulalala

Error core 2024-01-15T12:33:47+0000 OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 328: OC\DB\Exceptions\DbalException::wrap() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1814: Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1749: Doctrine\DBAL\Connection->handleDriverException() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1163: Doctrine\DBAL\Connection->convertExceptionDuringQuery() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 103: Doctrine\DBAL\Driver\PDO\Exception::new() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1153: Doctrine\DBAL\Driver\PDO\Statement->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 101: PDOStatement->execute() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1153: Doctrine\DBAL\Driver\PDO\Statement->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute()

@miaulalala
Copy link
Contributor

@miaulalala

Error core 2024-01-15T12:33:47+0000 OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 328: OC\DB\Exceptions\DbalException::wrap() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1814: Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1749: Doctrine\DBAL\Connection->handleDriverException() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1163: Doctrine\DBAL\Connection->convertExceptionDuringQuery() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 103: Doctrine\DBAL\Driver\PDO\Exception::new() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1153: Doctrine\DBAL\Driver\PDO\Statement->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute() Caused by PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '108534-1704147671' for key 'oc_group_folders_versions.gf_versions_uniq_index' /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 101: PDOStatement->execute() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Connection.php - line 1153: Doctrine\DBAL\Driver\PDO\Statement->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/Connection.php - line 295: Doctrine\DBAL\Connection->executeStatement() /snap/nextcloud/39212/htdocs/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354: OC\DB\Connection->executeStatement() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280: Doctrine\DBAL\Query\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326: OC\DB\QueryBuilder\QueryBuilder->execute() /snap/nextcloud/39212/htdocs/lib/public/AppFramework/Db/QBMapper.php - line 137: OC\DB\QueryBuilder\QueryBuilder->executeStatement() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/VersionsBackend.php - line 88: OCP\AppFramework\Db\QBMapper->insert() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72: OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() /var/snap/nextcloud/39212/nextcloud/extra-apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43: OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start() /snap/nextcloud/39212/htdocs/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start() /snap/nextcloud/39212/htdocs/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute()

I think this will not fix the Groupfolder issue 😉 since we're looking at the user status. Thanks for the stack trace!

@ChristophWurst ChristophWurst moved this from 📄 To do to 🏗️ In progress in 💌 📅 👥 Groupware team Jan 15, 2024
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Jan 15, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Jan 16, 2024
@ChristophWurst
Copy link
Member Author

This still happens on 28.0.2 RC2

{
  "reqId": "SvJ2uh2daCaabcddcOqX",
  "level": 3,
  "time": "2024-01-24T08:22:12+00:00",
  "remoteAddr": "109.43.177.131",
  "user": "alice",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/apps/user_status/api/v1/user_status",
  "message": "Exception thrown: OC\\DB\\Exceptions\\DbalException",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
  "version": "28.0.2.2",
  "exception": {
    "Exception": "OC\\DB\\Exceptions\\DbalException",
    "Message": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alice' for key 'user_status_uid_ix'",
    "Code": 1062,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line": 328,
        "function": "wrap",
        "class": "OC\\DB\\Exceptions\\DbalException",
        "type": "::",
        "args": [
          [
            "Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
        "line": 219,
        "function": "executeStatement",
        "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps/user_status/lib/Service/StatusService.php",
        "line": 522,
        "function": "update",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
        "line": 121,
        "function": "revertUserStatus",
        "class": "OCA\\UserStatus\\Service\\StatusService",
        "type": "->",
        "args": [
          "alice",
          "meeting"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/user_status/lib/Controller/UserStatusController.php",
        "line": 77,
        "function": "processCalendarStatus",
        "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
        "type": "->",
        "args": [
          "alice"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "getStatus",
        "class": "OCA\\UserStatus\\Controller\\UserStatusController",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\UserStatus\\Controller\\UserStatusController"
          ],
          "getStatus"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\UserStatus\\Controller\\UserStatusController"
          ],
          "getStatus"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\UserStatus\\Controller\\UserStatusController",
          "getStatus",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "ocs.user_status.UserStatus.getStatus"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/ocs/v1.php",
        "line": 65,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/user_status/api/v1/user_status"
        ]
      },
      {
        "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/DB/Exceptions/DbalException.php",
    "Line": 71,
    "Previous": {
      "Exception": "Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException",
      "Message": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alice' for key 'user_status_uid_ix'",
      "Code": 1062,
      "Trace": [
        {
          "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1938,
          "function": "convert",
          "class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
          "type": "->",
          "args": [
            [
              "Doctrine\\DBAL\\Driver\\PDO\\Exception"
            ],
            [
              "Doctrine\\DBAL\\Query"
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1880,
          "function": "handleDriverException",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->",
          "args": [
            [
              "Doctrine\\DBAL\\Driver\\PDO\\Exception"
            ],
            [
              "Doctrine\\DBAL\\Query"
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1208,
          "function": "convertExceptionDuringQuery",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->",
          "args": [
            [
              "Doctrine\\DBAL\\Driver\\PDO\\Exception"
            ],
            "UPDATE `oc_user_status` SET `is_backup` = ?, `user_id` = ? WHERE `id` = ?",
            [
              false,
              "alice",
              82170
            ],
            [
              5,
              2,
              1
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/DB/Connection.php",
          "line": 294,
          "function": "executeStatement",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->",
          "args": [
            "UPDATE `oc_user_status` SET `is_backup` = ?, `user_id` = ? WHERE `id` = ?",
            [
              false,
              "alice",
              82170
            ],
            [
              5,
              2,
              1
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line": 386,
          "function": "executeStatement",
          "class": "OC\\DB\\Connection",
          "type": "->",
          "args": [
            "UPDATE `oc_user_status` SET `is_backup` = :dcValue1, `user_id` = :dcValue2 WHERE `id` = :dcValue3",
            [
              false,
              "alice",
              82170
            ],
            [
              5,
              2,
              1
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 280,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 326,
          "function": "execute",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
          "line": 219,
          "function": "executeStatement",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/nextcloud/apps/user_status/lib/Service/StatusService.php",
          "line": 522,
          "function": "update",
          "class": "OCP\\AppFramework\\Db\\QBMapper",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
          "line": 121,
          "function": "revertUserStatus",
          "class": "OCA\\UserStatus\\Service\\StatusService",
          "type": "->",
          "args": [
            "alice",
            "meeting"
          ]
        },
        {
          "file": "/var/www/nextcloud/apps/user_status/lib/Controller/UserStatusController.php",
          "line": 77,
          "function": "processCalendarStatus",
          "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
          "type": "->",
          "args": [
            "alice"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "getStatus",
          "class": "OCA\\UserStatus\\Controller\\UserStatusController",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\UserStatus\\Controller\\UserStatusController"
            ],
            "getStatus"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\UserStatus\\Controller\\UserStatusController"
            ],
            "getStatus"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\UserStatus\\Controller\\UserStatusController",
            "getStatus",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "ocs.user_status.UserStatus.getStatus"
            ]
          ]
        },
        {
          "file": "/var/www/nextcloud/ocs/v1.php",
          "line": 65,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/apps/user_status/api/v1/user_status"
          ]
        },
        {
          "file": "/var/www/nextcloud/ocs/v2.php",
          "line": 23,
          "args": [
            "/var/www/nextcloud/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
      "Line": 62,
      "Previous": {
        "Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
        "Message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alice' for key 'user_status_uid_ix'",
        "Code": 1062,
        "Trace": [
          {
            "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line": 132,
            "function": "new",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
            "type": "::",
            "args": [
              [
                "PDOException",
                [
                  "23000",
                  1062,
                  "Duplicate entry 'alice' for key 'user_status_uid_ix'"
                ]
              ]
            ]
          },
          {
            "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
            "line": 1202,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/nextcloud/lib/private/DB/Connection.php",
            "line": 294,
            "function": "executeStatement",
            "class": "Doctrine\\DBAL\\Connection",
            "type": "->",
            "args": [
              "UPDATE `oc_user_status` SET `is_backup` = ?, `user_id` = ? WHERE `id` = ?",
              [
                false,
                "alice",
                82170
              ],
              [
                5,
                2,
                1
              ]
            ]
          },
          {
            "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line": 386,
            "function": "executeStatement",
            "class": "OC\\DB\\Connection",
            "type": "->",
            "args": [
              "UPDATE `oc_user_status` SET `is_backup` = :dcValue1, `user_id` = :dcValue2 WHERE `id` = :dcValue3",
              [
                false,
                "alice",
                82170
              ],
              [
                5,
                2,
                1
              ]
            ]
          },
          {
            "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 280,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 326,
            "function": "execute",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
            "line": 219,
            "function": "executeStatement",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/nextcloud/apps/user_status/lib/Service/StatusService.php",
            "line": 522,
            "function": "update",
            "class": "OCP\\AppFramework\\Db\\QBMapper",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
            "line": 121,
            "function": "revertUserStatus",
            "class": "OCA\\UserStatus\\Service\\StatusService",
            "type": "->",
            "args": [
              "alice",
              "meeting"
            ]
          },
          {
            "file": "/var/www/nextcloud/apps/user_status/lib/Controller/UserStatusController.php",
            "line": 77,
            "function": "processCalendarStatus",
            "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
            "type": "->",
            "args": [
              "alice"
            ]
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 230,
            "function": "getStatus",
            "class": "OCA\\UserStatus\\Controller\\UserStatusController",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 137,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->",
            "args": [
              [
                "OCA\\UserStatus\\Controller\\UserStatusController"
              ],
              "getStatus"
            ]
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
            "line": 184,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->",
            "args": [
              [
                "OCA\\UserStatus\\Controller\\UserStatusController"
              ],
              "getStatus"
            ]
          },
          {
            "file": "/var/www/nextcloud/lib/private/Route/Router.php",
            "line": 315,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::",
            "args": [
              "OCA\\UserStatus\\Controller\\UserStatusController",
              "getStatus",
              [
                "OC\\AppFramework\\DependencyInjection\\DIContainer"
              ],
              [
                "ocs.user_status.UserStatus.getStatus"
              ]
            ]
          },
          {
            "file": "/var/www/nextcloud/ocs/v1.php",
            "line": 65,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "->",
            "args": [
              "/ocsapp/apps/user_status/api/v1/user_status"
            ]
          },
          {
            "file": "/var/www/nextcloud/ocs/v2.php",
            "line": 23,
            "args": [
              "/var/www/nextcloud/ocs/v1.php"
            ],
            "function": "require_once"
          }
        ],
        "File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
        "Line": 28,
        "Previous": {
          "Exception": "PDOException",
          "Message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alice' for key 'user_status_uid_ix'",
          "Code": "23000",
          "Trace": [
            {
              "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
              "line": 130,
              "function": "execute",
              "class": "PDOStatement",
              "type": "->",
              "args": [
                null
              ]
            },
            {
              "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
              "line": 1202,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
              "type": "->",
              "args": []
            },
            {
              "file": "/var/www/nextcloud/lib/private/DB/Connection.php",
              "line": 294,
              "function": "executeStatement",
              "class": "Doctrine\\DBAL\\Connection",
              "type": "->",
              "args": [
                "UPDATE `oc_user_status` SET `is_backup` = ?, `user_id` = ? WHERE `id` = ?",
                [
                  false,
                  "alice",
                  82170
                ],
                [
                  5,
                  2,
                  1
                ]
              ]
            },
            {
              "file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
              "line": 386,
              "function": "executeStatement",
              "class": "OC\\DB\\Connection",
              "type": "->",
              "args": [
                "UPDATE `oc_user_status` SET `is_backup` = :dcValue1, `user_id` = :dcValue2 WHERE `id` = :dcValue3",
                [
                  false,
                  "alice",
                  82170
                ],
                [
                  5,
                  2,
                  1
                ]
              ]
            },
            {
              "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 280,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
              "type": "->",
              "args": []
            },
            {
              "file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 326,
              "function": "execute",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->",
              "args": []
            },
            {
              "file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
              "line": 219,
              "function": "executeStatement",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->",
              "args": []
            },
            {
              "file": "/var/www/nextcloud/apps/user_status/lib/Service/StatusService.php",
              "line": 522,
              "function": "update",
              "class": "OCP\\AppFramework\\Db\\QBMapper",
              "type": "->",
              "args": [
                "*** sensitive parameters replaced ***"
              ]
            },
            {
              "file": "/var/www/nextcloud/apps/dav/lib/CalDAV/Status/StatusService.php",
              "line": 121,
              "function": "revertUserStatus",
              "class": "OCA\\UserStatus\\Service\\StatusService",
              "type": "->",
              "args": [
                "alice",
                "meeting"
              ]
            },
            {
              "file": "/var/www/nextcloud/apps/user_status/lib/Controller/UserStatusController.php",
              "line": 77,
              "function": "processCalendarStatus",
              "class": "OCA\\DAV\\CalDAV\\Status\\StatusService",
              "type": "->",
              "args": [
                "alice"
              ]
            },
            {
              "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
              "line": 230,
              "function": "getStatus",
              "class": "OCA\\UserStatus\\Controller\\UserStatusController",
              "type": "->",
              "args": []
            },
            {
              "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
              "line": 137,
              "function": "executeController",
              "class": "OC\\AppFramework\\Http\\Dispatcher",
              "type": "->",
              "args": [
                [
                  "OCA\\UserStatus\\Controller\\UserStatusController"
                ],
                "getStatus"
              ]
            },
            {
              "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
              "line": 184,
              "function": "dispatch",
              "class": "OC\\AppFramework\\Http\\Dispatcher",
              "type": "->",
              "args": [
                [
                  "OCA\\UserStatus\\Controller\\UserStatusController"
                ],
                "getStatus"
              ]
            },
            {
              "file": "/var/www/nextcloud/lib/private/Route/Router.php",
              "line": 315,
              "function": "main",
              "class": "OC\\AppFramework\\App",
              "type": "::",
              "args": [
                "OCA\\UserStatus\\Controller\\UserStatusController",
                "getStatus",
                [
                  "OC\\AppFramework\\DependencyInjection\\DIContainer"
                ],
                [
                  "ocs.user_status.UserStatus.getStatus"
                ]
              ]
            },
            {
              "file": "/var/www/nextcloud/ocs/v1.php",
              "line": 65,
              "function": "match",
              "class": "OC\\Route\\Router",
              "type": "->",
              "args": [
                "/ocsapp/apps/user_status/api/v1/user_status"
              ]
            },
            {
              "file": "/var/www/nextcloud/ocs/v2.php",
              "line": 23,
              "args": [
                "/var/www/nextcloud/ocs/v1.php"
              ],
              "function": "require_once"
            }
          ],
          "File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "Line": 130
        }
      }
    },
    "CustomMessage": "Exception thrown: OC\\DB\\Exceptions\\DbalException"
  },
  "id": "65b0c8cd80ecc"
}

@github-project-automation github-project-automation bot moved this from ☑️ Done to 📄 To do in 💌 📅 👥 Groupware team Jan 24, 2024
@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of and removed 3. to review Waiting for reviews labels Jan 24, 2024
@ChristophWurst
Copy link
Member Author

This time it's the revert apparently

@BMiZEL
Copy link

BMiZEL commented Jan 26, 2024

Also having that Issue:

DbalException An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin_username' for key 'user_status_uid_ix'
Exception thrown: OC\DB\Exceptions\DbalException

Nextcloud Hub 7 (28.0.1)
PHP: 8.2.15
MariaDB: 10.11.4

@Medienzentrum-Landkreis-Harburg

same issue here on:
nc 28.0.4
php Version: 8.2.18
Maria-DB Version: 10.6.16

@joshtrichards
Copy link
Member

#41288 looks fairly similar. I suspect #42805 fixed that issue too.

@ChristophWurst ChristophWurst added 2. developing Work in progress 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of 2. developing Work in progress labels Apr 29, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment