nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.57k stars 3.99k forks source link

[Bug]: Files Versions: Did expect one result but found none when executing: query `"SELECT * FROM *PREFIX*files_versions WHERE (file_id = :dcValue1) AND (timestamp = :dcValue2)";` #41174

Open AndyXheli opened 1 year ago

AndyXheli commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Seen this error on Nextcloud 26.0.0

Steps to reproduce

Not sure

Expected behavior

Should not see error in logs

Installation method

Community Manual installation with Archive

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

Enabled:

activity: 2.18.0

admin_audit: 1.16.0

bruteforcesettings: 2.6.0

cloud_federation_api: 1.9.0

comments: 1.16.0

contactsinteraction: 1.7.0

dashboard: 7.6.0

dav: 1.25.0

federatedfilesharing: 1.16.0

federation: 1.16.0

files: 1.21.1

files_external: 1.18.0

files_pdfviewer: 2.7.0

files_rightclick: 1.5.0

files_sharing: 1.18.0

files_trashbin: 1.16.0

files_versions: 1.19.1

firstrunwizard: 2.15.0

groupfolders: 14.0.0

hibp_login_check: 0.0.1

impersonate: 1.13.0

integration_youtube: 0.1.3

logreader: 2.11.0

lookup_server_connector: 1.14.0

nextcloud_announcements: 1.15.0

notes: 4.7.1

notifications: 2.14.0

notify_push: 0.6.0

oauth2: 1.14.0

password_policy: 1.16.0

photos: 2.2.0

previewgenerator: 5.2.1

privacy: 1.10.0

provisioning_api: 1.16.0

recommendations: 1.5.0

related_resources: 1.1.0-alpha1

richdocuments: 8.0.0

serverinfo: 1.16.0

settings: 1.8.0

sharebymail: 1.16.0

spreed: 16.0.0

support: 1.9.0

survey_client: 1.14.0

suspicious_login: 4.4.0

systemtags: 1.16.0

text: 3.7.2

theming: 2.1.1

twofactor_admin: 4.1.9

twofactor_backupcodes: 1.15.0

twofactor_email: 2.7.2

twofactor_nextcloud_notification: 3.6.0

twofactor_reminder: 1.0.0

twofactor_totp: 8.0.0-alpha.0

updatenotification: 1.16.0

user_status: 1.6.0

viewer: 1.10.0

weather_status: 1.6.0

workflowengine: 2.8.0 

Disabled:

circles: 26.0.0 (installed 25.0.0)

encryption: 2.14.0

maps: 1.0.0 (installed 1.0.0)

sendent: 1.3.2 (installed 1.3.2)

user_ldap: 1.16.0

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"GIiesctCi7CMSZRBcUKn","level":3,"time":"2023-03-22T13:33:47-05:00","remoteAddr":"5.5.5.5","user":"admin","app":"no app in context","method":"POST","url":"/apps/text/session/sync","message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36","version":"26.0.0.11","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","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/files_versions/lib/Db/VersionsMapper.php","line":78,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":242,"function":"findVersionForFileId","class":"OCA\\Files_Versions\\Db\\VersionsMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":106,"function":"post_write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":87,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":99,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1295,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1223,"function":"runHooks","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":707,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Service/DocumentService.php","line":367,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Lock/LockManager.php","line":29,"function":"OCA\\Text\\Service\\{closure}","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/text/lib/Service/DocumentService.php","line":371,"function":"runInScope","class":"OC\\Files\\Lock\\LockManager","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Service/ApiService.php","line":246,"function":"autosave","class":"OCA\\Text\\Service\\DocumentService","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Controller/SessionController.php","line":83,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1055,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":284,"CustomMessage":"--"},"id":"641b4a0c6ae56"}
{"reqId":"hBEiAYASspRYF0DVmzpI","level":3,"time":"2023-03-22T13:32:49-05:00","remoteAddr":"5.5.5.5","user":"admin","app":"no app in context","method":"POST","url":"/apps/text/session/sync","message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36","version":"26.0.0.11","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","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/files_versions/lib/Db/VersionsMapper.php","line":78,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":242,"function":"findVersionForFileId","class":"OCA\\Files_Versions\\Db\\VersionsMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":106,"function":"post_write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":87,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":99,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1295,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1223,"function":"runHooks","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":707,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Service/DocumentService.php","line":367,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Lock/LockManager.php","line":29,"function":"OCA\\Text\\Service\\{closure}","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/text/lib/Service/DocumentService.php","line":371,"function":"runInScope","class":"OC\\Files\\Lock\\LockManager","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Service/ApiService.php","line":246,"function":"autosave","class":"OCA\\Text\\Service\\DocumentService","type":"->"},{"file":"/var/www/nextcloud/apps/text/lib/Controller/SessionController.php","line":83,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1055,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":284,"CustomMessage":"--"},"id":"641b49d239a4a"}

Additional info

No response

juliushaertl commented 1 year ago

This looks more related to files_versions as we just write to a file here.

@artonge Maybe you can have a look since you worked on versions recently?

Error happens at https://github.com/nextcloud/server/blob/88abb2d97c84211d4874aa02bf92580fbb1ae83e/apps/files_versions/lib/Listener/FileEventsListener.php#L242

{
  "reqId": "GIiesctCi7CMSZRBcUKn",
  "level": 3,
  "time": "2023-03-22T13:33:47-05:00",
  "remoteAddr": "5.5.5.5",
  "user": "admin",
  "app": "no app in context",
  "method": "POST",
  "url": "/apps/text/session/sync",
  "message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
  "version": "26.0.0.11",
  "exception": {
    "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
    "Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ",
    "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/files_versions/lib/Db/VersionsMapper.php",
        "line": 78,
        "function": "findEntity",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
        "line": 242,
        "function": "findVersionForFileId",
        "class": "OCA\\Files_Versions\\Db\\VersionsMapper",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
        "line": 106,
        "function": "post_write_hook",
        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 86,
        "function": "handle",
        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 251,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 73,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 87,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 99,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
        "line": 118,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
        "line": 105,
        "function": "postWrite",
        "class": "OC\\Files\\Node\\HookConnector",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1295,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1223,
        "function": "runHooks",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 707,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/File.php",
        "line": 71,
        "function": "file_put_contents",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/DocumentService.php",
        "line": 367,
        "function": "putContent",
        "class": "OC\\Files\\Node\\File",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Lock/LockManager.php",
        "line": 29,
        "function": "OCA\\Text\\Service\\{closure}",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/DocumentService.php",
        "line": 371,
        "function": "runInScope",
        "class": "OC\\Files\\Lock\\LockManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/ApiService.php",
        "line": 246,
        "function": "autosave",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Controller/SessionController.php",
        "line": 83,
        "function": "sync",
        "class": "OCA\\Text\\Service\\ApiService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "sync",
        "class": "OCA\\Text\\Controller\\SessionController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1055,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
    "Line": 284,
    "CustomMessage": "--"
  },
  "id": "641b4a0c6ae56"
}
AndyXheli commented 1 year ago

Still present in NC 26.0.1

artonge commented 1 year ago

Hey @AndyXheli,

I could not reproduce, and I do not want to make potentially false hypothesis on the root cause here.

Were you able to find some reproduction steps?

Seems to be linked to editing a file with the text app.

mejo- commented 1 year ago

@AndyXheli in order to further debug the issue, @artonge needs a few more information from you. Could you try to provide them to him?

AndyXheli commented 1 year ago

@artonge @mejo- I'm running on NC 27.0.0 RC3 and i have not been able to replacte the issue. Im not sure that really tirgered the issue and the errors i just seen them on the errors logs and i created the issue. Im sorry for the late response been really busy.

mejo- commented 1 year ago

@AndyXheli no worries, thanks for your feedback. We'll close the issue for now - also because nobody else reported it so far. Please reopen if you happen to catch it again.

camouflage81 commented 1 year ago

Have the same issue in Nextcloud version 27.0.1

larsik78 commented 12 months ago

Here the same - Nextcloud version 27.0.2

Orko79 commented 10 months ago

Same here. Nextcloud version 27.1.2.1

[no app in context] Fehler: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)";  at <<closure>>

 0. /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 361
    OCP\AppFramework\Db\QBMapper->findOneQuery()
 1. /var/www/nextcloud/apps/files_versions/lib/Db/VersionsMapper.php line 78
    OCP\AppFramework\Db\QBMapper->findEntity()
 2. /var/www/nextcloud/apps/files_versions/lib/Versions/LegacyVersionsBackend.php line 238
    OCA\Files_Versions\Db\VersionsMapper->findVersionForFileId()
 3. /var/www/nextcloud/apps/files_versions/lib/Versions/VersionManager.php line 153
    OCA\Files_Versions\Versions\LegacyVersionsBackend->updateVersionEntity("*** sensitive parameters replaced ***")
 4. /var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php line 238
    OCA\Files_Versions\Versions\VersionManager->updateVersionEntity("*** sensitive parameters replaced ***")
 5. /var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php line 112
    OCA\Files_Versions\Listener\FileEventsListener->post_write_hook()
 6. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_Versions\Listener\FileEventsListener->handle()
 7. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 8. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 9. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 94
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
10. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 106
    OC\EventDispatcher\EventDispatcher->dispatch()
11. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 121
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
12. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 105
    OC\Files\Node\HookConnector->postWrite()
13. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 472
    OC_Hook::emit()
14. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks()
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    OCA\DAV\Connector\Sabre\File->put()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
17. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
20. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
21. /var/www/nextcloud/apps/dav/lib/Server.php line 365
    Sabre\DAV\Server->exec()
22. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
23. /var/www/nextcloud/remote.php line 172
    require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/files/orko/Dokumente/Notizen/Anleitungen/Linux%20allgemein/ble.sh.md
from 192.168.178.20 by orko at 2023-10-14T04:30:41+02:00
solracsf commented 10 months ago

@juliushaertl https://github.com/nextcloud/server/pull/38800 did not fix this. Error remains in v26.0.8 and v27.1.3.

This happens while editing a Text app (as originaly reported) file or a OnlyOffice app file (so files that can be edited and saved in real time).

{
  "reqId": "oVNqo84kHYdymDTh7hvg",
  "level": 3,
  "time": "2023-10-28T12:48:56+02:00",
  "remoteAddr": "10.0.0.14",
  "user": "marie",
  "app": "no app in context",
  "method": "POST",
  "url": "/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtYXJpZWFtZWxpZS5lc3RhZ2VyQGFsaXhpb2FjdGl2LmZyIiwib3duZXJJZCI6Ikdyb3VwQWxpeGlvQWN0aXYiLCJmaWxlSWQiOjYyNzg0MTEyLCJmaWxlUGF0aCI6Ii9QYXJ0YWdlIEFsaXhpbyBBY3Rpdi9NaXNzaW9uIE1JUlZPRy9Db2RlcyBIT0dBTi54bHN4Iiwic2hhcmVUb2tlbiI6bnVsbCwiYWN0aW9uIjoidHJhY2sifQ.ZdsRqfaP1TFA3TfKrCACrlilavkpTwz4Y5URl1uAyz0",
  "message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ",
  "userAgent": "--",
  "version": "26.0.8.2",
  "exception": {
    "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
    "Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
        "line": 362,
        "function": "findOneQuery",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          [
            "OC\\DB\\QueryBuilder\\QueryBuilder"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files_versions/lib/Db/VersionsMapper.php",
        "line": 78,
        "function": "findEntity",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->",
        "args": [
          [
            "OC\\DB\\QueryBuilder\\QueryBuilder"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
        "line": 245,
        "function": "findVersionForFileId",
        "class": "OCA\\Files_Versions\\Db\\VersionsMapper",
        "type": "->",
        "args": [
          62784112,
          1698489757
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
        "line": 111,
        "function": "post_write_hook",
        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
        "type": "->",
        "args": [
          [
            "OC\\Files\\Node\\File"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 86,
        "function": "handle",
        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
        "type": "->",
        "args": [
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 251,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->",
        "args": [
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ],
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
          [
            "Symfony\\Component\\EventDispatcher\\EventDispatcher"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 73,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            [
              "Closure"
            ],
            [
              "Closure"
            ],
            [
              "Closure"
            ]
          ],
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 94,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ],
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 106,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          "OCP\\Files\\Events\\Node\\NodeWrittenEvent",
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
        "line": 121,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            "OCP\\Files\\Events\\Node\\NodeWrittenEvent"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
        "line": 105,
        "function": "postWrite",
        "class": "OC\\Files\\Node\\HookConnector",
        "type": "->",
        "args": [
          [
            true,
            "/Partage Activ/Mission/Codes.xlsx"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1314,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::",
        "args": [
          "OC_Filesystem",
          "post_write",
          [
            true,
            "/Partage Activ/Mission/Codes.xlsx"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1242,
        "function": "runHooks",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          [
            "update",
            "write"
          ],
          "/Partage Activ/Mission/Codes.xlsx",
          true
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 718,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "file_put_contents",
          "/GroupActiv/files/Partage Activ/Mission/Codes.xlsx",
          [
            "update",
            "write"
          ],
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/File.php",
        "line": 71,
        "function": "file_put_contents",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "/GroupActiv/files/Partage Activ/Mission/Codes.xlsx",
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php",
        "line": 560,
        "function": "putContent",
        "class": "OC\\Files\\Node\\File",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php",
        "line": 844,
        "function": "OCA\\Onlyoffice\\Controller\\{closure}",
        "class": "OCA\\Onlyoffice\\Controller\\CallbackController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php",
        "line": 561,
        "function": "retryOperation",
        "class": "OCA\\Onlyoffice\\Controller\\CallbackController",
        "type": "->",
        "args": [
          [
            "Closure"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Lock/LockManager.php",
        "line": 29,
        "function": "OCA\\Onlyoffice\\Controller\\{closure}",
        "class": "OCA\\Onlyoffice\\Controller\\CallbackController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php",
        "line": 566,
        "function": "runInScope",
        "class": "OC\\Files\\Lock\\LockManager",
        "type": "->",
        "args": [
          [
            "OCP\\Files\\Lock\\LockContext"
          ],
          [
            "Closure"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "track",
        "class": "OCA\\Onlyoffice\\Controller\\CallbackController",
        "type": "->",
        "args": [
          "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJtYXJpZWFtZWxpZS5lc3RhZ2VyQGFsaXhpb2FjdGl2LmZyIiwib3duZXJJZCI6Ikdyb3VwQWxpeGlvQWN0aXYiLCJmaWxlSWQiOjYyNzg0MTEyLCJmaWxlUGF0aCI6Ii9QYXJ0YWdlIEFsaXhpbyBBY3Rpdi9NaXNzaW9uIE1JUlZPRy9Db2RlcyBIT0dBTi54bHN4Iiwic2hhcmVUb2tlbiI6bnVsbCwiYWN0aW9uIjoidHJhY2sifQ.ZdsRqfaP1TFA3TfKrCACrlilavkpTwz4Y5URl1uAyz0",
          [
            "oc6xz1h8l8n2_marie"
          ],
          "1196197979",
          2,
          "http://10.0.0.14:8080/cache/files/data/1196197979_1881/output.xlsx/output.xlsx?md5=wkk4UjlDZbVaEFkI5CSvjw&expires=1698491037&filename=output.xlsx",
          "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxMTk2MTk3OTc5Iiwic3RhdHVzIjoyLCJ1cmwiOiJodHRwczovL2Nsb3VkLmFudmVvbC5mci9vbmx5b2ZmaWNlL2NhY2hlL2ZpbGVzL2RhdGEvMTE5NjE5Nzk3OV8xODgxL291dHB1dC54bHN4L291dHB1dC54bHN4P21kNT13a2s0VWpsRFpiVmFFRmtJNUNTdmp3JmV4cGlyZXM9MTY5ODQ5MTAzNyZmaWxlbmFtZT1vdXRwdXQueGxzeCIsImNoYW5nZXN1cmwiOiJodHRwczovL2Nsb3VkLmFudmVvbC5mci9vbmx5b2ZmaWNlL2NhY2hlL2ZpbGVzL2RhdGEvMTE5NjE5Nzk3OV8xODgxL2NoYW5nZXMuemlwL2NoYW5nZXMuemlwP21kNT1sSmNjdmd4S0x6eUE5N0hxeHVpbmtRJmV4cGlyZXM9MTY5ODQ5MTAzNyZmaWxlbmFtZT1jaGFuZ2VzLnppcCIsImhpc3RvcnkiOnsic2VydmVyVmVyc2lvbiI6IjcuNS4wIiwiY2hhbmdlcyI6W3siY3JlYXRlZCI6IjIwMjMtMTAtMjggMTA6NDA6MjciLCJ1c2VyIjp7ImlkIjoib2M2eHoxaDhsOG4yX21hcmllYW1lbGllLmVzdGFnZXJAYWxpeGlvYWN0aXYuZnIiLCJuYW1lIjoiTWFyaWUtQW3DqWxpZSBFU1RBR0VSIn19XX0sInVzZXJzIjpbIm9jNnh6MWg4bDhuMl9tYXJpZWFtZWxpZS5lc3RhZ2VyQGFsaXhpb2FjdGl2LmZyIl0sImFjdGlvbnMiOlt7InR5cGUiOjAsInVzZXJpZCI6Im9jNnh6MWg4bDhuMl9tYXJpZWFtZWxpZS5lc3RhZ2VyQGFsaXhpb2FjdGl2LmZyIn1dLCJsYXN0c2F2ZSI6IjIwMjMtMTAtMjhUMTA6NDI6MTQuMDAwWiIsIm5vdG1vZGlmaWVkIjp0cnVlLCJmaWxldHlwZSI6Inhsc3giLCJpYXQiOjE2OTg0OTAxMzYsImV4cCI6MTY5ODQ5MDQzNn0.khxWRgNu28561dXO7ZJDsES3tHws2hbeESebOVvr4QY",
          [
            "7.5.0",
            [
              [
                "2023-10-28 10:40:27",
                [
                  "oc6xz1h8l8n2_marie",
                  "Marie-Amélie ESTAGER"
                ]
              ]
            ]
          ],
          "https://cloud.anveol.fr/onlyoffice/cache/files/data/1196197979_1881/changes.zip/changes.zip?md5=lJccvgxKLzyA97HqxuinkQ&expires=1698491037&filename=changes.zip",
          null,
          [
            [
              0,
              "oc6xz1h8l8n2_marie"
            ]
          ],
          "xlsx"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Onlyoffice\\Controller\\CallbackController"
          ],
          "track"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Onlyoffice\\Controller\\CallbackController"
          ],
          "track"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Onlyoffice\\Controller\\CallbackController",
          "track",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "onlyoffice.callback.track"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1062,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/onlyoffice/track"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
    "Line": 284,
    "CustomMessage": "--"
  },
  "id": "653d03f2f0d8a"
}
lukaszsobala commented 10 months ago

I have the same problem on v27.1.3, I tried the News app but after adding a couple of feeds and marking all articles as read the feeds disappeared. I can't even remove them, this is the result when I try:

ncc news:feed:delete userid_changed 2

In ServiceNotFoundException.php line 31:

  Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*news_feeds` WHERE (user_id = :user_id) AND (id = :id)";

In QBMapper.php line 283:

  Did expect one result but found none when executing: query "SELECT * FROM `*PREFIX*news_feeds` WHERE (user_id = :user_id) AND (id = :id)";

news:feed:delete <user-id> <feed-id>

this happens for every ID.

solracsf commented 9 months ago

@lukaszsobala this is not the same problem, report to https://github.com/nextcloud/news

AndyXheli commented 8 months ago

Hi all just seen this error on NC 28.0.1 @szaimen can you please update the tag to also reflect 28-feedback

{"reqId":"FgbBuTFpl2rUhudfNB6o","level":3,"time":"2023-12-21T14:48:25-06:00","remoteAddr":"5.7.2.12","user":"admin","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/admin/InstantUpload/Camera/20231221_080234.jpg","message":"Exception thrown: OCP\\AppFramework\\Db\\DoesNotExistException","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.26.0","version":"28.0.1.1","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","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/files_versions/lib/Db/VersionsMapper.php","line":76,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":253,"function":"findVersionForFileId","class":"OCA\\Files_Versions\\Db\\VersionsMapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Versions/VersionManager.php","line":152,"function":"updateVersionEntity","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":232,"function":"updateVersionEntity","class":"OCA\\Files_Versions\\Versions\\VersionManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":106,"function":"post_write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":109,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":479,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":404,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":370,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":283,"CustomMessage":"Exception thrown: OCP\\AppFramework\\Db\\DoesNotExistException"},"id":"6584b457d7e41"}
INNER-FIRE commented 8 months ago

I manually insert data to oc_maps_photos, and finally the picture appeared on the map。

I achieved this through the following steps.

Log file show Sql no result;

I check this table find it is empty, so I insert some date into the table.

mysql> desc oc_maps_photos; +------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | user_id | varchar(64) | NO | MUL | NULL | | | file_id | bigint(20) | NO | MUL | NULL | | | lat | double | YES | | NULL | | | lng | double | YES | | NULL | | | date_taken | bigint(20) | YES | MUL | NULL | | +------------+-------------+------+-----+---------+----------------+ insert into oc_maps_photos values (1,"user",5647,30.285132078529003,99.54701185226442,null);

  1. Use filename to get fileid from table oc_filecache

select fileid , path from oc_filecache where name = '5ee282d30ca5cc73.jpg'; +--------+-------------------------------------------------+ | fileid | path | +--------+-------------------------------------------------+ | 5647 | files/Photos/5ee282d30ca5cc73.jpg |

  1. Lat, Lng are from logfile.

["/Photos/5ee282d30ca5cc73.jpg"],[30.285132078529003],[99.54701185226442]]},

After insert data, the picture appeared on the map.

It seems that no data is inserted after clicking to upload the image.

Asteliks commented 8 months ago

Same here Server OS: TrueNas Scale Nextcloud distribution: Truecharts

{"reqId":"LE6LwGXe7WFtA6Ut89Po","level":3,"time":"2023-12-24T22:23:26+01:00","remoteAddr":"85.221.137.70","user":"DEMV","app":"no app in context","method":"MOVE","url":"/remote.php/dav/uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","version":"27.1.3.2","exception":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*files_versions` WHERE (`file_id` = :dcValue1) AND (`timestamp` = :dcValue2)\"; ","Code":0,"Trace":[{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":361,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[["OC\\DB\\QueryBuilder\\QueryBuilder"]]},{"file":"/var/www/html/apps/files_versions/lib/Db/VersionsMapper.php","line":78,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[["OC\\DB\\QueryBuilder\\QueryBuilder"]]},{"file":"/var/www/html/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":238,"function":"findVersionForFileId","class":"OCA\\Files_Versions\\Db\\VersionsMapper","type":"->","args":[271404,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_versions/lib/Versions/VersionManager.php","line":153,"function":"updateVersionEntity","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php","line":238,"function":"updateVersionEntity","class":"OCA\\Files_Versions\\Versions\\VersionManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php","line":112,"function":"post_write_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"],"OCP\\Files\\Events\\Node\\NodeWrittenEvent",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"],["Closure"],["Closure"],["Closure"]],"OCP\\Files\\Events\\Node\\NodeWrittenEvent",["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"],"OCP\\Files\\Events\\Node\\NodeWrittenEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Files\\Events\\Node\\NodeWrittenEvent",["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/Files/Node/HookConnector.php","line":121,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCP\\Files\\Events\\Node\\NodeWrittenEvent"]]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":105,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->","args":[["/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":472,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_write",["/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":398,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[true]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":307,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":133,"function":"copyNode","class":"Sabre\\DAV\\Tree","type":"->","args":[["OCA\\DAV\\Upload\\FutureFile"],["OCA\\DAV\\Connector\\Sabre\\Directory"],"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":163,"function":"copy","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","files/DEMV/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":94,"function":"move","class":"Sabre\\DAV\\Tree","type":"->","args":["uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","files/DEMV/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]},{"file":"/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php","line":76,"function":"performMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","files/DEMV/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMove","class":"OCA\\DAV\\Upload\\ChunkingPlugin","type":"->","args":["uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","files/DEMV/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":603,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMove",["uploads/DEMV/web-file-upload-875c97ad97a81e42967b4ae699a47b08-1703451766215/.file","files/DEMV/zdjecia/2022/2022.06 - Różne/20220605_112011.mp4"]]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:MOVE",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":365,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","Line":283,"CustomMessage":"--"},"id":"6588a14ed101c"}
colonelm commented 8 months ago

Facing same issue Nextcloud (27.1.4) ; Versions - 1.20.0; Group folders 15.3.2 (It is related to Group Folder and Version as user files there is no issues)

The entries are not created in oc_files_versions for corresponding entries in oc_filescache in the case of group folder.

[webdav] Error: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT FROM `PREFIX*files_versionsWHERE (file_id= :dcValue1) AND (timestamp` = :dcValue2)"; at <>

hujiko commented 7 months ago

I have the same in 28.0.1 and I was wondering:

As far as I understood, this happens, when a file exists, but does not have any entry in the versions table. (So I assume the expected state is, that every file existing has at least 1 version record?)

Until this is fixed, is there maybe a workaround possible, like:

Just, so that I / we can keep the error log clean / tidy to be able to spot unexpected errors?

camouflage81 commented 3 months ago

I no longer have this issue (NC 28.0.5). Has it been fixed?

alphasixtyfive commented 3 months ago

I no longer have this issue (NC 28.0.5). Has it been fixed?

I still see this on 28.0.5

svenb1234 commented 3 months ago

In my case this happens to pictures that get updated on a client, e.g. tag added, and then that new version gets uploaded to the server.

rchaconmolero commented 2 months ago

Same problem in 28.0.6.

alphasixtyfive commented 2 months ago

Still on 29.0.2

mighty-services commented 1 week ago

same here on nextcloud v29.0.4 in a docker-deployment. I am NOT using the Nextcloud AIO docker repo, but the normal docker repo. Since several people have issues with it, I don't think the repo itself is to blame. I don't get any error besides that in my log as well.