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

[Bug]: no app in context / DoesNotExistException #46207

Open
5 of 8 tasks
vandman opened this issue Jun 30, 2024 · 1 comment
Open
5 of 8 tasks

[Bug]: no app in context / DoesNotExistException #46207

vandman opened this issue Jun 30, 2024 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug

Comments

@vandman
Copy link

vandman commented Jun 30, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Lots of error in 1 week

image
image

Steps to reproduce

No Step, I just see it in my logs???
I think it is linked with file versionning.

DoesNotExistException Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*files_versions WHERE (file_id = :dcValue1) AND (timestamp = :dcValue2)";

Expected behavior

Nothing in logs

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Other

Database engine version

MariaDB

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

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nc.nikolov.fr",
            "nc.desmeloizes.fr"
        ],
        "blacklisted_files": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db",
            "@eaDir"
        ],
        "maintenance_window_start": 1,
        "activity_expire_days": 14,
        "dbtype": "mysql",
        "version": "28.0.5.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "onlyoffice": {
            "DocumentServerUrl": "\/oo\/",
            "DocumentServerInternalUrl": "http:\/\/oo-document\/",
            "StorageUrl": "https:\/\/nc.nikolov.fr\/"
        },
        "allow_local_remote_servers": true,
        "maintenance": false,
        "theme": "",
        "updater.release.channel": "stable",
        "encryption.legacy_format_support": false,
        "auth.bruteforce.protection.enabled": true,
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "app_install_overwrite": [
            "dicomviewer",
            "ocr",
            "radio",
            "camerarawpreviews",
            "joplin"
        ],
        "default_language": "fr",
        "default_phone_region": "FR",
        "default_locale": "fr_FR",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Illustrator",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOffice2007",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\Postscript",
            "OC\\Preview\\StarOffice",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Font"
        ],
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "preview_max_scale_factor": 1,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.nikolov.fr",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379",
            "timeout": 0
        },
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": false,
                "verify_peer_name": false
            }
        },
        "trashbin_retention_obligation": "auto, 60",
        "versions_retention_obligation": "auto, 30",
        "remember_login_cookie_lifetime": "18000",
        "objectstore": {
            "class": "\\OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "nextcloud",
                "autocreate": true,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "hostname": "s3.nikolov.fr",
                "port": 443,
                "use_ssl": true,
                "region": "fr-paris-07",
                "use_path_style": true
            }
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "log_type": "file",
        "loglevel": 2,
        "logdateformat": "Y-m-d H:i:s",
        "log_rotate_size": 104857600,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "log_type_audit": "file",
        "logfile_audit": "\/var\/www\/html\/data\/audit.log",
        "jpeg_quality": "60"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - analytics: 4.14.0
  - announcementcenter: 6.8.1
  - assistant: 1.1.0
  - auto_groups: 1.5.3
  - bruteforcesettings: 2.8.0
  - calendar: 4.7.8
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.3
  - dicomviewer: 2.1.2
  - event_update_notification: 2.4.0
  - federatedfilesharing: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_mindmap: 0.0.30
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_retention: 1.17.2
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - forms: 4.2.4
  - groupfolders: 16.0.7
  - integration_openai: 2.0.3
  - integration_openproject: 2.6.3
  - limit_login_to_ip: 4.1.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - mail: 3.7.2
  - music: 2.0.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - polls: 7.1.2
  - previewgenerator: 5.5.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recognize: 6.1.1
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.8
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - sharepoint: 1.16.0
  - socialsharing_email: 3.1.0
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - tasks: 0.16.0
  - text: 3.9.1
  - theming: 2.3.0
  - translate: 2.1.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_webauthn: 1.4.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflow_pdf_converter: 1.13.0
  - workflowengine: 2.10.0
Disabled:
  - encryption: 2.16.0
  - federation: 1.18.0 (installed 1.10.1)
  - files_antivirus: 5.5.5 (installed 5.5.5)
  - onlyoffice: 9.2.2 (installed 9.2.2)
  - piwik: 0.12.0 (installed 0.12.0)
  - support: 1.11.1 (installed 1.3.0)
  - twofactor_totp: 10.0.0-beta.2
  - unsplash: 2.2.1 (installed 2.2.1)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
  "reqId": "7qkkxlxJgcgQ9yOmtegp",
  "level": 3,
  "time": "2024-06-30T07:09:32+00:00",
  "remoteAddr": "2a01:cb00:6a:3c00:a43c:d586:be3e:a5c4",
  "user": "isabelle",
  "app": "no app in context",
  "method": "MOVE",
  "url": "/remote.php/dav/uploads/isabelle/2666692879/.file",
  "message": "Exception thrown: OCP\\AppFramework\\Db\\DoesNotExistException",
  "userAgent": "Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
  "version": "28.0.5.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/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": 77,
        "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": 277,
        "function": "findVersionForFileId",
        "class": "OCA\\Files_Versions\\Db\\VersionsMapper",
        "type": "->",
        "args": [
          435997,
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/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/html/apps/files_versions/lib/Listener/FileEventsListener.php",
        "line": 233,
        "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": 106,
        "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": 230,
        "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": 59,
        "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/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": 109,
        "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": [
          [
            "/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
        "line": 479,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::",
        "args": [
          "OC_Filesystem",
          "post_write",
          [
            "/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
        "line": 404,
        "function": "emitPostHooks",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->",
        "args": [
          true
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 148,
        "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": 325,
        "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": 151,
        "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": 181,
        "function": "copy",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "uploads/isabelle/2666692879/.file",
          "files/isabelle/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 94,
        "function": "move",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "uploads/isabelle/2666692879/.file",
          "files/isabelle/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 76,
        "function": "performMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/isabelle/2666692879/.file",
          "files/isabelle/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "beforeMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/isabelle/2666692879/.file",
          "files/isabelle/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 603,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "beforeMove",
          [
            "uploads/isabelle/2666692879/.file",
            "files/isabelle/Documents/ISABELLE/Backup new order/Cloud Commercial/Dossier Clients/2019/McVITIES/4_Reco/old/mcvities-déroulé copie 3.pptx"
          ]
        ]
      },
      {
        "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": 373,
        "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": "Exception thrown: OCP\\AppFramework\\Db\\DoesNotExistException"
  },
  "id": "668105c6c088d"
}

Additional info

No response

@vandman vandman added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 30, 2024
@joshtrichards
Copy link
Member

Related: #41174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug
Projects
None yet
Development

No branches or pull requests

3 participants