No photos in here
Describe the bug When opening the Photos app, no photos are discovered/displayed. Running Nextcloud v24.0.2
Expected behavior Photos should be shown
Screenshots

Nextcloud log
There doesn't seem to be any relevant logs (even with Debug and Info selected)
Browser log Two errors are logged to the browser console when opening the Photos app:
SW registration failed: TypeError: ServiceWorker script at https://nextcloud.mydomain.com/apps/photos/service-worker.js for scope https://nextcloud.mydomain.com/ encountered an error during installation. [Photos.vue:116](webpack:///photos/src/Photos.vue)
t Photos.vue:116
(Async: promise callback)
t Photos.vue:115
(Async: EventListener.handleEvent)
t Photos.vue:110
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
k AreTagsInstalled.js:25
a Photos.vue:107
beforeMount Photos.vue:107
beforeMount Photos.vue:107
beforeMount Photos.vue:107
VueJS 16
<anonymous> main.js:60
<anonymous> main.js:66
<anonymous> main.js:66
Error fetching timeline
Object { message: "Changed view" }
[Timeline.vue:281](webpack:///photos/src/views/Timeline.vue)
e Timeline.vue:281
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
N Loader.vue:20
o Loader.vue:20
(Async: promise callback)
N Loader.vue:20
a Loader.vue:20
U Loader.vue:20
U Loader.vue:20
getContent Timeline.vue:223
e vue-virtual-grid.es.js:430
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
r Actions.js:2
s Actions.js:2
s Actions.js:2
s Actions.js:2
value vue-virtual-grid.es.js:368
value vue-virtual-grid.es.js:416
t vue-virtual-grid.es.js:412
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
r Actions.js:2
s Actions.js:2
s Actions.js:2
s Actions.js:2
VueJS 5
value vue-virtual-grid.es.js:411
value vue-virtual-grid.es.js:395
VueJS 19
loading Photos.vue:1
VueJS 4
e Timeline.vue:285
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
N Loader.vue:20
a Loader.vue:20
(Async: promise callback)
N Loader.vue:20
a Loader.vue:20
U Loader.vue:20
U Loader.vue:20
getContent Timeline.vue:223
e vue-virtual-grid.es.js:430
u runtime.js:288
_invoke runtime.js:262
C runtime.js:84
r Actions.js:2
s Actions.js:2
Additional context
I do indeed have jpg/png/heic photos in my nextcloud /Photos directory.
For reference, the "Media" tab in the iOS Nextcloud app does show the photos (I'm not sure if the media tab pulls directly from the Photos app or not)
Is the photos directory an external folder?
@marcelklehr No, it's a native Nextcloud directory
Did it work sometime before for you and if so what did you change in the meantime?
I don't remember exactly when it worked last, but it definitely did work sometime prior to Nextcloud v23. In the mean time, I don't recall changing anything with the Photos application - i don't think there even are any configuration options. It's possible i deleted my Photos directory and re-created it at some point. Perhaps the photos app is still pointing to some kind of unique identifier for an old directory that doesn't exist anymore, but I thought it just scans all the nextcloud files for any photos.
Same problem for me. Used to work perfectly and stopped working (not displaying any photo anymore, not even newly uploaded ones) right after update to Nextcloud v24.
After updating to the lastest Nextcloud 24.0.3 this issue is solved for me.
@rodonile did you have to run preview-generator or something else after the update to get things working? I just updated but still see the issue🤔
@meichthys nope, literally just updated and photos started to appear there right after.
Ok, for now i will assume it is something with my configuration. (I'm using the Nextcloud VM)
I do also see the following in the console logs:

@meichthys I think the service worker is unrelated
I've deployed brand new, clean and empty 24.0.3 version via docker as it mentioned in the documentation (docker run -it --name nextcloud-aio-mastercontainer --restart always -p 80:80 -p 8080:8080 -p 8443:8443 --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /var/run/docker.sock:/var/run/docker.sock:ro nextcloud/all-in-one:latest) and have the same problem:
- If I just click "Photos" icon at the top, it works ok;
- If I then click "Your videos" from the left menu - it displays "no photos in here" (one video should be displayed here);
- If then I click "Your photos" - it also displays "no photos in here" (some default photos should be here);
- If then I switch to "Your folders" - it works;
- If then I switch back to "Your photos" - it works again (!);
- Any next switching except "Your folders" - brokes displaying.
When "no photos in here" is displaying, I see "Error fetching timeline" error in the browser console, and dav/ request (cancelled) status on the network tab.
Any suggestions?
@sergey-sml When you say "If I just click "Photos" icon at the top, it works ok;" do you see photos at that point, or are you just saying that it opens the app?
Closing this. The issue ended up being a hidden .noimage file which i must have added at some point in the past to get the photos app (previously gallery app) to ignore photos - not sure why i had that in my root directory!🤦♂️ The files app had show hidden files disabled!