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

DoesNotExistException Did expect one result but found none when executing #6516

Closed
paramazo opened this issue Nov 18, 2024 · 7 comments · Fixed by #6646
Closed

DoesNotExistException Did expect one result but found none when executing #6516

paramazo opened this issue Nov 18, 2024 · 7 comments · Fixed by #6646

Comments

@paramazo
Copy link

paramazo commented Nov 18, 2024

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug
After updating to 29.0.9, the protocol throws an exception every minute.

To Reproduce

  • install and use decks
  • update Nextcloud to 29.0.9

Expected behavior
There should no errors be thrown

Server details

Operating system: Debian 11

Web server: Apache2

Database: mySQL 10.5.26

PHP version: 8.2.13

Nextcloud version: 29.0.9

Where did you install Nextcloud from: updater.phar

Signing status: No errors have been found.

Are you using an external user-backend, if yes which one: LDAP

Logs

Nextcloud log (data/nextcloud.log)

{"reqId":"sbAHP3H8JMhJsWpX1gYa","level":3,"time":"2024-11-18T08:51:59+00:00","remoteAddr":"192.168.161.2","user":"u.ser","app":"activity","method":"GET","url
":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=activity","message":"Error while parsing activity event","userAgent":"Mozilla/5.0 (Windows NT 10
.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0","version":"29.0.9.2","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"
Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*deck_cards` WHERE `id` = :dcValue1 ORDER BY `order` ASC, `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/CardMapper.php","line":141,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"
->"},{"file":"/var/www/nextcloud/apps/deck/lib/Service/PermissionService.php","line":170,"function":"find","class":"OCA\\Deck\\Db\\CardMapper","type":"->"},{"fi
le":"/var/www/nextcloud/apps/deck/lib/Activity/ActivityManager.php","line":571,"function":"checkPermission","class":"OCA\\Deck\\Service\\PermissionService","typ
e":"->"},{"file":"/var/www/nextcloud/apps/deck/lib/Activity/DeckProvider.php","line":139,"function":"canSeeCardActivity","class":"OCA\\Deck\\Activity\\ActivityM
anager","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":74,"function":"parse","class":"OCA\\Deck\\Activity\\DeckProvider","ty
pe":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":61,"function":"addEvent","class":"OCA\\Activity\\GroupHelper","type":"->"},{"fil
e":"/var/www/nextcloud/apps/activity/lib/Data.php","line":248,"function":"addActivity","class":"OCA\\Activity\\GroupHelper","type":"->"},{"file":"/var/www/nextc
loud/apps/activity/lib/Dashboard/ActivityWidget.php","line":154,"function":"get","class":"OCA\\Activity\\Data","type":"->"},{"file":"/var/www/nextcloud/apps/das
hboard/lib/Controller/DashboardApiController.php","line":133,"function":"getItemsV2","class":"OCA\\Activity\\Dashboard\\ActivityWidget","type":"->"},{"file":"/v
ar/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getWidgetItemsV2","class":"OCA\\Dashboard\\Controller\\DashboardApiControl
ler","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\
\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\
Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"f
ile":"/var/www/nextcloud/ocs/v1.php","line":66,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"ar
gs":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":283,"message":"Erro
r while parsing activity event","exception":{},"CustomMessage":"Error while parsing activity event"}}

Browser log

    "File": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
    "Line": 283,
    "message": "Error while parsing activity event",
    "exception": [],
    "CustomMessage": "Error while parsing activity event"

Updater log

2024-11-15T08:04:30+0000 vlLeB6orAg [info] updater cli is executed
2024-11-15T08:04:30+0000 vlLeB6orAg [info] currentStep()
2024-11-15T08:04:30+0000 vlLeB6orAg [info] current version: 29.0.7 build time: 2024-09-12T12:35:46+00:00 873a4d0e1db10a5ae0e50133c7ef39e00750015b
2024-11-15T08:04:30+0000 vlLeB6orAg [info] getUpdateServerResponse()
2024-11-15T08:04:30+0000 vlLeB6orAg [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-11-15T08:04:30+0000 vlLeB6orAg [info] releaseChannel: stable
2024-11-15T08:04:30+0000 vlLeB6orAg [info] internal version: 29.0.7.1
2024-11-15T08:04:30+0000 vlLeB6orAg [info] updateURL: https://updates.nextcloud.com/updater_server/?version=29x0x7x1xxxstablexx2024-09-12T12%3A35%3A46%2B00%3A00+873a4d0e1db10a5ae0e50133c7ef39e00750015bx8x0x30
2024-11-15T08:04:30+0000 vlLeB6orAg [info] getUpdateServerResponse response: Array
(
    [version] => 29.0.9.2
    [versionstring] => Nextcloud 29.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.9.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => MApafCYqysmbXaz2F6UQm+x5BtrPbjmMc/xUERYbpKn3frhsb+/wtlvFZqgWCO8e
J03dptp1UgrKS3hPCvifB7D+FgzTaC1IsCCnCy5OEEFICeTHIjHdkP9fEhIgaxds
4UgNNvquf5q/qS01A8DtDQuU+1CiLKM7S4cv1sSPWg2NNjdfRO2/3PDKho78GUfC
dZTOuuHYAf9ldhqmWUJhrso5+j7ArQf1VL5fHAnCcoBMTPo/blE1IAPoF4LNoiYC
+2NmyNBhuqopDJDF41tYXUf807nw6KtZsTyyX2yJPk1JVSh3AX+1Y37ShDM87dvT
XVcu5iBVPV4pmT1q3g3UCA==
)

2024-11-15T08:04:30+0000 vlLeB6orAg [info] checkForUpdate() Array
(
    [version] => 29.0.9.2
    [versionstring] => Nextcloud 29.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.9.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => MApafCYqysmbXaz2F6UQm+x5BtrPbjmMc/xUERYbpKn3frhsb+/wtlvFZqgWCO8e
J03dptp1UgrKS3hPCvifB7D+FgzTaC1IsCCnCy5OEEFICeTHIjHdkP9fEhIgaxds
4UgNNvquf5q/qS01A8DtDQuU+1CiLKM7S4cv1sSPWg2NNjdfRO2/3PDKho78GUfC
dZTOuuHYAf9ldhqmWUJhrso5+j7ArQf1VL5fHAnCcoBMTPo/blE1IAPoF4LNoiYC
+2NmyNBhuqopDJDF41tYXUf807nw6KtZsTyyX2yJPk1JVSh3AX+1Y37ShDM87dvT
XVcu5iBVPV4pmT1q3g3UCA==
)

2024-11-15T08:04:30+0000 vlLeB6orAg [info] getChangelogURL()
2024-11-15T08:04:30+0000 vlLeB6orAg [info] end of checkForUpdate() Update to Nextcloud 29.0.9 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-29.0.9.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#29-0-9" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2024-11-15T08:04:33+0000 vlLeB6orAg [info] updater started
2024-11-15T08:04:33+0000 vlLeB6orAg [info] executeStep request for step "1"
2024-11-15T08:04:33+0000 vlLeB6orAg [info] startStep("1")
2024-11-15T08:04:33+0000 vlLeB6orAg [info] checkForExpectedFilesAndFolders()
2024-11-15T08:04:33+0000 vlLeB6orAg [info] end of checkForExpectedFilesAndFolders()
2024-11-15T08:04:33+0000 vlLeB6orAg [info] endStep("1")
2024-11-15T08:04:33+0000 vlLeB6orAg [info] executeStep request for step "2"
2024-11-15T08:04:33+0000 vlLeB6orAg [info] startStep("2")
2024-11-15T08:04:33+0000 vlLeB6orAg [info] checkWritePermissions()
2024-11-15T08:04:33+0000 vlLeB6orAg [info] end of checkWritePermissions()
2024-11-15T08:04:33+0000 vlLeB6orAg [info] endStep("2")
2024-11-15T08:04:33+0000 vlLeB6orAg [info] executeStep request for step "3"
2024-11-15T08:04:33+0000 vlLeB6orAg [info] startStep("3")
2024-11-15T08:04:33+0000 vlLeB6orAg [info] createBackup()
2024-11-15T08:04:33+0000 vlLeB6orAg [info] backup folder location: /var/local/nextcloud/data/updater-oc9d6pdjwsc8/backups/nextcloud-29.0.7.1-1731657873/
2024-11-15T08:05:03+0000 vlLeB6orAg [info] end of createBackup()
2024-11-15T08:05:03+0000 vlLeB6orAg [info] endStep("3")
2024-11-15T08:05:03+0000 vlLeB6orAg [info] executeStep request for step "4"
2024-11-15T08:05:03+0000 vlLeB6orAg [info] startStep("4")
2024-11-15T08:05:03+0000 vlLeB6orAg [info] downloadUpdate()
2024-11-15T08:05:03+0000 vlLeB6orAg [info] getUpdateServerResponse()
2024-11-15T08:05:03+0000 vlLeB6orAg [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-11-15T08:05:03+0000 vlLeB6orAg [info] releaseChannel: stable
2024-11-15T08:05:03+0000 vlLeB6orAg [info] internal version: 29.0.7.1
2024-11-15T08:05:03+0000 vlLeB6orAg [info] updateURL: https://updates.nextcloud.com/updater_server/?version=29x0x7x1xxxstablexx2024-09-12T12%3A35%3A46%2B00%3A00+873a4d0e1db10a5ae0e50133c7ef39e00750015bx8x0x30
2024-11-15T08:05:03+0000 vlLeB6orAg [info] getUpdateServerResponse response: Array
(
    [version] => 29.0.9.2
    [versionstring] => Nextcloud 29.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.9.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => MApafCYqysmbXaz2F6UQm+x5BtrPbjmMc/xUERYbpKn3frhsb+/wtlvFZqgWCO8e
J03dptp1UgrKS3hPCvifB7D+FgzTaC1IsCCnCy5OEEFICeTHIjHdkP9fEhIgaxds
4UgNNvquf5q/qS01A8DtDQuU+1CiLKM7S4cv1sSPWg2NNjdfRO2/3PDKho78GUfC
dZTOuuHYAf9ldhqmWUJhrso5+j7ArQf1VL5fHAnCcoBMTPo/blE1IAPoF4LNoiYC
+2NmyNBhuqopDJDF41tYXUf807nw6KtZsTyyX2yJPk1JVSh3AX+1Y37ShDM87dvT
XVcu5iBVPV4pmT1q3g3UCA==
)

2024-11-15T08:05:03+0000 vlLeB6orAg [info] storage location exists
2024-11-15T08:05:23+0000 vlLeB6orAg [info] end of downloadUpdate()
2024-11-15T08:05:23+0000 vlLeB6orAg [info] endStep("4")
2024-11-15T08:05:23+0000 vlLeB6orAg [info] executeStep request for step "5"
2024-11-15T08:05:23+0000 vlLeB6orAg [info] startStep("5")
2024-11-15T08:05:23+0000 vlLeB6orAg [info] verifyIntegrity()
2024-11-15T08:05:23+0000 vlLeB6orAg [info] getUpdateServerResponse()
2024-11-15T08:05:23+0000 vlLeB6orAg [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-11-15T08:05:23+0000 vlLeB6orAg [info] releaseChannel: stable
2024-11-15T08:05:23+0000 vlLeB6orAg [info] internal version: 29.0.7.1
2024-11-15T08:05:23+0000 vlLeB6orAg [info] updateURL: https://updates.nextcloud.com/updater_server/?version=29x0x7x1xxxstablexx2024-09-12T12%3A35%3A46%2B00%3A00+873a4d0e1db10a5ae0e50133c7ef39e00750015bx8x0x30
2024-11-15T08:05:24+0000 vlLeB6orAg [info] getUpdateServerResponse response: Array
(
    [version] => 29.0.9.2
    [versionstring] => Nextcloud 29.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-29.0.9.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => MApafCYqysmbXaz2F6UQm+x5BtrPbjmMc/xUERYbpKn3frhsb+/wtlvFZqgWCO8e
J03dptp1UgrKS3hPCvifB7D+FgzTaC1IsCCnCy5OEEFICeTHIjHdkP9fEhIgaxds
4UgNNvquf5q/qS01A8DtDQuU+1CiLKM7S4cv1sSPWg2NNjdfRO2/3PDKho78GUfC
dZTOuuHYAf9ldhqmWUJhrso5+j7ArQf1VL5fHAnCcoBMTPo/blE1IAPoF4LNoiYC
+2NmyNBhuqopDJDF41tYXUf807nw6KtZsTyyX2yJPk1JVSh3AX+1Y37ShDM87dvT
XVcu5iBVPV4pmT1q3g3UCA==
)

2024-11-15T08:05:24+0000 vlLeB6orAg [info] storage location: /var/local/nextcloud/data/updater-oc9d6pdjwsc8/downloads/
2024-11-15T08:05:24+0000 vlLeB6orAg [info] end of verifyIntegrity()
2024-11-15T08:05:24+0000 vlLeB6orAg [info] endStep("5")
2024-11-15T08:05:24+0000 vlLeB6orAg [info] executeStep request for step "6"
2024-11-15T08:05:24+0000 vlLeB6orAg [info] startStep("6")
2024-11-15T08:05:24+0000 vlLeB6orAg [info] extractDownload()
2024-11-15T08:05:24+0000 vlLeB6orAg [info] storage location: /var/local/nextcloud/data/updater-oc9d6pdjwsc8/downloads/
2024-11-15T08:05:28+0000 vlLeB6orAg [info] end of extractDownload()
2024-11-15T08:05:28+0000 vlLeB6orAg [info] endStep("6")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] executeStep request for step "7"
2024-11-15T08:05:28+0000 vlLeB6orAg [info] startStep("7")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] setMaintenanceMode("true")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] configFileName /var/www/nextcloud/updater/../config/config.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] end of setMaintenanceMode()
2024-11-15T08:05:28+0000 vlLeB6orAg [info] endStep("7")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] executeStep request for step "8"
2024-11-15T08:05:28+0000 vlLeB6orAg [info] startStep("8")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replaceEntryPoints()
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace index.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace status.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace remote.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace public.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace ocs/v1.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] replace ocs/v2.php
2024-11-15T08:05:28+0000 vlLeB6orAg [info] end of replaceEntryPoints()
2024-11-15T08:05:28+0000 vlLeB6orAg [info] endStep("8")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] executeStep request for step "9"
2024-11-15T08:05:28+0000 vlLeB6orAg [info] startStep("9")
2024-11-15T08:05:28+0000 vlLeB6orAg [info] deleteOldFiles()
2024-11-15T08:05:29+0000 vlLeB6orAg [info] config sample exists
2024-11-15T08:05:29+0000 vlLeB6orAg [info] themes README exists
2024-11-15T08:05:30+0000 vlLeB6orAg [info] end of deleteOldFiles()
2024-11-15T08:05:30+0000 vlLeB6orAg [info] endStep("9")
2024-11-15T08:05:30+0000 vlLeB6orAg [info] executeStep request for step "10"
2024-11-15T08:05:30+0000 vlLeB6orAg [info] startStep("10")
2024-11-15T08:05:30+0000 vlLeB6orAg [info] moveNewVersionInPlace()
2024-11-15T08:05:30+0000 vlLeB6orAg [info] storage location: /var/local/nextcloud/data/updater-oc9d6pdjwsc8/downloads/nextcloud/
2024-11-15T08:05:33+0000 vlLeB6orAg [info] end of moveNewVersionInPlace()
2024-11-15T08:05:33+0000 vlLeB6orAg [info] endStep("10")
2024-11-15T08:05:33+0000 vlLeB6orAg [info] executeStep request for step "12"
2024-11-15T08:05:33+0000 vlLeB6orAg [info] startStep("12")
2024-11-15T08:05:33+0000 vlLeB6orAg [info] finalize()
2024-11-15T08:05:33+0000 vlLeB6orAg [info] storage location: /var/local/nextcloud/data/updater-oc9d6pdjwsc8/downloads/nextcloud/
2024-11-15T08:05:33+0000 vlLeB6orAg [info] call opcache_reset()
2024-11-15T08:05:33+0000 vlLeB6orAg [info] end of finalize()
2024-11-15T08:05:33+0000 vlLeB6orAg [info] endStep("12")
2024-11-15T08:05:33+0000 vlLeB6orAg [info] update of code successful.
2024-11-15T08:07:48+0000 vlLeB6orAg [info] maintenance mode is disabled - return code: 0

Image

@luka-nextcloud
Copy link
Contributor

@paramazo Please provide updater.log and system report.

@paramazo
Copy link
Author

@paramazo Please provide updater.log and system report.

Hello, thanks for your response, i added the updater log on top.

@juliusknorr
Copy link
Member

@luka-nextcloud

The trace looks a bit like it tries to generate the activity entry for a deleted card. Some idea for reproducing could be:

  • Create a card
  • Change some data on it to have activity entries
  • Delete the card
  • See if the activity entry is still rendered fine

We could also approach this just from the trace as from my perspective we should catch that db error when checking the permission and just skip it when parsing activity events.

@luka-nextcloud
Copy link
Contributor

@juliusknorr @paramazo

  • I cannot reproduce this issue
  • The updater log looks ok

@lukasig
Copy link

lukasig commented Nov 27, 2024

i get the same error running nextcloud-AIO 30.0.2 in docker

core
DoesNotExistException
Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*forms_v2_forms WHERE id = :dcValue1";
Error while running background job OCA\Forms\BackgroundJob\CleanupUploadedFilesJob (id: 108022, arguments: null)

@luka-nextcloud
Copy link
Contributor

i get the same error running nextcloud-AIO 30.0.2 in docker

core
DoesNotExistException
Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*forms_v2_forms WHERE id = :dcValue1";
Error while running background job OCA\Forms\BackgroundJob\CleanupUploadedFilesJob (id: 108022, arguments: null)

I think this is a different error message.

@paramazo
Copy link
Author

I think this is a different error message.

i think its the same error, just for another plugin. Just catch the DoesNotExistException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants