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

Critical Error: Duplicate entry '000DDD32-6FE6-45C0-8AEF-AAAAAAAA' for key 'PRIMARY' #123

Closed
palmtown opened this issue Oct 22, 2019 · 4 comments
Labels
bug A bug has been reported high priority High priority issue

Comments

@palmtown
Copy link
Contributor

palmtown commented Oct 22, 2019

Hello,

I noticed that if Name sync or Email sync are set in Admin >> Settings >> SQL Backends >> Options to "SQL always wins" and the users do not exists in the database, an exception Duplicate entry '000DDD32-6FE6-45C0-8AEF-AAAAAAAA' for key 'PRIMARY' is generated when I browse to Admin >> Users.

If I "SQL always wins" for quota, there is no issue as it is stored in a different table.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000DDD32-6FE6-45C0-8AEF-AAAAAAAA' for key 'PRIMARY'",{"errorInfo":["23000",1062,"Duplicate entry '000DDD32-6FE6-45C0-8AEF-AAAAAAAA' for key 'PRIMARY'"],"class":"Doctrine\DBAL\Driver\PDOException"}]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":145,"function":"wrapException","class":"Doctrine\DBAL\DBALException","type":"::","args":[{"class":"Doctrine\DBAL\Driver\PDOMySql\Driver"},{"errorInfo":["23000",1062,"Duplicate entry '000DDD32-6FE6-45C0-8AEF-AAAAAAAA' for key 'PRIMARY'"],"class":"Doctrine\DBAL\Driver\PDOException"},"An exception occurred while executing 'INSERT INTO oc_accounts (uid, data)....

@jonmert
Copy link

jonmert commented Apr 3, 2020

Same here:

Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO oc_accounts (uid, data) VALUES(?, ?)' with params ["mmustermann", "{"displayname":{"value":"Max Mustermann","scope":"contacts","verified":"0"},"address":{"value":"","scope":"private","verified":"0"},"website":{"value":"","scope":"private","verified":"0"},"email":{"value":"[email protected]","scope":"contacts","verified":"0"},"avatar":{"scope":"contacts"},"phone":{"value":"","scope":"private","verified":"0"},"twitter":{"value":"","scope":"private","verified":"0"}}"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'mmustermann' for key 'PRIMARY'

@jonmert
Copy link

jonmert commented Apr 3, 2020

If I set Options to "Sync only ones" the error occurs, too.

@jonmert
Copy link

jonmert commented Apr 3, 2020

If Email sync Option set to "None" or "Nextcloud always wins", the error does not occur.

Possible related to #136

@mlojewski-me mlojewski-me added the bug A bug has been reported label Apr 13, 2020
@mlojewski-me mlojewski-me added the high priority High priority issue label Apr 13, 2020
@mlojewski-me
Copy link
Collaborator

d6cbc24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug has been reported high priority High priority issue
Projects
None yet
Development

No branches or pull requests

3 participants