Error while running background job (Files Versions and Files Trashbin classes)
Open
Nobody has claimed this yet.
0. Needs triage
bug
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
No reproduction steps, just runing cron.
- NC 27.1.5
- Deck 1.11.3
These errors can also be triggered by occ trashbin:expire and occ versions:expire respectively.
{
"reqId": "WZu7v8De6qaOCkf43C2f",
"level": 3,
"time": "2024-01-23T21:54:58+01:00",
"remoteAddr": "",
"user": "--",
"app": "core",
"method": "",
"url": "--",
"message": "Error while running background job (class: OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash, arguments: )",
"userAgent": "--",
"version": "27.1.5.1",
"exception": {
"Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
"Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*deck_boards` WHERE (`id` = :dcValue2) AND (`deleted_at` = :dcValue1) ORDER BY `id` ASC\"; ",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 361,
"function": "findOneQuery",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Db/BoardMapper.php",
"line": 92,
"function": "findEntity",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 199,
"function": "find",
"class": "OCA\\Deck\\Db\\BoardMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 111,
"function": "getBoard",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 160,
"function": "getPermissions",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 289,
"function": "checkPermission",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 668,
"function": "applyBoardPermission",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 780,
"function": "resolveSharesForRecipient",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Share20/Manager.php",
"line": 1408,
"function": "getSharedWith",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/MountProvider.php",
"line": 99,
"function": "getSharedWith",
"class": "OC\\Share20\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php",
"line": 89,
"function": "getMountsForUser",
"class": "OCA\\Files_Sharing\\MountProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php",
"line": 146,
"function": "getMountsFromProvider",
"class": "OC\\Files\\Config\\MountProviderCollection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 215,
"function": "addMountForUser",
"class": "OC\\Files\\Config\\MountProviderCollection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 318,
"function": "OC\\Files\\{closure}",
"class": "OC\\Files\\SetupManager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 214,
"function": "setupForUserWith",
"class": "OC\\Files\\SetupManager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/legacy/OC_Util.php",
"line": 111,
"function": "setupForUser",
"class": "OC\\Files\\SetupManager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
"line": 91,
"function": "setupFS",
"class": "OC_Util",
"type": "::"
},
{
"file": "/var/www/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
"line": 76,
"function": "setupFS",
"class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 632,
"function": "OCA\\Files_Trashbin\\BackgroundJob\\{closure}",
"class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
"line": 74,
"function": "callForSeenUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 81,
"function": "run",
"class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 103,
"function": "start",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 93,
"function": "start",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
},
{
"file": "/var/www/nextcloud/cron.php",
"line": 152,
"function": "execute",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
}
],
"File": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"Line": 283,
"message": "Error while running background job (class: OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash, arguments: )",
"exception": {},
"CustomMessage": "Error while running background job (class: OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash, arguments: )"
}
}
and
{
"reqId": "ebRA29Vzc8sekknH7LdM",
"level": 3,
"time": "2024-01-23T20:44:57+01:00",
"remoteAddr": "",
"user": "--",
"app": "core",
"method": "",
"url": "--",
"message": "Error while running background job (class: OCA\\Files_Versions\\BackgroundJob\\ExpireVersions, arguments: )",
"userAgent": "--",
"version": "27.1.5.1",
"exception": {
"Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
"Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*deck_boards` WHERE (`id` = :dcValue2) AND (`deleted_at` = :dcValue1) ORDER BY `id` ASC\"; ",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 361,
"function": "findOneQuery",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Db/BoardMapper.php",
"line": 92,
"function": "findEntity",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 199,
"function": "find",
"class": "OCA\\Deck\\Db\\BoardMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 111,
"function": "getBoard",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php",
"line": 160,
"function": "getPermissions",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 289,
"function": "checkPermission",
"class": "OCA\\Deck\\Service\\PermissionService",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 668,
"function": "applyBoardPermission",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php",
"line": 780,
"function": "resolveSharesForRecipient",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Share20/Manager.php",
"line": 1408,
"function": "getSharedWith",
"class": "OCA\\Deck\\Sharing\\DeckShareProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/MountProvider.php",
"line": 99,
"function": "getSharedWith",
"class": "OC\\Share20\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php",
"line": 89,
"function": "getMountsForUser",
"class": "OCA\\Files_Sharing\\MountProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php",
"line": 146,
"function": "getMountsFromProvider",
"class": "OC\\Files\\Config\\MountProviderCollection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 215,
"function": "addMountForUser",
"class": "OC\\Files\\Config\\MountProviderCollection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 318,
"function": "OC\\Files\\{closure}",
"class": "OC\\Files\\SetupManager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/SetupManager.php",
"line": 214,
"function": "setupForUserWith",
"class": "OC\\Files\\SetupManager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/legacy/OC_Util.php",
"line": 111,
"function": "setupForUser",
"class": "OC\\Files\\SetupManager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_versions/lib/BackgroundJob/ExpireVersions.php",
"line": 78,
"function": "setupFS",
"class": "OC_Util",
"type": "::"
},
{
"file": "/var/www/nextcloud/apps/files_versions/lib/BackgroundJob/ExpireVersions.php",
"line": 66,
"function": "setupFS",
"class": "OCA\\Files_Versions\\BackgroundJob\\ExpireVersions",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 632,
"function": "OCA\\Files_Versions\\BackgroundJob\\{closure}",
"class": "OCA\\Files_Versions\\BackgroundJob\\ExpireVersions",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/files_versions/lib/BackgroundJob/ExpireVersions.php",
"line": 64,
"function": "callForSeenUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 81,
"function": "run",
"class": "OCA\\Files_Versions\\BackgroundJob\\ExpireVersions",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 103,
"function": "start",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 93,
"function": "start",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
},
{
"file": "/var/www/nextcloud/cron.php",
"line": 152,
"function": "execute",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
}
],
"File": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"Line": 283,
"message": "Error while running background job (class: OCA\\Files_Versions\\BackgroundJob\\ExpireVersions, arguments: )",
"exception": {},
"CustomMessage": "Error while running background job (class: OCA\\Files_Versions\\BackgroundJob\\ExpireVersions, arguments: )"
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/deck/lib/Db/BoardMapper.php, PermissionService.php, and Sharing/DeckShareProvider.php, following the stack from the files_trashbin and files_versions expiration jobs. Reproduce with cron or the occ trashbin:expire and occ versions:expire commands, then determine the relevant handling for the missing board record. Done means both expiration jobs complete without this exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100