I am experiencing the same thing.
It only seems to affect files uploading from iOS. I can upload files to my Nextcloud instance just fine using the web browser. In the iOS app this manifests as an error toast with the title “Upload file” and the description “unknown error”.
The full error including stack trace for me is:
{
"reqId": "Vt70v05rvbDPMZdZLG6w",
"level": 3,
"time": "2024-05-24T10:33:56+00:00",
"remoteAddr": "192.168.86.227",
"user": "aaron",
"app": "no app in context",
"method": "POST",
"url": "/ocs/v2.php/apps/notifications/api/v2/push",
"message": "hash_hkdf(): Argument #2 ($key) cannot be empty in file '/app/www/public/lib/private/Security/Crypto.php' line 149",
"userAgent": "Mozilla/5.0 (iOS) Nextcloud-iOS/5.2.7",
"version": "29.0.0.19",
"exception": {
"Exception": "Exception",
"Message": "hash_hkdf(): Argument #2 ($key) cannot be empty in file '/app/www/public/lib/private/Security/Crypto.php' line 149",
"Code": 0,
"Trace": [
{
"file": "/app/www/public/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/app/www/public/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/app/www/public/ocs/v1.php",
"line": 66,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/app/www/public/ocs/v2.php",
"line": 23,
"args": ["/app/www/public/ocs/v1.php"],
"function": "require_once"
}
],
"File": "/app/www/public/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 170,
"Previous": {
"Exception": "ValueError",
"Message": "hash_hkdf(): Argument #2 ($key) cannot be empty",
"Code": 0,
"Trace": [
{
"file": "/app/www/public/lib/private/Security/Crypto.php",
"line": 149,
"function": "hash_hkdf"
},
{
"file": "/app/www/public/lib/private/Security/Crypto.php",
"line": 123,
"function": "decryptWithoutSecret",
"class": "OC\\Security\\Crypto",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/app/www/public/lib/private/Security/IdentityProof/Manager.php",
"line": 116,
"function": "decrypt",
"class": "OC\\Security\\Crypto",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/app/www/public/lib/private/Security/IdentityProof/Manager.php",
"line": 133,
"function": "retrieveKey",
"class": "OC\\Security\\IdentityProof\\Manager",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/notifications/lib/Controller/PushController.php",
"line": 134,
"function": "getKey",
"class": "OC\\Security\\IdentityProof\\Manager",
"type": "->"
},
{
"file": "/app/www/public/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "registerDevice",
"class": "OCA\\Notifications\\Controller\\PushController",
"type": "->"
},
{
"file": "/app/www/public/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/app/www/public/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/app/www/public/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/app/www/public/ocs/v1.php",
"line": 66,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/app/www/public/ocs/v2.php",
"line": 23,
"args": ["/app/www/public/ocs/v1.php"],
"function": "require_once"
}
],
"File": "/app/www/public/lib/private/Security/Crypto.php",
"Line": 149
},
"message": "hash_hkdf(): Argument #2 ($key) cannot be empty in file '/app/www/public/lib/private/Security/Crypto.php' line 149",
"exception": [],
"CustomMessage": "hash_hkdf(): Argument #2 ($key) cannot be empty in file '/app/www/public/lib/private/Security/Crypto.php' line 149"
},
"id": "66506d79c5b01"
}
I can see that in my config.php, the secret
is set and this value has never changed since installation about a year ago. Perhaps the value isn’t making it all the way through the various functions in that stack trace.