nextcloud / server

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

[Bug]: OCP\Files\NotFoundException: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_6a00bfb3.publicKey existing mounts: #32194

Open AndyXheli opened 2 years ago

AndyXheli commented 2 years ago

⚠️ This issue respects the following points: ⚠️

Bug description

Upgraded from 23.0.4 to NC 24.0.0 RC2

Steps to reproduce

NA

Expected behavior

NA

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MySQL

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 Enabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.0.78",
            "cloud.kb.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.kb.com",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "24.0.0.10",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trashbin_retention_obligation": "auto",
        "versions_retention_obligation": "auto,1",
        "has_internet_connection": true,
        "cron_log": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0
        },
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "updater.release.channel": "beta",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "default_phone_region": "US",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "encryption.legacy_format_support": false,
        "app_install_overwrite": [
            "twofactor_admin",
            "ojsxc",
            "twofactor_totp"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - admin_audit: 1.14.0
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - encryption: 2.12.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - impersonate: 1.11.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - officeonline: 1.1.3
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_admin: 3.2.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_totp: 6.3.0-beta.1
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - circles: 23.0.0
  - user_ldap

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"5bP3UR0qZ6clLufUEcpl","level":3,"time":"2022-04-27T17:13:00+00:00","remoteAddr":"1.1.1.1","user":"admin","app":"no app in context","method":"GET","url":"/apps/files/","message":"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_6a00bfb3.publicKey existing mounts: ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36","version":"24.0.0.10","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_6a00bfb3.publicKey existing mounts: ","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":320,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1162,"function":"resolvePath","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":552,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php","line":269,"function":"file_exists","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php","line":229,"function":"getKey","class":"OC\\Encryption\\Keys\\Storage","type":"->"},{"file":"/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php","line":121,"function":"getKeyWithUid","class":"OC\\Encryption\\Keys\\Storage","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":614,"function":"getSystemUserKey","class":"OC\\Encryption\\Keys\\Storage","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":170,"function":"getPublicShareKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Users/Setup.php","line":62,"function":"validateShareKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/AppInfo/Application.php","line":55,"function":"setupSystem","class":"OCA\\Encryption\\Users\\Setup","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/appinfo/app.php","line":37,"function":"setUp","class":"OCA\\Encryption\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":305,"args":["/var/www/nextcloud/apps/encryption/appinfo/app.php"],"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":186,"function":"requireAppFile","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":140,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":325,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":370,"function":"setupRoot","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Mount/Manager.php","line":95,"function":"setupForPath","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1386,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":205,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":72,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":149,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":141,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/officeonline/lib/WOPI/DiscoveryManager.php","line":58,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"function":"__construct","class":"OCA\\Officeonline\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":89,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":89,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":89,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":108,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":116,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":437,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/apps/officeonline/lib/AppInfo/Application.php","line":142,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/apps/officeonline/appinfo/app.php","line":63,"function":"updateCSP","class":"OCA\\Officeonline\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":305,"args":["/var/www/nextcloud/apps/officeonline/appinfo/app.php"],"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":186,"function":"requireAppFile","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":140,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/AppInfo/Application.php","line":177,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":190,"function":"boot","class":"OCA\\DAV\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":207,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":140,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1003,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Mount/Manager.php","Line":118,"CustomMessage":"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_6a00bfb3.publicKey existing mounts: "},"id":"62697b89bdf0e"}

Additional info

No response

susobaco commented 2 years ago

Same problem in nextcloud 24.0.2 on debian buyselle.

BMiZEL commented 2 years ago

Same problem in nextcloud 24.0.2 on debian buyselle.

and me... can we please fix this?

vvoitiuk commented 2 years ago

Confirmed on Ubuntu 20.04 + nextcloud snap version 24.0.1

zanonz commented 2 years ago

Confirmed TrueNas Scale official App 24.0.2_1.6.5 also having same issue.

BMiZEL commented 2 years ago

After updating to 24.0.3 it looks like the problem is solved... Debian 11 Bullseye

AndyXheli commented 2 years ago

Can anyone else confirm this before I close out this issue ?

zanonz commented 2 years ago

Can anyone else confirm this before I close out this issue ?

Once docker patch is released I will update

Compr0mzd commented 2 years ago

After updating to last version I still have the same issue Version 24.0.3 no app in context | OCP\Files\NotFoundException: No mount for path /keys/.oc_key_storage existing mounts: I changed the folder that contains the keys the same way as in the documentation to test it out.

nunesgh commented 2 years ago

Same issue here. Nextcloud version: 24.0.3 PHP version: 7.4.30 MariaDB version: 10.5.15

nunesgh commented 2 years ago

Logs for some additional and possibly related errors:

[PHP] Error: Error: Trying to access array offset on value of type bool at /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#441 at <<closure>>

 0. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php line 441
    OC\Log\ErrorHandler::onError()
 1. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_antivirus/lib/AvirWrapper.php line 75
    OC\Files\Storage\Wrapper\Encryption->fopen()
 2. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 301
    OCA\Files_Antivirus\AvirWrapper->fopen()
 3. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php line 236
    OC\Files\Storage\Wrapper\Wrapper->fopen()
 4. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php line 317
    OCA\FilesAccessControl\StorageWrapper->fopen()
 5. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php line 817
    OCA\RansomwareProtection\StorageWrapper->fopen()
 6. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php line 656
    OC\Files\Storage\Wrapper\Encryption->copyBetweenStorage()
 7. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 595
    OC\Files\Storage\Wrapper\Encryption->moveFromStorage()
 8. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 595
    OC\Files\Storage\Wrapper\Wrapper->moveFromStorage()
 9. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Storage.php line 239
    OC\Files\Storage\Wrapper\Wrapper->moveFromStorage()
10. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php line 311
    OCA\Files_Trashbin\Storage->moveFromStorage()
11. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php line 593
    OCA\FilesAccessControl\StorageWrapper->moveFromStorage()
12. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Trashbin.php line 323
    OCA\RansomwareProtection\StorageWrapper->moveFromStorage()
13. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php line 107
    OCA\Files_Trashbin\Trashbin::move2trash()
14. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 102
    OCA\Files_Trashbin\Trash\LegacyTrashBackend->moveToTrash()
15. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Storage.php line 202
    OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
16. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_trashbin/lib/Storage.php line 102
    OCA\Files_Trashbin\Storage->doDelete()
17. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php line 195
    OCA\Files_Trashbin\Storage->unlink()
18. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php line 263
    OCA\FilesAccessControl\StorageWrapper->unlink()
19. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/View.php line 1177
    OCA\RansomwareProtection\StorageWrapper->unlink()
20. /***REMOVED SENSITIVE VALUE***/nextcloud/lib/private/Files/View.php line 733
    OC\Files\View->basicOperation()
21. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 523
    OC\Files\View->unlink()
22. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
23. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
24. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
25. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
26. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
27. /***REMOVED SENSITIVE VALUE***/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
28. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/dav/lib/Server.php line 352
    Sabre\DAV\Server->exec()
29. /***REMOVED SENSITIVE VALUE***/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
30. /***REMOVED SENSITIVE VALUE***/nextcloud/remote.php line 166
    require_once("/***REMOVED SENSITIVE VALUE***/nextcl ... p")

DELETE /remote.php/dav/***REMOVED SENSITIVE VALUE***
from ***REMOVED SENSITIVE VALUE*** by ***REMOVED SENSITIVE VALUE*** at 2022-07-19T19:17:43-03:00
[no app in context] Error: Could not find mount point, can't keep encryption keys

DELETE /remote.php/dav/***REMOVED SENSITIVE VALUE***
from ***REMOVED SENSITIVE VALUE*** by ***REMOVED SENSITIVE VALUE*** at 2022-07-19T19:17:43-03:00
cenap commented 2 years ago

No! Problem is not solved. I still receive the error with version 24.0.3,

BMiZEL commented 2 years ago

what PHP version is everyone using? I'm on 8.1 and it worked.

Compr0mzd commented 2 years ago

what PHP version is everyone using? I'm on 8.1 and it worked.

8.0 as recommended in Nextcloud Doc

nunesgh commented 2 years ago

I can confirm the files are being deleted from the external storage, even though the errors I have reported on https://github.com/nextcloud/server/issues/32194#issuecomment-1189753153 are still being logged.

archnemeziz commented 2 years ago

Confirmed having the same issue on the latest versions: NC 24.0.3.2 PHP 8.1.2 MariaDB 10.6.7 Ubuntu 22.04

Error logs were triggered when trying to delete a guest user. NC also gave an error that the user could not be deleted, although after refreshing the page the user was indeed deleted.

Sawaya-ui commented 2 years ago

Same issue here. Nextcloud version: 24.0.4 PHP version: 8.1.x MariaDB version: 10.5.15-MariaDB-0+deb11u1 Debian 11

Compr0mzd commented 2 years ago

No one seems interested in fixing the issue but they rather fix the "gender neutral translations". Great priority

rererecursive commented 1 year ago

We just experienced this when upgrading from 22 -> 23 -> 24.0.4.

PVince81 commented 1 year ago

not sure if directly related, please try reverting https://github.com/nextcloud/server/pull/32690 and see if it solves the issue

max-nextcloud commented 1 year ago

I just had a look at logs from a nextcloud instance that reported this.

Backtrace of the error message

Here's a full trace as that usually makes investigating the issue far easier:

full trace ```json {{ "reqId": "...", "level": 3, "time": "2022-06-21T20:17:25+00:00", "remoteAddr": "1.2.3.4", "user": "--", "app": "no app in context", "method": "GET", "url": "/boaform/admin/formLogin", "message": "App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: ", "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0", "version": "24.0.2.1", "exception": { "Exception": "OCP\\Files\\NotFoundException", "Message": "No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: ", "Code": 0, "Trace": [ { "file": "/var/www/nextcloud/lib/private/Files/Filesystem.php", "line": 320, "function": "find", "class": "OC\\Files\\Mount\\Manager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 1162, "function": "resolvePath", "class": "OC\\Files\\Filesystem", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 552, "function": "basicOperation", "class": "OC\\Files\\View", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 269, "function": "file_exists", "class": "OC\\Files\\View", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 229, "function": "getKey", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 121, "function": "getKeyWithUid", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/KeyManager.php", "line": 614, "function": "getSystemUserKey", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/KeyManager.php", "line": 170, "function": "getPublicShareKey", "class": "OCA\\Encryption\\KeyManager", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/Users/Setup.php", "line": 62, "function": "validateShareKey", "class": "OCA\\Encryption\\KeyManager", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/AppInfo/Application.php", "line": 55, "function": "setupSystem", "class": "OCA\\Encryption\\Users\\Setup", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/appinfo/app.php", "line": 37, "function": "setUp", "class": "OCA\\Encryption\\AppInfo\\Application", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 305, "args": [ "/var/www/nextcloud/apps/encryption/appinfo/app.php" ], "function": "require_once" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 186, "function": "requireAppFile", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 140, "function": "loadApp", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 325, "function": "loadApps", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 370, "function": "setupRoot", "class": "OC\\Files\\SetupManager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Mount/Manager.php", "line": 95, "function": "setupForPath", "class": "OC\\Files\\SetupManager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 1386, "function": "find", "class": "OC\\Files\\Mount\\Manager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/Root.php", "line": 205, "function": "getFileInfo", "class": "OC\\Files\\View", "type": "->" }, { "function": "get", "class": "OC\\Files\\Node\\Root", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php", "line": 72, "function": "call_user_func_array" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php", "line": 149, "function": "__call", "class": "OC\\Files\\Node\\LazyFolder", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/AppData/AppData.php", "line": 141, "function": "get", "class": "OC\\Files\\Node\\LazyFolder", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php", "line": 88, "function": "getFolder", "class": "OC\\Files\\AppData\\AppData", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php", "line": 123, "function": "process", "class": "OC\\Template\\JSCombiner", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php", "line": 76, "function": "cacheAndAppendCombineJsonIfExist", "class": "OC\\Template\\JSResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/ResourceLocator.php", "line": 78, "function": "doFind", "class": "OC\\Template\\JSResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/TemplateLayout.php", "line": 377, "function": "find", "class": "OC\\Template\\ResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/TemplateLayout.php", "line": 205, "function": "findJavascriptFiles", "class": "OC\\TemplateLayout", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php", "line": 185, "function": "__construct", "class": "OC\\TemplateLayout", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/Base.php", "line": 132, "function": "fetchPage", "class": "OC_Template", "type": "->" }, { "file": "/var/www/nextcloud/lib/base.php", "line": 802, "function": "printPage", "class": "OC\\Template\\Base", "type": "->" }, { "file": "/var/www/nextcloud/lib/base.php", "line": 1104, "function": "init", "class": "OC", "type": "::" }, { "file": "/var/www/nextcloud/index.php", "line": 34, "args": [ "/var/www/nextcloud/lib/base.php" ], "function": "require_once" } ], "File": "/var/www/nextcloud/lib/private/Files/Mount/Manager.php", "Line": 118, "CustomMessage": "App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: " } } "reqId": "YQ91qHHCsuhfKe4TCIxG", "level": 3, "time": "2022-06-21T20:17:25+00:00", "remoteAddr": "104.217.249.182", "user": "--", "app": "no app in context", "method": "GET", "url": "/boaform/admin/formLogin", "message": "App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: ", "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0", "version": "24.0.2.1", "exception": { "Exception": "OCP\\Files\\NotFoundException", "Message": "No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: ", "Code": 0, "Trace": [ { "file": "/var/www/nextcloud/lib/private/Files/Filesystem.php", "line": 320, "function": "find", "class": "OC\\Files\\Mount\\Manager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 1162, "function": "resolvePath", "class": "OC\\Files\\Filesystem", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 552, "function": "basicOperation", "class": "OC\\Files\\View", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 269, "function": "file_exists", "class": "OC\\Files\\View", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 229, "function": "getKey", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php", "line": 121, "function": "getKeyWithUid", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/KeyManager.php", "line": 614, "function": "getSystemUserKey", "class": "OC\\Encryption\\Keys\\Storage", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/KeyManager.php", "line": 170, "function": "getPublicShareKey", "class": "OCA\\Encryption\\KeyManager", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/Users/Setup.php", "line": 62, "function": "validateShareKey", "class": "OCA\\Encryption\\KeyManager", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/lib/AppInfo/Application.php", "line": 55, "function": "setupSystem", "class": "OCA\\Encryption\\Users\\Setup", "type": "->" }, { "file": "/var/www/nextcloud/apps/encryption/appinfo/app.php", "line": 37, "function": "setUp", "class": "OCA\\Encryption\\AppInfo\\Application", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 305, "args": [ "/var/www/nextcloud/apps/encryption/appinfo/app.php" ], "function": "require_once" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 186, "function": "requireAppFile", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_App.php", "line": 140, "function": "loadApp", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 325, "function": "loadApps", "class": "OC_App", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 370, "function": "setupRoot", "class": "OC\\Files\\SetupManager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Mount/Manager.php", "line": 95, "function": "setupForPath", "class": "OC\\Files\\SetupManager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/View.php", "line": 1386, "function": "find", "class": "OC\\Files\\Mount\\Manager", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/Root.php", "line": 205, "function": "getFileInfo", "class": "OC\\Files\\View", "type": "->" }, { "function": "get", "class": "OC\\Files\\Node\\Root", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php", "line": 72, "function": "call_user_func_array" }, { "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php", "line": 149, "function": "__call", "class": "OC\\Files\\Node\\LazyFolder", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Files/AppData/AppData.php", "line": 141, "function": "get", "class": "OC\\Files\\Node\\LazyFolder", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php", "line": 88, "function": "getFolder", "class": "OC\\Files\\AppData\\AppData", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php", "line": 123, "function": "process", "class": "OC\\Template\\JSCombiner", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php", "line": 76, "function": "cacheAndAppendCombineJsonIfExist", "class": "OC\\Template\\JSResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/ResourceLocator.php", "line": 78, "function": "doFind", "class": "OC\\Template\\JSResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/TemplateLayout.php", "line": 377, "function": "find", "class": "OC\\Template\\ResourceLocator", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/TemplateLayout.php", "line": 205, "function": "findJavascriptFiles", "class": "OC\\TemplateLayout", "type": "::" }, { "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php", "line": 185, "function": "__construct", "class": "OC\\TemplateLayout", "type": "->" }, { "file": "/var/www/nextcloud/lib/private/Template/Base.php", "line": 132, "function": "fetchPage", "class": "OC_Template", "type": "->" }, { "file": "/var/www/nextcloud/lib/base.php", "line": 802, "function": "printPage", "class": "OC\\Template\\Base", "type": "->" }, { "file": "/var/www/nextcloud/lib/base.php", "line": 1104, "function": "init", "class": "OC", "type": "::" }, { "file": "/var/www/nextcloud/index.php", "line": 34, "args": [ "/var/www/nextcloud/lib/base.php" ], "function": "require_once" } ], "File": "/var/www/nextcloud/lib/private/Files/Mount/Manager.php", "Line": 118, "CustomMessage": "App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_75aa93fb.publicKey existing mounts: " } } ```

URLs that trigger this

I also analyzed the urls that would trigger this error. Many of them seemed like they were triggered by scans for vulnerabilities:

sample of urls ``` 17 "/db/phpMyAdmin3/index.php?lang=en" 17 "/db/phpmyadmin4/index.php?lang=en" 17 "/db/phpMyAdmin-4/index.php?lang=en" 17 "/db/phpmyadmin5/index.php?lang=en" 17 "/db/phpMyAdmin-5/index.php?lang=en" 17 "/db/phpmyadmin/index.php?lang=en" 17 "/db/phpMyAdmin/index.php?lang=en" 17 "/db/webadmin/index.php?lang=en" 17 "/db/webdb/index.php?lang=en" 17 "/db/websql/index.php?lang=en" 3 "/debug.cgi" 1 "/debug/default/view" 1 "/debug/default/view.html" 5 "/debug/default/view?panel=config" 2 "/default.aspx" 1 "/default.cfm" 1 "/default.cgi" 1 "/default.jhtml" 1 "/default.jsp" 2 "/default.php" 1 "/default.shtml" ... ```
command used ```bash rg "publicKey existing mounts:" nextcloud.log | jq '.url' | sort | uniq -c ```
max-nextcloud commented 1 year ago

The file that is mentioned in the error message does exist in the case i am investigating. Looks like it's a matter of load order / mount point initialization.

max-nextcloud commented 1 year ago

All errors have exactly the same message and no user and no app in context. So looks like it's always looking for the same file and only happens pre-auth.

max-nextcloud commented 1 year ago

The second trace looks like https://github.com/nextcloud/server/blob/stable24/lib/private/Files/Storage/Wrapper/Encryption.php#L435 returns false.

max-nextcloud commented 1 year ago

I've continued to investigate this. So far it looks like the requests that triggered the error were mostly without authentication. On the same instance I am seeing a lot of 403 responses on clients that try to sync. I wonder if the two are related. Anyone else observing syncing problems with clients?

max-nextcloud commented 1 year ago

I think this is happening in a codepath that is only triggered when using the encryption app with masterkey disabled. If you run into this issue - please check wether you are using encryption app and have masterkey disabled.

I'll see if i can reproduce it in that setting.

update: Could still not reproduce it. Most likely this is related to the partial file system setup that was introduced in NC24. This seems to cause some none deterministic caching issues.

samisedI commented 1 year ago

@max-nextcloud I am currently experiencing this problem, and confirm that I am using the encryption application with the master key disabled.

badtimberwolf commented 1 year ago

I am currently having this issue. I actually started a new server to use while I work the issue on my original, and somehow ended up with the same exact problem on the new one, that was freshly installed from AIO image. Various 403, the same errors when trying to move or delete files.

I do not have masterkey disabled. Everything is default and stock right out of the box from the AIO, with some apps installed, and some test files uploaded.

I may set up another AIO server and test it without any apps, then install the apps one by one and see there is an app, or combination of apps, that is causing the issue.

I am also having "no token submitted" with login failures stating "could not verify token".

Update: I disabled E2E encryption on the new AIO server, and it seems to allow deletion of files now. I am still getting other strange errors such as Error: Object of class OC\User\User could not be converted to string

Disabling E2E seems to have unlocked the files on both the new and old server. I do need E2E for our purposes, so I have to find a solution to this asap.

[no app in context] Error: OCP\Files\NotFoundException: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_XXXXXXXX.publicKey existing mounts: at <>

  1. /var/www/html/lib/private/Files/Filesystem.php line 320 OC\Files\Mount\Manager->find("/files_encrypti ... y")
  2. /var/www/html/lib/private/Files/View.php line 1172 OC\Files\Filesystem::resolvePath("/files_encrypti ... y")
  3. /var/www/html/lib/private/Files/View.php line 552 OC\Files\View->basicOperation("file_exists", "/files_encrypti ... y")
  4. /var/www/html/lib/private/Encryption/Keys/Storage.php line 269 OC\Files\View->file_exists("/files_encrypti ... y")
  5. /var/www/html/lib/private/Encryption/Keys/Storage.php line 229 OC\Encryption\Keys\Storage->getKey("/files_encrypti ... y")
  6. /var/www/html/lib/private/Encryption/Keys/Storage.php line 121 OC\Encryption\Keys\Storage->getKeyWithUid("/files_encrypti ... y", null)
  7. /var/www/html/apps/encryption/lib/KeyManager.php line 614 OC\Encryption\Keys\Storage->getSystemUserKey("pubShare_8a9d2b58.publicKey", "OC_DEFAULT_MODULE")
  8. /var/www/html/apps/encryption/lib/KeyManager.php line 170 OCA\Encryption\KeyManager->getPublicShareKey()
  9. /var/www/html/apps/encryption/lib/Users/Setup.php line 62 OCA\Encryption\KeyManager->validateShareKey()
  10. /var/www/html/apps/encryption/lib/AppInfo/Application.php line 55 OCA\Encryption\Users\Setup->setupSystem()
    1. /var/www/html/apps/encryption/appinfo/app.php line 37 OCA\Encryption\AppInfo\Application->setUp(OC\Encryption\Manager {})
    2. /var/www/html/lib/private/legacy/OC_App.php line 305 require_once("/var/www/html/a ... p")
    3. /var/www/html/lib/private/legacy/OC_App.php line 186 OC_App::requireAppFile(OCA\Encryption\AppInfo\Application {})
    4. /var/www/html/lib/private/legacy/OC_App.php line 140 OC_App::loadApp("encryption")
    5. /var/www/html/lib/private/Files/SetupManager.php line 131 OC_App::loadApps(["filesystem"])
    6. /var/www/html/lib/private/Files/SetupManager.php line 339 OC\Files\SetupManager->setupBuiltinWrappers()
    7. /var/www/html/lib/private/Files/SetupManager.php line 379 OC\Files\SetupManager->setupRoot()
    8. /var/www/html/lib/private/Files/Mount/Manager.php line 95 OC\Files\SetupManager->setupForPath("/appdata_ocymas48buvm/wopi/wopi")
    9. /var/www/html/lib/private/Files/View.php line 1396 OC\Files\Mount\Manager->find("/appdata_ocymas48buvm/wopi/wopi")
    10. /var/www/html/lib/private/Files/Node/Root.php line 205 OC\Files\View->getFileInfo("/appdata_ocymas48buvm/wopi/wopi")
    11. <> OC\Files\Node\Root->get("/appdata_ocymas48buvm/wopi/wopi")
    12. /var/www/html/lib/private/Files/Node/LazyFolder.php line 72 call_user_func_array([OC\Files\Node\Root {},"get"], ["appdata_ocymas48buvm/wopi/wopi"])
    13. /var/www/html/lib/private/Files/Node/LazyFolder.php line 149 OC\Files\Node\LazyFolder->__call("get", ["appdata_ocymas48buvm/wopi/wopi"])
    14. /var/www/html/lib/private/Files/AppData/AppData.php line 141 OC\Files\Node\LazyFolder->get("appdata_ocymas48buvm/wopi/wopi")
    15. /var/www/html/custom_apps/wopi/lib/WOPI/DiscoveryManager.php line 58 OC\Files\AppData\AppData->getFolder("wopi")
    16. <> OCA\Wopi\WOPI\DiscoveryManager->__construct(OC\Http\Client\ClientService {}, OC\Files\AppData\AppData {}, OC\AllConfig {}, OC\L10N\LazyL10N {}, OC\AppFramework\Utility\TimeFactory {})
    17. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 108 ReflectionClass->newInstanceArgs([OC\Http\Client\ ... }])
    18. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass ... "})
    19. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Wopi\WOPI\DiscoveryManager")
    20. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query("OCA\Wopi\WOPI\DiscoveryManager")
    21. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Wopi\WOPI\DiscoveryManager")
    22. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 89 OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Wopi\WOPI\DiscoveryManager", true)
    23. <> OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(" sensitive parameters replaced ")
    24. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 108 array_map(Closure {}, ["*** sensitive ... }])
    25. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass ... "})
    26. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Wopi\WOPI\Parser")
    27. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query("OCA\Wopi\WOPI\Parser")
    28. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Wopi\WOPI\Parser")
    29. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 89 OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Wopi\WOPI\Parser", true)
    30. <> OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(" sensitive parameters replaced ")
    31. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 108 array_map(Closure {}, [ReflectionParam ... "])
    32. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass ... "})
    33. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Wopi\TokenManager")
    34. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query("OCA\Wopi\TokenManager")
    35. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Wopi\TokenManager")
    36. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 89 OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Wopi\TokenManager", true)
    37. <> OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(" sensitive parameters replaced ")
    38. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 108 array_map(Closure {}, [ReflectionParam ... "])
    39. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 116 OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass ... "})
    40. /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php line 133 OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Wopi\Service\FederationService")
    41. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 465 OC\AppFramework\Utility\SimpleContainer->query("OCA\Wopi\Service\FederationService")
    42. /var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php line 437 OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Wopi\Service\FederationService")
    43. /var/www/html/custom_apps/wopi/lib/AppInfo/Application.php line 115 OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Wopi\Service\FederationService")
    44. /var/www/html/custom_apps/wopi/appinfo/app.php line 66 OCA\Wopi\AppInfo\Application->updateCSP(" sensitive parameters replaced ")
    45. /var/www/html/lib/private/legacy/OC_App.php line 305 require_once("/var/www/html/c ... p")
    46. /var/www/html/lib/private/legacy/OC_App.php line 186 OC_App::requireAppFile(OCA\Wopi\AppInfo\Application {})
    47. /var/www/html/lib/private/legacy/OC_App.php line 140 OC_App::loadApp("wopi")
    48. /var/www/html/apps/dav/lib/AppInfo/Application.php line 177 OC_App::loadApps(["dav"])
    49. /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php line 190 OCA\DAV\AppInfo\Application->boot(OC\AppFramework\Bootstrap\BootContext {})
    50. /var/www/html/lib/private/legacy/OC_App.php line 207 OC\AppFramework\Bootstrap\Coordinator->bootApp("dav")
    51. /var/www/html/lib/private/legacy/OC_App.php line 140 OC_App::loadApp("dav")
    52. /var/www/html/lib/base.php line 1010 OC_App::loadApps()
    53. /var/www/html/index.php line 36 OC::handleRequest()

POST /apps/files/api/v1/showgridview from XXX.XXX.XXX.XXX by timberwolf at 2022-11-12T11:41:27+00:00


[webdav] Fatal: OCA\DAV\Connector\Sabre\Exception\Forbidden: Client "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0" is not allowed to access end-to-end encrypted content at <>

  1. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->checkLock(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  2. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 456 Sabre\DAV\Server->emit("beforeMethod:DELETE", [Sabre\HTTP\Requ ... }])
  3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  4. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start()
  5. /var/www/html/apps/dav/lib/Server.php line 358 Sabre\DAV\Server->exec()
  6. /var/www/html/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
  7. /var/www/html/remote.php line 170 require_once("/var/www/html/a ... p")

DELETE /remote.php/dav/files/tim/Photos/Vineyard.jpg from XXX.XXX.XXX.XXX by timberwolf at 2022-11-12T11:38:16+00:00


Accessibility 1.10.0

Activity 2.16.0

Appointments 1.14.0

AppOrder 0.15.0

Approval 1.0.10

Auditing / Logging 1.14.0

Brute-force settings 2.4.0

Calendar 3.5.2

Circles 24.0.1

Client Push 0.5.0

Collabora Online - Built-in CODE Server 22.5.802

Collaborative tags 1.14.0

Comments 1.14.0

Contacts 4.2.2

Contacts Interaction 1.5.0

Dashboard 7.4.0

Deck 1.7.2

Default encryption module 2.12.0

Deleted files 1.14.0

End-to-End Encryption 1.10.0

Extract 1.3.5

Federation 1.14.0

File access control 1.14.1

File sharing 1.16.2

Files automated tagging 1.14.0

First run wizard 2.13.0

Forms 2.5.1

Impersonate 1.11.0

Log Reader 2.9.0

Monitoring 1.14.0

Nextcloud All In One 0.2.0

Nextcloud announcements 1.13.0

Nextcloud Office 6.3.1

Notifications 2.12.1

ONLYOFFICE 7.5.8

Password policy 1.14.0

Passwords 2022.11.21

PDF viewer 2.5.0

Photos 1.6.0

Privacy 1.8.0

Quota warning 1.15.0

Recommendations 1.3.0

Right click 1.3.0

Share by mail 1.14.0

Support 1.7.0

Suspicious Login 4.2.1

Talk 14.0.6

Tasks 0.14.5

Terms of service 1.10.2

Text 3.5.1

Theming 1.15.0

Two-Factor TOTP Provider 6.4.1

Two-Factor WebAuthn 0.3.3

Usage survey 1.12.0

User status 1.4.0

Versions 1.17.0

Video player 1.13.0

Weather status 1.4.0

Wopi 3.5.11

xf0e commented 1 year ago

is there any solution for nextlcoud 25?

max-nextcloud commented 1 year ago

I've continued to investigate this. So far it looks like the requests that triggered the error were mostly without authentication. On the same instance I am seeing a lot of 403 responses on clients that try to sync. I wonder if the two are related. Anyone else observing syncing problems with clients?

I found the underlying issue of the 403 errors. Some files in the filesystem where owned by root rather than www-data. I don't think this was related to the error message reported in this bug though.

However if you are seeing 403s - in particular for some specific folders, might be a good idea to check if all files in your data directory are owned by the right user. The error i debugged originated from moving the files of the data directory around as root.

icewind1991 commented 1 year ago

Can you test if https://github.com/nextcloud/server/pull/35518 fixes the "no mount for path" error?

AndyXheli commented 1 year ago

Was anyone able to test ?

AndyXheli commented 1 year ago

@icewind1991 i applied the patch on my test server ill keep an eye on my logs

PVince81 commented 1 year ago

@andyxheli is the error still appearing ?

if yes, please also check the Apache error log

while debugging I noticed that the code sometimes doesn't catch the root error/exception when setting up mounts in https://github.com/nextcloud/server/blob/v24.0.7/lib/private/Files/Mount/Manager.php#L95, so the real error message might be hidden elsewhere

AndyXheli commented 1 year ago

@PVince81 i have not be able to replicate the error on my test server that i applied the patch. can anyone help me with steps to trying to triggering the error ?

Zaxooy commented 1 year ago

Can you test if #35518 fixes the "no mount for path" error?

Since upgrading to NC 25 I have the mentioned error 1-2 times a day. I just applied your patch and will report back in a few days if the error still appears or not.

Zaxooy commented 1 year ago

Unfortunately the error still exists.

guandalf commented 1 year ago

I just realised I have this errors in the logs from August 2022 (apparently after an update from 23.0.6.1 to 24.0.3.2) but starting from yesterday I cannot access my files anymore. What happened is that I tried to change my data dir using ncp from the path where it actually was (that contained a symlink) to the same location but without the symlink, so on a new path. The ncp tool made a backup of the folder (hopefuly moving it) and I ended up without any data. I just reverted the name of the folder from ncdata-backup-blablabla to ncdata and now all my encrypted files are not decryptable anymore! What happened is that the ncp tool or nc itself overrode my master keys. Luckily I had bakups!

delorean44 commented 1 year ago

Unfortunately the error still exists.

tgoeg commented 1 year ago

I think I only see this with the built in markdown editor (and enabled encryption and LDAP/AD backend, if that matters). If I change the following:

--- /lib/private/Files/SetupManager.php.bak 2023-04-04 10:33:20.849723732 +0000
+++ /lib/private/Files/SetupManager.php 2023-04-04 11:43:06.923545148 +0000
@@ -573,6 +573,7 @@
                        'OCA\Circles\Events\DestroyingCircleEvent',
                        'OCA\Circles\Events\AddingCircleMemberEvent',
                        'OCA\Circles\Events\RemovingCircleMemberEvent',
+                       'OCA\Viewer\Event\LoadViewer'
            ];

            foreach ($genericEvents as $genericEvent)

the errors are gone. I still cannot use the editor because of OCP\Files\NotPermittedException: No delete permission for path (which is a useless error message as it lacks the path; I extended it and found it tries to delete the preview of the .md file and the FS permissions are correct) but maybe this error here is fixed at least. I am not a developer, so this might be completely wrong. However, the mounts do not get setup in my case and as there seem to be special cases where this needs to be explicitly setup, this sounded right to me. This is the error in my case:

[Tue Apr 04 11:13:27.674235 2023] [php7:notice] [pid 71747] [client 10.0.0.1:43754] {"reqId":"4yz3treWaGOTTcIeQhUS","level":3,"time":"2023-04-04T11:13:27+00:00","remoteAddr":"10.0.0.1","user":"user.name","app":"no app in context","method":"PUT","url":"/index.php/apps/text/session/create","message":"App encryption threw an error during app.php load: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_548ef744.publicKey existing mounts: "
tgoeg commented 1 year ago

Alright, it seems the "No mount path ..." error also mangles permissions in the oc_filecache table (Or not? Maybe something else caused this? Can someone affected confirm?) I first patched in a sensible error message (I am on 25.x; it seems the master branch also has the paths added to each error message, maybe 26.x has it already, as well):

--- /var/www/nextcloud.my.domain/lib/private/Files/Node/Folder.php.org2023-04-04 12:37:25.800794845 +0000
+++ /var/www/nextcloud.my.domain/lib/private/Files/Node/Folder.php  2023-04-04 12:08:22.661799131 +0000
@@ -392,7 +392,7 @@
                        $nonExisting = new NonExistingFolder($this->root, $this->view, $this->path, $fileInfo);
                        $this->sendHooks(['postDelete'], [$nonExisting]);
            } else {
-                       throw new NotPermittedException('No delete permission for path');
+                       throw new NotPermittedException('No delete permission for path ' .  $this->path);
            }
    }

If I then track entries in Apache's error log like so

tail -f /var/log/apache2/error.nextcloud.log | grep -v "eprecated"

I can see which files Nextcloud tries to delete/write. After this, issuing

update oc_filecache set permissions=permissions+8 where path like "appdata_<yourid>/preview/1/1/2/b/8/1/0/541258%";

or similar makes it magically work again.

As OP sees this with other urls than /index.php/apps/text/session/create (in my case) this might not be 100% related. I thought I'd post this nevertheless. https://github.com/nextcloud/server/pull/35518 did not fix it for me, either. I put a comment in lib/private/Files/SetupManager.php's constructor, and it does run. It's just that no function that sets up mounts is actually run.

bcutter commented 1 year ago

Seeing this too recently. Note: I had some issues with E2EE (https://github.com/nextcloud/desktop/issues/5564) and reset E2EE (including public + private key) for one user. As far as I can see this should not be related to this log entry at all, but it's the only thing I can think of.

[no app in context] Fehler: OCP\Files\NotFoundException: No mount for path /files_encryption/OC_DEFAULT_MODULE/pubShare_XXXXXXXX.publicKey existing mounts:  at <<closure>>

 0. /var/www/nextcloud/lib/private/Files/Filesystem.php line 320
    OC\Files\Mount\Manager->find()
 1. /var/www/nextcloud/lib/private/Files/View.php line 1166
    OC\Files\Filesystem::resolvePath()
 2. /var/www/nextcloud/lib/private/Files/View.php line 546
    OC\Files\View->basicOperation()
 3. /var/www/nextcloud/lib/private/Encryption/Keys/Storage.php line 269
    OC\Files\View->file_exists()
 4. /var/www/nextcloud/lib/private/Encryption/Keys/Storage.php line 229
    OC\Encryption\Keys\Storage->getKey()
 5. /var/www/nextcloud/lib/private/Encryption/Keys/Storage.php line 121
    OC\Encryption\Keys\Storage->getKeyWithUid()
 6. /var/www/nextcloud/apps/encryption/lib/KeyManager.php line 614
    OC\Encryption\Keys\Storage->getSystemUserKey()
 7. /var/www/nextcloud/apps/encryption/lib/KeyManager.php line 170
    OCA\Encryption\KeyManager->getPublicShareKey()
 8. /var/www/nextcloud/apps/encryption/lib/Users/Setup.php line 62
    OCA\Encryption\KeyManager->validateShareKey()
 9. /var/www/nextcloud/apps/encryption/lib/AppInfo/Application.php line 55
    OCA\Encryption\Users\Setup->setupSystem()
10. /var/www/nextcloud/apps/encryption/appinfo/app.php line 37
    OCA\Encryption\AppInfo\Application->setUp()
11. /var/www/nextcloud/lib/private/legacy/OC_App.php line 306
    require_once("/var/www/nextcl ... p")
12. /var/www/nextcloud/lib/private/legacy/OC_App.php line 187
    OC_App::requireAppFile()
13. /var/www/nextcloud/lib/private/legacy/OC_App.php line 141
    OC_App::loadApp()
14. /var/www/nextcloud/lib/private/Files/SetupManager.php line 132
    OC_App::loadApps()
15. /var/www/nextcloud/lib/private/Files/SetupManager.php line 340
    OC\Files\SetupManager->setupBuiltinWrappers()
16. /var/www/nextcloud/lib/private/Files/SetupManager.php line 380
    OC\Files\SetupManager->setupRoot()
17. /var/www/nextcloud/lib/private/Files/Mount/Manager.php line 95
    OC\Files\SetupManager->setupForPath()
18. /var/www/nextcloud/lib/private/Files/View.php line 1390
    OC\Files\Mount\Manager->find()
19. /var/www/nextcloud/lib/private/Files/Node/Root.php line 205
    OC\Files\View->getFileInfo()
20. <<closure>>
    OC\Files\Node\Root->get()
21. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 72
    call_user_func_array()
22. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 149
    OC\Files\Node\LazyFolder->__call()
23. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 132
    OC\Files\Node\LazyFolder->get()
24. /var/www/nextcloud/lib/private/Template/JSCombiner.php line 88
    OC\Files\AppData\AppData->getFolder()
25. /var/www/nextcloud/lib/private/Template/JSResourceLocator.php line 125
    OC\Template\JSCombiner->process()
26. /var/www/nextcloud/lib/private/Template/JSResourceLocator.php line 77
    OC\Template\JSResourceLocator->cacheAndAppendCombineJsonIfExist()
27. /var/www/nextcloud/lib/private/Template/ResourceLocator.php line 78
    OC\Template\JSResourceLocator->doFind()
28. /var/www/nextcloud/lib/private/TemplateLayout.php line 385
    OC\Template\ResourceLocator->find()
29. /var/www/nextcloud/lib/private/TemplateLayout.php line 217
    OC\TemplateLayout::findJavascriptFiles()
30. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 184
    OC\TemplateLayout->__construct()
31. /var/www/nextcloud/lib/private/Template/Base.php line 132
    OC_Template->fetchPage()
32. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 300
    OC\Template\Base->printPage()
33. /var/www/nextcloud/lib/base.php line 271
    OC_Template::printErrorPage()
34. /var/www/nextcloud/lib/base.php line 679
    OC::checkConfig()
35. /var/www/nextcloud/lib/base.php line 1145
    OC::init()
36. /var/www/nextcloud/status.php line 37
    require_once("/var/www/nextcloud/lib/base.php")

GET /status.php
from xxx.xxx.xxx.xxx by Username at 2023-04-22T16:57:55+02:00

The file itself has not been touched recently: /data/files_encryption/OC_DEFAULT_MODULE/

-rw-r--r-- 1 www-data www-data 2,4K Nov 24 2020 pubShare_XXXXXXXX.publicKey

tgoeg commented 1 year ago

Do you also see this (only) with the built-in Markdown editor? If yes, does the patch above fix it for you? Do you also get OCP\Files\NotPermittedException: No delete permission for path errors? (I have a feeling this is maybe not directly related)

bcutter commented 1 year ago

Simply using the markdown editor does not provoke this issue. I don't have the "... No delete permission for path" in latest nextcloud.log.

nunesgh commented 1 year ago

what PHP version is everyone using? I'm on 8.1 and it worked.

@BMiZEL, I am running PHP 7.4.33. PHP 8 is still not supported on Debian stable (bullseye).

BMiZEL commented 1 year ago

what PHP version is everyone using? I'm on 8.1 and it worked.

@BMiZEL, I am running PHP 7.4.33. PHP 8 is still not supported on Debian stable (bullseye).

I'm on 8.1 running on Bullseye

tgoeg commented 1 year ago

PHP 7.4 for me, but I don't think that's related, considering what fixes it (here at least).

szaimen commented 1 year ago

Hi, please update to 25.0.7 or better 26.0.2 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 26-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

tgoeg commented 1 year ago

25.0.6.1 is the highest the updater lets me update to. I cannot reproduce the error using the built-in markdown editor anymore, no patches applied. So I think it's fixed for me. Can anyone else also confirm?

bcutter commented 1 year ago

Still running v25.0.6, seeing this message plenty of times. There's no v25.0.7 (yet), only v26.0.1 is offered (which I can't use yet due to missing compatible apps, same story on every major release).

So do I get this right, there'll be a fix in v25.0.7 and v26.0.2?

According to https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule v25.0.7 should arrive today, so chances are good to be able to update in the next days I guess.

Edit: It already arrived (https://github.com/nextcloud/server/releases/tag/v25.0.7), just not showing up on the local updater yet.

doc75 commented 1 year ago

I just got the message right after the upgrade (or during the upgrade, i do not know) when moving from 25.0.6 to 25.0.7 (official docker image)