Cannot upload photos - Folder error

Nextcloud version: 27.0.0
Operating system and version: Docker running on Synology

The issue you are facing:

You know it’d really be cool if NC could upload photos from my phone to my NC instance. It says it can but it rarely if ever works. Just got a new Pixel phone and trying to set up the NC app to upload my photos. I go into the app, go to the settings and click on the 3 dot menu for Camera. Set

Preferences for auto uploading: /storage/emulated/0/DCIM/Camera
Remote Folder to /Camera/
Only update on unmetered Wi-Fi: checked
Only upload when charging: unchecked
Also upload existing files: checked
Use subfolders: unchecked
Original file will be…: kept in original folder
What to do if the file already exists? Ask me every time

There are like 340 photos to upload. All of them fail with “Folder error”. Nothing else. No explanation. No solution. No uploads.

The number of uploads goes from like 340 down to about maybe 250 or 200 and when I check again sometimes it’s back up to 340. Sometimes even more than 340 like 367! It’s nuts! It got down to 123 then hung for a while. Scrolled down to see how many upload failures there were then back to the copy and now it shot up to 180.

Finally got it down to only 26 by constantly Clearing failed downloads but it’s going no further!

Wait it started again! Got it down to 0 but…

Checked my /Camera/folder - not a single file!

And upload says:

"No uploads available

Upload some content or activate auto upload"

I believe I activated auto upload!

Additionally, under Settings > Auto Upload I have 3 different “libraries” all labeled “Camera” and all having different photos. One says 335 photos, and another says 340. No way that I can see to find out which folders these various libraries are pointing to. No way to delete them. I can hide them, I can’t delete them. An d none of them work!

Hi @defaria - I have a Pixel 7 and it works for me. But:

  • When I first moved to it from my old phone I think the “Data storage folder” was wacky in the main Settings and lots of strange issues until I fixed that (I suspect this is due to Google’s attempt to migrate a user from their old phone, which migrates over app configuration too; which doesn’t work so well when storage is different on the new device).
  • I’ve only got two “Camera” entries: one is for still photos and the other is for videos (at least that’s how I’ve always interpreted it based on the icons). I believe two is expected. Three… that’s weird but maybe due to the prior item? If memory serves me right I think there was a strange extra Camera entry or two as well and I had to sort out which were the real ones and which were from the Google migrated config)
  • I have a couple settings distinctly different than you:
    • I have three auto-upload profiles configured for Camera (still shots), Camera (videos), Screenshots (still shots)
    • I don’t have “unmetered wifi” checked
    • I do have “upload when charging” checked
    • I have the "Original file will be… " set to deleted.

I’d be curious what your NC server says about all that upload activity. What do your NC server logs show?

For me, it’s not an issue about migrating to a new phone. It also didn’t work on the old phone (though it did work for a little while on the old phone long ago). My data storage folder is /storage/emulated/0/Android/media/com.nextcloud.client.

Under Settings > Auto Upload I have the following things:

  • Camera (Remote folder: /Camera)
  • Camera (second one - Remote folder: /instantUpload/Camera)
  • MapMyWalk
  • Markup (?)
  • Screenshots
  • AllTrails
  • Download
  • Instagram
  • Messages
  • Voice (Remote folder: /instantUpload/Voice)
  • Voice (second one - Remote folder: /instantUpload/Voice)
  • WhatsApp Video

Many of these seem associated with specific apps. I’ve listed the Remote folder for the duplicated ones. Not sure why I have two Voice ones with the same Remote folder.

I misspoke, I have only 2 Camera things. But they don’t look like one has only videos and the other has only pictures.



As I mentioned, I cannot delete ones I don’t want and perhaps reconfigure them. I can only either include them for auto-upload or hide them.

I’ve tried both unmetered and metered wifi. No difference. It’s my understanding that my home wifi is unmetered. I don’t want to delete files that are uploaded because I use an app called Wallpaper Changer that changes my wallpaper and it’s based on the images from my camera. I like having them change periodically and also periodically I remove photos from my phone if they happen to be taking up too much space. By far my videos eat up the space way before still photos. I generally try to keep just 6 months of still photos on my phone.

I cleared out all of the prior failed uploads. Took 2 new pictures and saw NC attempt to upload the photos. Both failed with Folder error. Nothing was written to the logs.

I find the nextcloud.log to be pretty much unreadable by mere humans. Here’s an excerpt of the tail end of the nextcloud.log

{"reqId":"a5UNFh10AMNETBGZff4l","level":3,"time":"2023-07-20T14:46:41+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"woiTPlS2IBt3uLdygv1d","level":2,"time":"2023-07-20T22:27:23+00:00","remoteAddr":"192.168.0.1","user":"--","app":"core","method":"GET","url":"/ocs/v1.php/cloud/user?format=json","message":"Login failed: 'andrew' (Remote IP: '192.168.0.1')","userAgent":"Filelink for *cloud","version":"27.0.0.8","data":{"app":"core"}}
{"reqId":"M5KN8H9O2xQwYYRknC4l","level":3,"time":"2023-07-20T23:11:24+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"2y5bvEEZ3qoS0QZqZVEf","level":3,"time":"2023-07-20T23:13:18+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"JgJPeE6ZHiADgIhBkYT3","level":3,"time":"2023-07-20T23:43:02+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"aXFnoRSm74NXl3XPPDk6","level":3,"time":"2023-07-20T23:43:09+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"PHP","method":"GET","url":"/index.php/apps/files/api/v1/thumbnail/256/256/Camera/20221226_133902.jpg","message":"Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#533","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","data":{"app":"PHP"}}
{"reqId":"iO5lT0I4XsGH9f6NTo9B","level":3,"time":"2023-07-20T23:43:19+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"PHP","method":"GET","url":"/index.php/apps/files/api/v1/thumbnail/256/256/Camera/20221226_133902.jpg","message":"Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#533","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","data":{"app":"PHP"}}
{"reqId":"MhP9BqLDODTFq8cxPRXk","level":3,"time":"2023-07-20T23:43:24+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"quNXmWktga3WTbnZYSil","level":3,"time":"2023-07-20T23:43:25+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"PHP","method":"GET","url":"/index.php/apps/files/api/v1/thumbnail/256/256/Camera/20221226_133902.jpg","message":"Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#533","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","data":{"app":"PHP"}}
{"reqId":"bJx2r0TUldrjPhIScfRY","level":3,"time":"2023-07-20T23:46:55+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}

Tried json_pp but it just gave me an error:

Wizard Earth:cat nextcloud.log | json_pp
garbage after JSON object, at character offset 477 (before ""reqId":"PJRRJda8gXy...") at /usr/local/bin/json_pp line 56.
Wizard Earth:

I’m sure there are other gremlins in my NC instance if I hit + on the NC app on my phone while in a Test directory I just created then browse over to DCIM (or any other directory) and try to upload a file it says it is but then quickly ends and nothing is uploaded. The log contained:

{"reqId":"RfWbCyz4Jep5QbRVoB0G","level":3,"time":"2023-07-21T00:22:37+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
{"reqId":"igoy2ddXyggEvR6VCeLL","level":3,"time":"2023-07-21T00:22:56+00:00","remoteAddr":"192.168.0.1","user":"andrew","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":160,"function":"hash_hkdf","args":["sha512",["SensitiveParameterValue"]]},{"file":"/var/www/html/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":127,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Security/IdentityProof/Manager.php","line":146,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["user-andrew"]},{"file":"/var/www/html/apps/notifications/lib/Controller/PushController.php","line":119,"function":"getKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":[["OC\\User\\User"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"registerDevice","class":"OCA\\Notifications\\Controller\\PushController","type":"->","args":["219c84a5d11b8c035fb6a3a5b9a8db041387162c3d515f8d0fafbf7d77d668181fa4cc80a57904943b7d681b633bf94419d253718b7f8add118f128be70d9596","-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApEayvam+9ETZA2Kccq6u\nas1zA0tCBqdyJIIYKRemzQLCDh26VGfvrXcZ/RCD31BZyLdrsp5Yp5MCQlpqzS52\nn5LFwCUp5QBhPY8VgrPGUamyM/C3+OZ527rGKPfQEGYFRouGSBwCQWDDixridLqU\nsBszGoyJuYISvVYgOX64sQvAgXw0rcAuY2YPnkUWorxNSiuzaw0YitqK03Yw9+xN\n2GX0SbySVIKmcLojEC53T3QsHHDJqh43h4y+bBk9oY9kWhqnSMRKfF1TI9b8r7JH\ncUkbJ8k9ba+QqZ0HCQQb/nu48q8Tugp+nShhmyjeVN0Lg6EZisDN+qvBCu9RWwmJ\nxQIDAQAB\n-----END PUBLIC KEY-----\n","https://push-notifications.nextcloud.com"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notifications\\Controller\\PushController"],"registerDevice"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notifications\\Controller\\PushController","registerDevice",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["v2","ocs.notifications.Push.registerDevice"]]},{"file":"/var/www/html/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/push"]},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":160},"CustomMessage":"--"}}
"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 160"

This is one of your Issues it looks like:

"Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#533"

The other problem indicated in your logs is PHP is running out of memory for some reason when it rotates your images to generate thumbnails for some reason. You could try (in order to isolate the cause not necessarily as a permanent fix):

  • increasing PHP memory limit from 512MB to… 1024MB maybe?
  • disabling previews (enable_previews)
  • decreasing the max file size for generationg previews with imagegd (preview_max_filesize_image)
  • integrating Imaginary

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#previews

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/previews_configuration.html

Might also be worth:

Regarding secrets: I have several secrets. You see I’ve had to reinstall NC a number of times due to it not installing or coming up properly. As such I’ve been playing with the config.php over and over as a brand new install of NC (I install it as a Docker image on Synology) often gets very confused with settings in my config.php. It ended up that I had tried reinstalling with sqlite because I couldn’t get it to use my MariaDB then another reinstall trying to get it to work with MariaDB, tinker, tinker. So now I have:

Wizard Earth:ls config.php*
config.php  config.php.new  config.php.old  config.php.save  config.php.works
Wizard Earth:

Now I have a total of 3 different “secret” strings. And then there are different, corresponding passwordsalt’s and instanceid’s, all of which are gobbility gook of characters strings, none of which are empty. I have no idea where they came from now how to best set them. How should I determine the proper settings?

Regarding PHP Memory limit. I have the following in nextcloud.ini:

memory_limit=${PHP_MEMORY_LIMIT}
upload_max_filesize=${PHP_UPLOAD_LIMIT}
post_max_size=${PHP_UPLOAD_LIMIT}
max_execution_time=${PHP_MAX_EXECUTION_TIME}

I tried adding this to my docker-compose.yaml:

    environment:
      PHP_MEMORY_LIMIT: "1G"
      PHP_UPLOAD_LIMIT: "5G"
      PHP_MAX_EXECUTION_TIME: "300"

Now I get:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

And once again, my NC server is useless! This is why I have all of those config.php files.

Removed the environment section (IOW setting it back to where it was) and I still get the Internal Server Error. NC is fragile AF!

Here’s my docker-compose.yaml derived from a sample I found on the net:

version: '2'

services:

  nextcloud:
    container_name: nextcloud
    restart: unless-stopped
    image: nextcloud
    ports:
      - 8080:80
    volumes:
      - /docker/nextcloud:/var/www/html/config
      - /System/NextCloud:/var/www/html/data
      - /docker/nextcloud/apache2.conf:/etc/apache2/apache2.conf
      - /docker/nextcloud/nextcloud.ini:/usr/local/etc/php/conf.d/nextcloud.ini
      - /docker/nextcloud/remoteip.conf:/etc/apache2/conf-available/remoteip.conf
      - /Music:/music
      - /Pictures:/pictures
    depends_on:
      - db

  db:
    container_name: mariadb
    restart: unless-stopped
    image: mariadb
    command: --innodb-read-only-compressed=OFF    # Maria-DB fix
    environment:
      MYSQL_ROOT_PASSWORD: <redacted>
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: <redacted>

OK, maybe that error means my MariaDB is not right. I am trying to use my Synology NAS and the most recent upgrade introduced the Container Manager, a replacement/superset of the previous Docker app. It offered the promise, err hope to automate keeping your Docker containers up to date. That and they had this newer feature called Projects which is apparently for docker-compose stuff so I switched to using that. I took a simple sample and used sqlite and eventually got it to use my MariaDB as the backend. I thought everything was fine. But the photo upload wasn’t working hence I’m here.

If I docker exec into my MariaDB container I can run mariadb with the root user and password and get in. I can show the database and nextcloud is there. I can use nextcloud and show the tables and there aren’t any. Clearly, I’m in an initializing state. Apparently when I used the Container Manager to rebuild the “project” it wiped my MariaDB clean but left the nextcloud database. So how to proceed?

I’ve been here before as I said and I managed to slowly build things up to get nextcloud limping along but perhaps I should sit back and ask, where are there definitive instructions on getting this set up using docker-compose and MariaDB? And how do I then “import” all my files from my old NC instance? And now, once again, all of my share links are invalidated. Ugh!

Bump! My NC server is still down and I’m waiting for exacting instructions of how to set up NC with MariaDB using Docker Compose.

Given:

Earth:more docker-compose.yaml
version: '2'

services:

  nextcloud:
    container_name: nextcloud
    restart: unless-stopped
    image: nextcloud
    ports:
      - 8080:80
    volumes:
      - /docker/nextcloud:/var/www/html/config
      - /System/NextCloud:/var/www/html/data
      - /docker/nextcloud/apache2.conf:/etc/apache2/apache2.conf
      - /docker/nextcloud/nextcloud.ini:/usr/local/etc/php/conf.d/nextcloud.ini
      - /docker/nextcloud/remoteip.conf:/etc/apache2/conf-available/remoteip.conf
      - /Music:/music
      - /Pictures:/pictures
    depends_on:
      - db

  db:
    container_name: mariadb
    restart: unless-stopped
    image: mariadb
    command: --innodb-read-only-compressed=OFF    # Maria-DB fix
    environment:
      MYSQL_ROOT_PASSWORD: <redacted>
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: <redacted>
Earth:

Given the above docker-compose.yaml all I see when I go to the web UI is:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

How do I get my NC instance back up?

Here’s the output from docker-compose up:

Jupiter:docker-compose --ansi never up
Network nextcloud_default  Creating
Network nextcloud_default  Created
Container mariadb  Creating
Container mariadb  Created
Container nextcloud  Creating
Container nextcloud  Created
Attaching to mariadb, nextcloud
mariadb    | 2023-07-30 18:39:48+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
mariadb    | 2023-07-30 18:39:50+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb    | 2023-07-30 18:39:51+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
mariadb    | 2023-07-30 18:39:51+00:00 [Note] [Entrypoint]: Initializing database files
mariadb    | 2023-07-30 18:39:52 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
mariadb    | 2023-07-30 18:39:52 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
nextcloud  | Initializing nextcloud 27.0.1.2 ...
nextcloud  | New nextcloud instance
nextcloud  | Initializing finished
nextcloud  | => Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
nextcloud  | ==> but the hook folder "before-starting" is empty, so nothing to do
nextcloud  | [Sun Jul 30 18:41:02.836206 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.8 configured -- resuming normal operations
nextcloud  | [Sun Jul 30 18:41:02.836275 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
nextcloud  | 172.23.0.1 - - [30/Jul/2023:18:41:42 +0000] "GET /index.php/apps/dashboard/ HTTP/1.1" 500 701 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
mariadb    | 
mariadb    | 
mariadb    | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb    | To do so, start the server, then issue the following command:
mariadb    | 
mariadb    | '/usr/bin/mariadb-secure-installation'
mariadb    | 
mariadb    | which will also give you the option of removing the test
mariadb    | databases and anonymous user created by default.  This is
mariadb    | strongly recommended for production servers.
mariadb    | 
mariadb    | See the MariaDB Knowledgebase at https://mariadb.com/kb
mariadb    | 
mariadb    | Please report any problems at https://mariadb.org/jira
mariadb    | 
mariadb    | The latest information about MariaDB is available at https://mariadb.org/.
mariadb    | 
mariadb    | Consider joining MariaDB's strong and vibrant community:
mariadb    | https://mariadb.org/get-involved/
mariadb    | 
mariadb    | 2023-07-30 18:41:47+00:00 [Note] [Entrypoint]: Database files initialized
mariadb    | 2023-07-30 18:41:47+00:00 [Note] [Entrypoint]: Starting temporary server
mariadb    | 2023-07-30 18:41:47+00:00 [Note] [Entrypoint]: Waiting for server startup
mariadb    | 2023-07-30 18:41:47 0 [Note] Starting MariaDB 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 source revision 0005f2f06c8e1aea4915887decad67885108a929 as process 106
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Number of transaction pools: 1
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb    | 2023-07-30 18:41:47 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
mariadb    | 2023-07-30 18:41:47 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Opened 3 undo tablespaces
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mariadb    | 2023-07-30 18:41:47 0 [Note] InnoDB: log sequence number 47139; transaction id 14
mariadb    | 2023-07-30 18:41:47 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb    | 2023-07-30 18:41:47 0 [Note] Plugin 'wsrep-provider' is disabled.
mariadb    | 2023-07-30 18:41:47 0 [Warning] 'user' entry 'root@e6109c4f6ce6' ignored in --skip-name-resolve mode.
mariadb    | 2023-07-30 18:41:47 0 [Warning] 'proxies_priv' entry '@% root@e6109c4f6ce6' ignored in --skip-name-resolve mode.
mariadb    | 2023-07-30 18:41:47 0 [Note] mariadbd: ready for connections.
mariadb    | Version: '11.0.2-MariaDB-1:11.0.2+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mariadb    | 2023-07-30 18:41:48+00:00 [Note] [Entrypoint]: Temporary server started.
mariadb    | 2023-07-30 18:41:59+00:00 [Note] [Entrypoint]: Creating database nextcloud
mariadb    | 2023-07-30 18:41:59+00:00 [Note] [Entrypoint]: Creating user nextcloud
mariadb    | 2023-07-30 18:41:59+00:00 [Note] [Entrypoint]: Giving user nextcloud access to schema nextcloud
mariadb    | 2023-07-30 18:41:59+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
mariadb    | 
mariadb    | 2023-07-30 18:42:01+00:00 [Note] [Entrypoint]: Stopping temporary server
mariadb    | 2023-07-30 18:42:01 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
mariadb    | 2023-07-30 18:42:01 0 [Note] InnoDB: FTS optimize thread exiting.
mariadb    | 2023-07-30 18:42:03 0 [Note] InnoDB: Starting shutdown...
mariadb    | 2023-07-30 18:42:03 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mariadb    | 2023-07-30 18:42:03 0 [Note] InnoDB: Buffer pool(s) dump completed at 230730 18:42:03
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Shutdown completed; log sequence number 47139; transaction id 15
mariadb    | 2023-07-30 18:42:04 0 [Note] mariadbd: Shutdown complete
mariadb    | 
mariadb    | 2023-07-30 18:42:04+00:00 [Note] [Entrypoint]: Temporary server stopped
mariadb    | 
mariadb    | 2023-07-30 18:42:04+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
mariadb    | 
mariadb    | 2023-07-30 18:42:04 0 [Note] Starting MariaDB 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 source revision 0005f2f06c8e1aea4915887decad67885108a929 as process 1
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Number of transaction pools: 1
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb    | 2023-07-30 18:42:04 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
mariadb    | 2023-07-30 18:42:04 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Opened 3 undo tablespaces
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: log sequence number 47139; transaction id 14
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb    | 2023-07-30 18:42:04 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb    | 2023-07-30 18:42:04 0 [Note] Plugin 'wsrep-provider' is disabled.
mariadb    | 2023-07-30 18:42:04 0 [Note] InnoDB: Buffer pool(s) load completed at 230730 18:42:04
mariadb    | 2023-07-30 18:42:04 0 [Note] Server socket created on IP: '0.0.0.0'.
mariadb    | 2023-07-30 18:42:04 0 [Note] Server socket created on IP: '::'.
mariadb    | 2023-07-30 18:42:04 0 [Note] mariadbd: ready for connections.
mariadb    | Version: '11.0.2-MariaDB-1:11.0.2+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
nextcloud  | 172.23.0.1 - - [30/Jul/2023:18:43:13 +0000] "GET /index.php/apps/dashboard/ HTTP/1.1" 500 701 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"