Internal server error at cloud.nextcloud com
Describe the bug
Selecting photos app shows internal server error.
To Reproduce Steps to reproduce the behavior:
- I opened https://cloud.nextcloud.com/
- Logged in
- Selected photos app
- Internal server error is shown
Expected behavior Photos app should open.
Screenshots

Desktop (please complete the following information):
- OS: macOS
- Browser: firefox
- Version: 104
NC version: 25.0.0 RC 1
Additional context Other users at community chat confirmed error.
Hi, Which section?
Hello, what do you mean with section?
I just click at photos:

Log entry with above request_id subz8Hzjsm8u9RaBLlKY:
{
"reqId": "subz8Hzjsm8u9RaBLlKY",
"level": 3,
"time": "2022-09-24T15:43:32+00:00",
"remoteAddr": "…",
"user": "…(guest app account)",
"app": "index",
"method": "GET",
"url": "/apps/photos/",
"message": "No create permission for folder",
"userAgent": "…",
"version": "25.0.0.13",
"exception": {
"Exception": "OCP\\Files\\NotPermittedException",
"Message": "No create permission for folder",
"Code": 0,
"Trace": [
{
"function": "newFolder",
"class": "OC\\Files\\Node\\Folder",
"type": "->",
"args": [
"/Photos"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/LazyFolder.php",
"line": 72,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "OC\\Files\\Node\\Folder"
},
"newFolder"
],
[
"/Photos"
]
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/LazyFolder.php",
"line": 419,
"function": "__call",
"class": "OC\\Files\\Node\\LazyFolder",
"type": "->",
"args": [
"newFolder",
[
"/Photos"
]
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/apps/photos/lib/Service/UserConfigService.php",
"line": 67,
"function": "newFolder",
"class": "OC\\Files\\Node\\LazyFolder",
"type": "->",
"args": [
"/Photos"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/apps/photos/lib/Controller/PageController.php",
"line": 112,
"function": "getUserConfig",
"class": "OCA\\Photos\\Service\\UserConfigService",
"type": "->",
"args": [
"photosLocation"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 225,
"function": "index",
"class": "OCA\\Photos\\Controller\\PageController",
"type": "->",
"args": []
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 133,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Photos\\Controller\\PageController"
},
"index"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/App.php",
"line": 172,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Photos\\Controller\\PageController"
},
"index"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Route/Router.php",
"line": 298,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Photos\\Controller\\PageController",
"index",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
[
"photos.page.index"
]
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/lib/base.php",
"line": 1047,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/photos/"
]
},
{
"file": "/var/www/cloud.nextcloud.com/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/Folder.php",
"Line": 172,
"CustomMessage": "--"
}
}
Guest accounts have 0 quota iirc.
@skjnldsv We should probably check if the user can create files or folders here: https://github.com/nextcloud/photos/blob/a07c06ff6919ddba691eb1ee110d997127d1975b/lib/Service/UserConfigService.php#L62-L69
Maybe:
if (!$userFolder->nodeExists($value) && $userFolder->isCreatable()) {
$userFolder->newFolder($value);
}
Then hide upload buttons ?
Similar to this I guess: https://github.com/nextcloud/photos/blob/a07c06ff6919ddba691eb1ee110d997127d1975b/lib/Controller/PageController.php#L130-L132
Same with NC version: 25.0.0 RC3. Checked seconds ago.
@skjnldsv We should probably check if the user can create files or folders here:
For the upload I would say this is a secondary feature. Maybe I should check the quota before uploading.
In the meantime, I guess we can also expose the quota with an initial state to avoid generating more requests :thinking: