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]: Encryption app is enabled, but your keys are not initialized. Please log-out and log-in again. (upgrade 30.0.6 to 31) #51066

Open
5 of 8 tasks
eckonator opened this issue Feb 26, 2025 · 18 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug feature: encryption (server-side) high

Comments

@eckonator
Copy link

eckonator commented Feb 26, 2025

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrade from Nextcloud 30.0.6 to 31.0.0 i got this error after login on WebGui:

Encryption app is enabled, but your keys are not initialized. Please log-out and log-in again.

Login and logout with different browsers doesn't change anything. Files not visible because of broken decryption. I think this is a bug in version 31.0.0.

Please help

Steps to reproduce

  • upgrade nextcloud from 30.0.6 to 31
  • login as admin on webgui

Expected behavior

working decryption after user login

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

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": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.0.18",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "theme": "",
        "loglevel": 3,
        "maintenance": false,
        "integrity.check.disabled": false,
        "allow_user_to_change_mail_address": "",
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "mail_sendmailmode": "pipe",
        "maintenance_window_start": 100,
        "default_phone_region": "DE",
        "data-fingerprint": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtptimeout": 10,
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.1.0
  - circles: 31.0.0-dev.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.0.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - encryption: 2.19.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - files_texteditor: 2.15.1 (installed 2.15.1)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again"}}

Additional info

No response

@eckonator eckonator added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 26, 2025
@joshtrichards
Copy link
Member

Can you provide the full log entry (stack trace)?

There's a chance changing your loglevel back to the default (2) may also turn up some hints as well, particularly with the same reqId.

@eckonator
Copy link
Author

eckonator commented Feb 26, 2025

Thanks for helping, here are more information from my logfile:

{"reqId":"Hwnw2Zb6I6hLsNOMu90Q","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"no app in context","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":461,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":385,"function":"fixUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":99,"function":"verifyUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":289,"function":"filesize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","exception":{},"CustomMessage":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV"}}
{"reqId":"H2ixq8phsvoX2xFuqvOz","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"no app in context","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":461,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":385,"function":"fixUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":99,"function":"verifyUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":289,"function":"filesize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","exception":{},"CustomMessage":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV"}}
{"reqId":"Hwnw2Zb6I6hLsNOMu90Q","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"webdav","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":594,"Previous":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again"}}
{"reqId":"H2ixq8phsvoX2xFuqvOz","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"webdav","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":594,"Previous":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again"}}
{"reqId":"eioWwUXIDjewM4JnwnR4","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"no app in context","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":461,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":385,"function":"fixUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":99,"function":"verifyUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":289,"function":"filesize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV","exception":{},"CustomMessage":"Couldn't re-calculate unencrypted size for files/path/to/videofile.MOV"}}
{"reqId":"eioWwUXIDjewM4JnwnR4","level":3,"time":"2025-02-26T15:03:08+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"webdav","method":"GET","url":"/remote.php/dav/files/user/path/to/movfile.MOV","message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":594,"Previous":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again"}}
{"reqId":"P5zx7itMgwDiqLIxIjwA","level":3,"time":"2025-02-26T15:03:23+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"no app in context","method":"GET","url":"/remote.php/dav/files/user/path/to/pdffile.pdf","message":"Couldn't re-calculate unencrypted size for files/path/to/pdffile.pdf","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":461,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":385,"function":"fixUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":99,"function":"verifyUnencryptedSize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":289,"function":"filesize","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Couldn't re-calculate unencrypted size for files/path/to/pdffile.pdf","exception":{},"CustomMessage":"Couldn't re-calculate unencrypted size for files/path/to/pdffile.pdf"}}
{"reqId":"P5zx7itMgwDiqLIxIjwA","level":3,"time":"2025-02-26T15:03:23+00:00","remoteAddr":"XX.XXX.XX.XXX","user":"user","app":"webdav","method":"GET","url":"/remote.php/dav/files/user/path/to/pdffile.pdf","message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","userAgent":"Useragent","version":"31.0.0.18","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":594,"Previous":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","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/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":145,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Verschl\u00fcsselung nicht bereit: Private Key missing for user: please try to log-out and log-in again"}}

@tomashejatko
Copy link

Hello, I have same problem, very similar setup, but I am running PHP8.3, is there some useful info I can provide?
One log line that should be interesting:

{"reqId":"6TWviiZC70uk8s3jw9wr","level":3,"time":"2025-02-26T19:30:49+00:00","remoteAddr":"172.16.120.119","user":"arteal","app":"text","method":"PROPFIND","url":"/remote.php/dav/files/arteal/","message":"Private Key missing for user: please try to log-out and log-in again","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/srv/apache/arteal.net/cloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->"},{"file":"/srv/apache/arteal.net/cloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->"},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":147,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":122,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/View.php","line":1212,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/View.php","line":557,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/srv/apache/arteal.net/cloud/lib/private/Files/Node/File.php","line":33,"function":"file_get_contents","class":"OC\\Files\\View","type":"->"},{"file":"/srv/apache/arteal.net/cloud/apps/text/lib/DAV/WorkspacePlugin.php","line":99,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":95,"function":"OCA\\Text\\DAV\\{closure}","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/apache/arteal.net/cloud/apps/text/lib/DAV/WorkspacePlugin.php","line":89,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1664,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1649,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/srv/apache/arteal.net/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/srv/apache/arteal.net/cloud/remote.php","line":145,"args":["/srv/apache/arteal.net/cloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/srv/apache/arteal.net/cloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Private Key missing for user: please try to log-out and log-in again"}}

@gdudas
Copy link

gdudas commented Feb 27, 2025

We have the same issue:

{"reqId":"yCVW9geYCcq1RgDtNNaZ","level":3,"time":"2025-02-27T12:11:16+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"xxxxxxxxx","app":"text","method":"PROPFIND","url":"/remote.php/dav/files/xxxxxxxxx/","message":"Private Key missing for user: please try to log-out and log-in again","userAgent":"Chrome/131.0.0.0 Safari/537.36","version":"31.0.0.18","exception":{"Exception":"OCA\\Encryption\\Exceptions\\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/var/www/html/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\\Encryption\\Session","type":"->","args":[]},{"file":"/var/www/html/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\\Encryption\\KeyManager","type":"->","args":["xxxxxxxxx","xxxxxxxxx",null,false]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\\Encryption\\Crypto\\Encryption","type":"->","args":["xxxxxxxxx","xxxxxxxxx","r",{"oc_encryption_module":"OC_DEFAULT_MODULE","cipher":"AES-256-CTR","signed":"true"},{"users":{"0":"xxxxxxxxx","2":"xxxxxxxxx","3":"xxxxxxxxx"},"public":true}]},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->","args":["ocencryption://","r",0,null]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen","args":["ocencryption://","r",false,null]},{"file":"/var/www/html/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,null,"ocencryption","OC\\Files\\Stream\\Encryption","r"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,"xxxxxxxxx","xxxxxxxxx",{"oc_encryption_module":"OC_DEFAULT_MODULE","cipher":"AES-256-CTR","signed":"true"},"xxxxxxxxx",{"__class__":"OCA\\Encryption\\Crypto\\Encryption"},{"__class__":"OC\\Files\\Storage\\Wrapper\\Quota","cache":null,"scanner":null,"watcher":null,"propagator":null,"updater":null},{"__class__":"OC\\Files\\Storage\\Wrapper\\Encryption","cache":null,"scanner":null,"watcher":null,"propagator":null,"updater":null},{"__class__":"OC\\Encryption\\Util"},{"__class__":"OC\\Encryption\\File"},"r",8292,1,8192,true]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Encryption.php","line":147,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["files/Team Radio/Readme.md","r"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":122,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["files/Team Radio/Readme.md"]},{"file":"/var/www/html/apps/files_accesscontrol/lib/StorageWrapper.php","line":153,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Team Radio/Readme.md"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":122,"function":"file_get_contents","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->","args":["files/Team Radio/Readme.md"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Jail.php","line":135,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Team Radio/Readme.md"]},{"file":"/var/www/html/apps/files_sharing/lib/SharedStorage.php","line":537,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Jail","type":"->","args":["Readme.md"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":122,"function":"file_get_contents","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":["Readme.md"]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":122,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["Readme.md"]},{"file":"/var/www/html/apps/files_accesscontrol/lib/StorageWrapper.php","line":153,"function":"file_get_contents","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["Readme.md"]},{"file":"/var/www/html/lib/private/Files/View.php","line":1212,"function":"file_get_contents","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->","args":["Readme.md"]},{"file":"/var/www/html/lib/private/Files/View.php","line":557,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_get_contents","xxxxxxxxx",["read"]]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":33,"function":"file_get_contents","class":"OC\\Files\\View","type":"->","args":["xxxxxxxxx"]},{"file":"/var/www/html/apps/text/lib/DAV/WorkspacePlugin.php","line":99,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":95,"function":"OCA\\Text\\DAV\\{closure}","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/text/lib/DAV/WorkspacePlugin.php","line":89,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->","args":["{http://nextcloud.org/ns}rich-workspace",{"__class__":"Closure"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OC\\Files\\Node\\Folder"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["propFind",[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Connector\\Sabre\\Directory"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\DAV\\Connector\\Sabre\\Directory"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1664,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["xxxxxxxxx",["{DAV:}getcontentlength","{DAV:}getcontenttype","{DAV:}getetag","{DAV:}getlastmodified","{DAV:}creationdate","And 27 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1649,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\Xml\\Writer","elementMap":[],"contextUri":"/remote.php/dav/","namespaceMap":{"DAV:":"d","http://sabredav.org/ns":"s","http://owncloud.org/ns":"oc","http://nextcloud.org/ns":"nc"},"classMap":[]},{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"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:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":145,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again","message":"Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Private Key missing for user: please try to log-out and log-in again"}}

@maxmeyer
Copy link

I've the same issue, running the nextcloud community image with podman.

@dataflake
Copy link

dataflake commented Feb 28, 2025

Same issue after manual upgrade from 30.0.6. Please help.

P.S.: The key files themselves are all there and their location/contents/file permissions have not changed during the migration.

@xbloq
Copy link

xbloq commented Feb 28, 2025

same issue with update to 31 form 30.0.6

{"reqId":"Z8IqNjM5m3VLM5AUKbTzyAAAARU","level":3,"time":"2025-02-28T22:27:19+01:00","remoteAddr":"10.8.0.3","user":"admin4","app":"webdav","method":"GET","url":"/nextcloud/remote.php/dav/files/admin4/note_led.pdf","message":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","version":"31.0.0.18","exception":{"Exception":"Sabre\DAV\Exception\ServiceUnavailable","Message":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/usr/share/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"convertToSabreException","class":"OCA\DAV\Connector\Sabre\File","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\DAV\Connector\Sabre\File","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\DAV\CorePlugin","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\DAV\Connector\Sabre\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/remote.php","line":145,"args":["/usr/share/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/usr/share/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":594,"Previous":{"Exception":"OCA\Encryption\Exceptions\PrivateKeyMissingException","Message":"Private Key missing for user: please try to log-out and log-in again","Code":0,"Trace":[{"file":"/usr/share/nextcloud/apps/encryption/lib/KeyManager.php","line":384,"function":"getPrivateKey","class":"OCA\Encryption\Session","type":"->"},{"file":"/usr/share/nextcloud/apps/encryption/lib/Crypto/Encryption.php","line":130,"function":"getFileKey","class":"OCA\Encryption\KeyManager","type":"->"},{"file":"/usr/share/nextcloud/lib/private/Files/Stream/Encryption.php","line":228,"function":"begin","class":"OCA\Encryption\Crypto\Encryption","type":"->"},{"function":"stream_open","class":"OC\Files\Stream\Encryption","type":"->"},{"file":"/usr/share/nextcloud/lib/private/Files/Stream/Encryption.php","line":156,"function":"fopen"},{"file":"/usr/share/nextcloud/lib/private/Files/Stream/Encryption.php","line":131,"function":"wrapSource","class":"OC\Files\Stream\Encryption","type":"::"},{"file":"/usr/share/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":351,"function":"wrap","class":"OC\Files\Stream\Encryption","type":"::"},{"file":"/usr/share/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OC\Files\Storage\Wrapper\Encryption","type":"->"},{"file":"/usr/share/nextcloud/apps/files_sharing/lib/SharedStorage.php","line":340,"function":"fopen","class":"OC\Files\Storage\Wrapper\Wrapper","type":"->"},{"file":"/usr/share/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":142,"function":"fopen","class":"OCA\Files_Sharing\SharedStorage","type":"->"},{"file":"/usr/share/nextcloud/lib/private/Files/View.php","line":1210,"function":"fopen","class":"OC\Files\Storage\Wrapper\Wrapper","type":"->"},{"file":"/usr/share/nextcloud/lib/private/Files/View.php","line":1038,"function":"basicOperation","class":"OC\Files\View","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":463,"function":"fopen","class":"OC\Files\View","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\DAV\Connector\Sabre\File","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\DAV\CorePlugin","type":"->"},{"file":"/usr/share/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/lib/Server.php","line":397,"function":"start","class":"OCA\DAV\Connector\Sabre\Server","type":"->"},{"file":"/usr/share/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\DAV\Server","type":"->"},{"file":"/usr/share/nextcloud/remote.php","line":145,"args":["/usr/share/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/usr/share/nextcloud/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again"}}

@tomashejatko
Copy link

Hello, I don't want to be disrespectful, but, are you aware that Nextcloud instance is completely unusable? I have option to rollback and I will do it, because there is no answer for 3 days, but somebody should not have this option and they have big problems now

@dataflake
Copy link

I have option to rollback and I will do it, because there is no answer for 3 days, but somebody should not have this option and they have big problems now

How do you roll back an upgrade? I know from testing that simply overwriting the packaged files with old old version will simply cause an error message that downgrades are not supported.

@tomashejatko
Copy link

I have option to rollback and I will do it, because there is no answer for 3 days, but somebody should not have this option and they have big problems now

How do you roll back an upgrade? I know from testing that simply overwriting the packaged files with old old version will simply cause an error message that downgrades are not supported.

I do daily incremental backups with rdiff-backup and full SQL export of database

@eckonator
Copy link
Author

I had to decrypt all files via ./occ encryption:decrypt-all and then deactivated the encryption plugin. I'm not happy with that, but at least everything is working again and I can avoid the downgrade. I hope there will be a fix for the problem soon.

@dataflake
Copy link

I had to decrypt all files via ./occ encryption:decrypt-all and then deactivated the encryption plugin. I'm not happy with that, but at least everything is working again and I can avoid the downgrade. I hope there will be a fix for the problem soon.

Same here, that seems to have worked. This is the second time during the last few years that some change in the encryption code has completely borked my instance. I managed to get out of it with some hairy workarounds, but consider the server-side encryption dangerous and unreliable now.

@fkrueger
Copy link

fkrueger commented Mar 1, 2025

Sadly, my encrypted nextcloud instance has been down since the auto-update to 31.0.0 overnight (2025-02-26), too.
No access to data is possible via web-interface or the windows nextcloud client.
Interestingly enough the nextcloud client used in Fedora 40 seems to still work.

Of course, that's no good basis to keep using encryption with Nextcloud -.-

Update: After a run of encryption disable, decrypt all, occ files:scan, etc. etc. Nextcloud still was throwing errors trying to read the unencrypted, just now rediscovered files (via files:scan)...
It turns out, disabling the circles app was needed so the webinterface could access the unencrypted files again.
So possible workaround: occ app:disable circles

@maxmeyer
Copy link

maxmeyer commented Mar 1, 2025

Mmmh... Decrypting failed for me after a couple of hours on my external instance - even with memory_limt given. The internal one did not run into that problem.

su -s /bin/sh www-data -c "php --define memory_limt=1024M ./occ encryption:decrypt-all
 [>]PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/lib/private/Log/File.php on line 57
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 655360 bytes) in /var/www/html/lib/private/Lock/AbstractLockingProvider.php on line 57

@joshtrichards joshtrichards marked this as a duplicate of #51174 Mar 1, 2025
@szaimen szaimen added the high label Mar 1, 2025
@stevleibelt
Copy link

stevleibelt commented Mar 1, 2025

Same issue here.

No file can be opened/views from within the web view. No synchronization is working.

So is there a way to disable encryption? decrypt-all is not working. It looks like my recovery key password is wrong. My installation is old and comes from owncloud ages.

  • upgrade nextcloud from 30.0.6 to 31
  • PHP 8.3.8

Log line:

/path/to/the/next/cloud/public/remote.php","line":145,"args":["/path/to/the/next/cloud/public/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/path/to/the/next/cloud/public/apps/encryption/lib/Session.php","Line":69,"Hint":"Private Key missing for user: please try to log-out and log-in again"},"message":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again","exception":{},"CustomMessage":"Encryption not ready: Private Key missing for user: please try to log-out and log-in again"}}

php public/occ app:list
Enabled:
  - admin_audit: 1.21.0
  - analytics: 5.2.4
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.1.2
  - cloud_federation_api: 1.14.0
  - contacts: 7.0.1
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - encryption: 2.19.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 4.2.2
  - news: 25.2.1
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - notify_push: 1.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - polls: 8.0.0-alpha8
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.0.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - activity: 4.0.0
  - circles: 31.0.0-dev.0 (installed 23.1.0)
  - comments: 1.21.0 (installed 0.2)
  - files_trashbin: 1.21.0 (installed 0.4)
  - files_versions: 1.24.0 (installed 1.0.3)
  - firstrunwizard: 4.0.0 (installed 1.0)
  - suspicious_login: 9.0.1 (installed 8.0.0)
  - systemtags: 1.21.1 (installed 1.13.0)
  - twofactor_email: 2.7.4 (installed 2.7.4)
  - twofactor_nextcloud_notification: 5.0.0
  - user_ldap: 1.22.0
  - user_status: 1.11.0 (installed 1.3.1)
  - weather_status: 1.11.0 (installed 1.3.0)

@phoerious
Copy link

Same here, that seems to have worked. This is the second time during the last few years that some change in the encryption code has completely borked my instance. I managed to get out of it with some hairy workarounds, but consider the server-side encryption dangerous and unreliable now.

I think for me it's the third time. This is quite unacceptable.

@stevleibelt
Copy link

Just to mention, I am not mad since this is an open source product solving some of my problems for years.

It looks like this is a not so simple functionality so I would be pleased to just disable it until it is more mature. Since I haven't done anything beside an update, I would love that the developers get some more time to make this feature more mature.

Could I "just" fix the issue by removing all the files for my users on my cloud, disable encryption and upload all files again?
I know that this would result in unencrypted files on the server.

Kind regards and thanks for the work so far,
Stev

@phoerious
Copy link

phoerious commented Mar 2, 2025

The encryption module seems to be fundamentally broken right now. I tried to re-encrypt everything from scratch as follows:

  1. occ encryption:decrypt-all USER
  2. Remove data/USER/files_encryption and data/USER/encryption_migration_backup*
  3. occ encryption:disable
  4. Disable encryption module under "Apps"
  5. -- Files are now accessible on the server --
  6. Re-enable encryption module
  7. occ encryption: encrypt-all

After step 7, I logged in via the web UI again to initialize the encryption keys, but that only put me back at where I started, but when I try to decrypt the re-encrypted files again (which works), I get the following error output:

In Crypt.php line 458:

  Bad Signature

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 31-feedback bug feature: encryption (server-side) high
Projects
None yet
Development

No branches or pull requests