groupfolders icon indicating copy to clipboard operation
groupfolders copied to clipboard

`Integrity constraint violation: 1062 Duplicate entry [..] for key 'groups_folder_trash_unique' `

Open alphasixtyfive opened this issue 2 years ago • 5 comments

I'm getting several error messages each day:

[webdav] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-RL11-1626 New Channel PO.pdf-1689338559' for key 'groups_folder_trash_unique' at <<closure>>

 0. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 328
    OC\DB\Exceptions\DbalException::wrap()
 1. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php line 57
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 2. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php line 218
    OCA\GroupFolders\Trash\TrashManager->addTrashItem()
 3. /srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 102
    OCA\GroupFolders\Trash\TrashBackend->moveToTrash()
 4. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 202
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
 5. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 102
    OCA\Files_Trashbin\Storage->doDelete()
 6. /srv/nextcloud/lib/private/Files/View.php line 1182
    OCA\Files_Trashbin\Storage->unlink()
 7. /srv/nextcloud/lib/private/Files/View.php line 729
    OC\Files\View->basicOperation()
 8. /srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 536
    OC\Files\View->unlink()
 9. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
10. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
11. /srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
12. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
13. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
14. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
15. /srv/nextcloud/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
16. /srv/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
17. /srv/nextcloud/remote.php line 172
    require_once("/srv/nextcloud/ ... p")

Caused by:

Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-RL11-1626 New Channel PO.pdf-1689338559' for key 'groups_folder_trash_unique' at <<closure>>

 0. /srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1814
    Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
 1. /srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1749
    Doctrine\DBAL\Connection->handleDriverException()
 2. /srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1163
    Doctrine\DBAL\Connection->convertExceptionDuringQuery()
 3. /srv/nextcloud/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement()
 4. /srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 5. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php line 57
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 8. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php line 218
    OCA\GroupFolders\Trash\TrashManager->addTrashItem()
 9. /srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 102
    OCA\GroupFolders\Trash\TrashBackend->moveToTrash()
10. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 202
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
11. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 102
    OCA\Files_Trashbin\Storage->doDelete()
12. /srv/nextcloud/lib/private/Files/View.php line 1182
    OCA\Files_Trashbin\Storage->unlink()
13. /srv/nextcloud/lib/private/Files/View.php line 729
    OC\Files\View->basicOperation()
14. /srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 536
    OC\Files\View->unlink()
15. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
16. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
17. /srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
18. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
19. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
20. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
21. /srv/nextcloud/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
22. /srv/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
23. /srv/nextcloud/remote.php line 172
    require_once("/srv/nextcloud/ ... p")

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-RL11-1626 New Channel PO.pdf-1689338559' for key 'groups_folder_trash_unique' at <<closure>>

 0. /srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103
    Doctrine\DBAL\Driver\PDO\Exception::new()
 1. /srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /srv/nextcloud/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement()
 3. /srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 4. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php line 57
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php line 218
    OCA\GroupFolders\Trash\TrashManager->addTrashItem()
 8. /srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 102
    OCA\GroupFolders\Trash\TrashBackend->moveToTrash()
 9. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 202
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
10. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 102
    OCA\Files_Trashbin\Storage->doDelete()
11. /srv/nextcloud/lib/private/Files/View.php line 1182
    OCA\Files_Trashbin\Storage->unlink()
12. /srv/nextcloud/lib/private/Files/View.php line 729
    OC\Files\View->basicOperation()
13. /srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 536
    OC\Files\View->unlink()
14. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
15. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
16. /srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
17. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
18. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
19. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /srv/nextcloud/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
21. /srv/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
22. /srv/nextcloud/remote.php line 172
    require_once("/srv/nextcloud/ ... p")

Caused by:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-RL11-1626 New Channel PO.pdf-1689338559' for key 'groups_folder_trash_unique' at <<closure>>

 0. /srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101
    PDOStatement->execute()
 1. /srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /srv/nextcloud/lib/private/DB/Connection.php line 295
    Doctrine\DBAL\Connection->executeStatement()
 3. /srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 4. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php line 57
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php line 218
    OCA\GroupFolders\Trash\TrashManager->addTrashItem()
 8. /srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 102
    OCA\GroupFolders\Trash\TrashBackend->moveToTrash()
 9. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 202
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
10. /srv/nextcloud/apps/files_trashbin/lib/Storage.php line 102
    OCA\Files_Trashbin\Storage->doDelete()
11. /srv/nextcloud/lib/private/Files/View.php line 1182
    OCA\Files_Trashbin\Storage->unlink()
12. /srv/nextcloud/lib/private/Files/View.php line 729
    OC\Files\View->basicOperation()
13. /srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 536
    OC\Files\View->unlink()
14. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
15. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
16. /srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
17. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
18. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
19. /srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
20. /srv/nextcloud/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
21. /srv/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
22. /srv/nextcloud/remote.php line 172
    require_once("/srv/nextcloud/ ... p")

DELETE /remote.php/dav/files/DEDACTED/Purchasing/Requisitions/11%20mv%20REDACTED/2023%20PO/RL11-1626%20New%20Channel%20PO.pdf
from 79.100.62.99 by REDACTED at 2023-07-14T12:42:39+00:00

Server configuration

Operating system:

Web server: Debian 11 / Linux 5.10.0-23-amd64 x86_64

Database: MariaDB / Version: 10.5.19

PHP version: 8.2.7

Nextcloud version: 26.0.3

Group folders version: 14.0.2

alphasixtyfive avatar Jul 14 '23 13:07 alphasixtyfive

Do they always involve that same file (4-RL11-1626 New Channel PO.pdf-1689338559) or do they vary?

Do you happen to have the associated log entries from around the period when that file was originally called with a DELETE transaction?

joshtrichards avatar Sep 30 '23 18:09 joshtrichards

Do they always involve that same file (4-RL11-1626 New Channel PO.pdf-1689338559) or do they vary?

Do you happen to have the associated log entries from around the period when that file was originally called with a DELETE transaction?

It varies from file to file but always has the -$timestamp suffix. I'm afraid I've temporarily disabled Trash Bin to overcome this error so there are no logs.

alphasixtyfive avatar Oct 02 '23 07:10 alphasixtyfive

A bit fresher error that keeps re-occuring unfortunately.

{
  "reqId": "fwHNMOTZfPbehQYbSpSd",
  "level": 3,
  "time": "2024-03-24T17:18:53+00:00",
  "remoteAddr": "XXX",
  "user": "XXX",
  "app": "webdav",
  "method": "DELETE",
  "url": "/remote.php/dav/files/XXX/ISM/XXX/XXX/XXX.pdf",
  "message": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
  "userAgent": "RaiDrive/2023.2.55.0",
  "version": "28.0.3.2",
  "exception": {
    "Exception": "OC\\DB\\Exceptions\\DbalException",
    "Message": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
    "Code": 1062,
    "Trace": [
      {
        "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line": 328,
        "function": "wrap",
        "class": "OC\\DB\\Exceptions\\DbalException",
        "type": "::"
      },
      {
        "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php",
        "line": 57,
        "function": "executeStatement",
        "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php",
        "line": 225,
        "function": "addTrashItem",
        "class": "OCA\\GroupFolders\\Trash\\TrashManager",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php",
        "line": 102,
        "function": "moveToTrash",
        "class": "OCA\\GroupFolders\\Trash\\TrashBackend",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
        "line": 190,
        "function": "moveToTrash",
        "class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
        "line": 89,
        "function": "doDelete",
        "class": "OCA\\Files_Trashbin\\Storage",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/lib/private/Files/View.php",
        "line": 1161,
        "function": "unlink",
        "class": "OCA\\Files_Trashbin\\Storage",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/lib/private/Files/View.php",
        "line": 702,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 543,
        "function": "unlink",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 197,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 281,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/dav/lib/Server.php",
        "line": 373,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/srv/nextcloud/remote.php",
        "line": 172,
        "args": [
          "/srv/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/srv/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 '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
      "Code": 1062,
      "Trace": [
        {
          "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1938,
          "function": "convert",
          "class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1880,
          "function": "handleDriverException",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1208,
          "function": "convertExceptionDuringQuery",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/lib/private/DB/Connection.php",
          "line": 294,
          "function": "executeStatement",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line": 386,
          "function": "executeStatement",
          "class": "OC\\DB\\Connection",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 280,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 326,
          "function": "execute",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php",
          "line": 57,
          "function": "executeStatement",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php",
          "line": 225,
          "function": "addTrashItem",
          "class": "OCA\\GroupFolders\\Trash\\TrashManager",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php",
          "line": 102,
          "function": "moveToTrash",
          "class": "OCA\\GroupFolders\\Trash\\TrashBackend",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
          "line": 190,
          "function": "moveToTrash",
          "class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
          "line": 89,
          "function": "doDelete",
          "class": "OCA\\Files_Trashbin\\Storage",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/lib/private/Files/View.php",
          "line": 1161,
          "function": "unlink",
          "class": "OCA\\Files_Trashbin\\Storage",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/lib/private/Files/View.php",
          "line": 702,
          "function": "basicOperation",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
          "line": 543,
          "function": "unlink",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
          "line": 197,
          "function": "delete",
          "class": "OCA\\DAV\\Connector\\Sabre\\File",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 281,
          "function": "delete",
          "class": "Sabre\\DAV\\Tree",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
          "line": 89,
          "function": "httpDelete",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 472,
          "function": "emit",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 253,
          "function": "invokeMethod",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 321,
          "function": "start",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/dav/lib/Server.php",
          "line": 373,
          "function": "exec",
          "class": "Sabre\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/apps/dav/appinfo/v2/remote.php",
          "line": 35,
          "function": "exec",
          "class": "OCA\\DAV\\Server",
          "type": "->"
        },
        {
          "file": "/srv/nextcloud/remote.php",
          "line": 172,
          "args": [
            "/srv/nextcloud/apps/dav/appinfo/v2/remote.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/srv/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 '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
        "Code": 1062,
        "Trace": [
          {
            "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line": 132,
            "function": "new",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
            "type": "::"
          },
          {
            "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
            "line": 1202,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/lib/private/DB/Connection.php",
            "line": 294,
            "function": "executeStatement",
            "class": "Doctrine\\DBAL\\Connection",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line": 386,
            "function": "executeStatement",
            "class": "OC\\DB\\Connection",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 280,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 326,
            "function": "execute",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php",
            "line": 57,
            "function": "executeStatement",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php",
            "line": 225,
            "function": "addTrashItem",
            "class": "OCA\\GroupFolders\\Trash\\TrashManager",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php",
            "line": 102,
            "function": "moveToTrash",
            "class": "OCA\\GroupFolders\\Trash\\TrashBackend",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
            "line": 190,
            "function": "moveToTrash",
            "class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
            "line": 89,
            "function": "doDelete",
            "class": "OCA\\Files_Trashbin\\Storage",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/lib/private/Files/View.php",
            "line": 1161,
            "function": "unlink",
            "class": "OCA\\Files_Trashbin\\Storage",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/lib/private/Files/View.php",
            "line": 702,
            "function": "basicOperation",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
            "line": 543,
            "function": "unlink",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
            "line": 197,
            "function": "delete",
            "class": "OCA\\DAV\\Connector\\Sabre\\File",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "line": 281,
            "function": "delete",
            "class": "Sabre\\DAV\\Tree",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "line": 89,
            "function": "httpDelete",
            "class": "Sabre\\DAV\\CorePlugin",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 472,
            "function": "emit",
            "class": "Sabre\\DAV\\Server",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 253,
            "function": "invokeMethod",
            "class": "Sabre\\DAV\\Server",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 321,
            "function": "start",
            "class": "Sabre\\DAV\\Server",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/dav/lib/Server.php",
            "line": 373,
            "function": "exec",
            "class": "Sabre\\DAV\\Server",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/apps/dav/appinfo/v2/remote.php",
            "line": 35,
            "function": "exec",
            "class": "OCA\\DAV\\Server",
            "type": "->"
          },
          {
            "file": "/srv/nextcloud/remote.php",
            "line": 172,
            "args": [
              "/srv/nextcloud/apps/dav/appinfo/v2/remote.php"
            ],
            "function": "require_once"
          }
        ],
        "File": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
        "Line": 28,
        "Previous": {
          "Exception": "PDOException",
          "Message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
          "Code": "23000",
          "Trace": [
            {
              "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
              "line": 130,
              "function": "execute",
              "class": "PDOStatement",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
              "line": 1202,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/lib/private/DB/Connection.php",
              "line": 294,
              "function": "executeStatement",
              "class": "Doctrine\\DBAL\\Connection",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
              "line": 386,
              "function": "executeStatement",
              "class": "OC\\DB\\Connection",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 280,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 326,
              "function": "execute",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashManager.php",
              "line": 57,
              "function": "executeStatement",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php",
              "line": 225,
              "function": "addTrashItem",
              "class": "OCA\\GroupFolders\\Trash\\TrashManager",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php",
              "line": 102,
              "function": "moveToTrash",
              "class": "OCA\\GroupFolders\\Trash\\TrashBackend",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
              "line": 190,
              "function": "moveToTrash",
              "class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/files_trashbin/lib/Storage.php",
              "line": 89,
              "function": "doDelete",
              "class": "OCA\\Files_Trashbin\\Storage",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/lib/private/Files/View.php",
              "line": 1161,
              "function": "unlink",
              "class": "OCA\\Files_Trashbin\\Storage",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/lib/private/Files/View.php",
              "line": 702,
              "function": "basicOperation",
              "class": "OC\\Files\\View",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
              "line": 543,
              "function": "unlink",
              "class": "OC\\Files\\View",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
              "line": 197,
              "function": "delete",
              "class": "OCA\\DAV\\Connector\\Sabre\\File",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
              "line": 281,
              "function": "delete",
              "class": "Sabre\\DAV\\Tree",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
              "line": 89,
              "function": "httpDelete",
              "class": "Sabre\\DAV\\CorePlugin",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
              "line": 472,
              "function": "emit",
              "class": "Sabre\\DAV\\Server",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
              "line": 253,
              "function": "invokeMethod",
              "class": "Sabre\\DAV\\Server",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
              "line": 321,
              "function": "start",
              "class": "Sabre\\DAV\\Server",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/dav/lib/Server.php",
              "line": 373,
              "function": "exec",
              "class": "Sabre\\DAV\\Server",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/apps/dav/appinfo/v2/remote.php",
              "line": 35,
              "function": "exec",
              "class": "OCA\\DAV\\Server",
              "type": "->"
            },
            {
              "file": "/srv/nextcloud/remote.php",
              "line": 172,
              "args": [
                "/srv/nextcloud/apps/dav/appinfo/v2/remote.php"
              ],
              "function": "require_once"
            }
          ],
          "File": "/srv/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "Line": 130
        }
      }
    },
    "message": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'",
    "exception": [],
    "CustomMessage": "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5-Про затвердження Правил охорони...' for key 'groups_folder_trash_unique'"
  },
  "id": "66006afe2be99"
}

alphasixtyfive avatar Mar 24 '24 18:03 alphasixtyfive

Same here with an encrypted file nextcloud 27, with group folder : https://pastebin.com/erb1a5AG

Nasjoe avatar May 15 '24 13:05 Nasjoe

@Nasjoe Your situation looks unrelated both to this issue and to the groupfolders app. Might be worth checking the server repo for the same matter and/or opening an issue there.

joshtrichards avatar Sep 11 '24 21:09 joshtrichards