Faces content display fails consistently
Describe the bug Displaying faces (generated through the recognize app) fails pretty consistently on my instance, and I haven't seen any other reports of this exact issue, which I'm a little confused by since it feels like a major issue with the faces section that others should've already encountered.
Displaying the faces list in the photos app works perfectly fine, but clicking into any individual face causes a sort of "loading animation" to display briefly (of a bunch of rectangles where the photos will display), followed by them all disappearing. The error message shown below is then displayed in the browser console.
What's notable to me is that, accessing the face groups using a dav mount on my computer directly still works perfectly fine, and all the faces are mapped as I would expect them to be. So this appears to solely be a display bug in the photos app, and nothing to do with the face generation or storage on recognize's side.
I'm sorry if I'm missing anything obvious! I checked around a ton and also tried to install a development version of the photos app to see if this issue is already fixed in some capacity, but that didn't end up working out the way I'd wanted. I also tried all the usual things like clearing caches, restarting every involved component, disabling Cloudflare proxying, and so on, but the issue persisted.
To Reproduce Steps to reproduce the behavior:
- Go to the photos app's face section
- Click on a face
- See described error
Expected behavior The face content displays normally, including all the photos that match it.
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Firefox, also tested with Edge for the same behavior
- Version: Firefox 140.0.4, NC 31.0.7, Photos 4.0.0, Recognize 9.0.3 (all most recent at time of writing)
Browser log
[ERROR] photos: Error fetching face files
Object { app: "photos", uid: "Ellpeck", level: 2, error: TypeError }
β
app: "photos"
β
error: TypeError: can't access property "replace", e is undefined
β
level: 2
β
uid: "Ellpeck"
β
<prototype>: Object { β¦ }
ConsoleLogger.js:74:19
Additional context
I did some Firefox debugger debugging and found out the following extra information, which may be useful! Notably, the real data of the object whose realname the app tries to fetch.
basename: "71056-PXL_20211217_145347097.jpg"
β
etag: "f4207e02f25b6861bf2a7040a745133b"
β
favorite: 0
β
fileid: 12409834
β
filename: "/recognize/Ellpeck/faces/Nico/71056-PXL_20211217_145347097.jpg"
β
getcontentlength: 2107409
β
getcontenttype: "image/jpeg"
β
getetag: "f4207e02f25b6861bf2a7040a745133b"
β
getlastmodified: "Fri, 17 Dec 2021 14:53:50 GMT"
β
hasPreview: true
β
lastmod: "Fri, 17 Dec 2021 14:53:50 GMT"
β
metadataPhotosOriginalDateTime: 1639756427
β
metadataPhotosSize: {β¦}
β
mime: "image/jpeg"
β
permissions: "GDNVW"
β
resourcetype: ""
β
size: 2107409
β
source: "https://cloud.ellpeck.de/remote.php/dav/recognize/Ellpeck/faces/Nico/71056-PXL_20211217_145347097.jpg"
β
type: "file"
While this is a specific example, please note that this happens for every face in my collection.
I also noticed that the main branch version of FetchFacesMixin is very different from the version I have (and the version the 31.0.7 tag has), but I don't know how much of a difference that would make, since the props property is also not present on my version of the object being queried.
I am experiencing the same issue. Running the latest (31.0.7) docker image nextcloud:31-fpm
[ERROR] photos: Error fetching face files Object { app: "photos", uid: "USER", level: 2, error: TypeError } β app: "photos" β error: TypeError: can't access property "replace", e is undefined β level: 2 β uid: "USER" β <prototype>: Object { β¦ } ββ __defineGetter__: function __defineGetter__() ββ __defineSetter__: function __defineSetter__() ββ __lookupGetter__: function __lookupGetter__() ββ __lookupSetter__: function __lookupSetter__() ββ __proto__: ββ constructor: function Object() ββ hasOwnProperty: function hasOwnProperty() ββ isPrototypeOf: function isPrototypeOf() ββ propertyIsEnumerable: function propertyIsEnumerable() ββ toLocaleString: function toLocaleString() ββ toString: function toString() ββ valueOf: function valueOf() ββ <get __proto__()>: function __proto__() ββ <set __proto__()>: function __proto__()
same isshu error in browser console
index.mjs:51 [WARN] viewer: Some mimes were ignored because they are not enabled in the server previews config Object log @ index.mjs:51 NotificationsApp.vue:434 Notifications permissions not yet requested content_script_bundle.js:1 Attempting initialization Wed Jul 23 2025 09:54:03 GMT+0530 (India Standard Time) vue.runtime.esm.js:7399 Error: <svg> attribute width: Expected length, "auto". Nr @ vue.runtime.esm.js:7399 vue.runtime.esm.js:7399 Error: <svg> attribute height: Expected length, "auto". Nr @ vue.runtime.esm.js:7399 undefined:1 Failed to load resource: the server responded with a status of 404 (Not Found) ConsoleLogger.js:74 [ERROR] photos: Error fetching face files {app: 'photos', uid: 'Ritik', level: 2, error: TypeError: Cannot read properties of undefined (reading 'replace') at Object.T (https://nextcloβ¦} value @ ConsoleLogger.js:74 value @ ConsoleLogger.js:100 fetchFaceContent @ FetchFacesMixin.js:136 await in fetchFaceContent mounted @ FaceContent.vue:280 pn @ vue.runtime.esm.js:3033 Vn @ vue.runtime.esm.js:4048 insert @ vue.runtime.esm.js:4443 w @ vue.runtime.esm.js:6966 Ni.nodeOps @ vue.runtime.esm.js:7180 e._update @ vue.runtime.esm.js:3785 a @ vue.runtime.esm.js:3891 e.get @ vue.runtime.esm.js:3462 e.run @ vue.runtime.esm.js:3538 oa @ vue.runtime.esm.js:4141 (anonymous) @ vue.runtime.esm.js:3159 Fn @ vue.runtime.esm.js:3081 Promise.then vn @ vue.runtime.esm.js:3106 xn @ vue.runtime.esm.js:3171 sa @ vue.runtime.esm.js:4227 e.update @ vue.runtime.esm.js:3529 e.notify @ vue.runtime.esm.js:732 set @ vue.runtime.esm.js:976 (anonymous) @ vue-router.esm.js:3005 (anonymous) @ vue-router.esm.js:3004 Me.updateRoute @ vue-router.esm.js:2414 (anonymous) @ vue-router.esm.js:2263 (anonymous) @ vue-router.esm.js:2402 a @ vue-router.esm.js:2084 a @ vue-router.esm.js:2091 xe @ vue-router.esm.js:2095 (anonymous) @ vue-router.esm.js:2397 a @ vue-router.esm.js:2084 (anonymous) @ vue-router.esm.js:2088 (anonymous) @ vue-router.esm.js:2384 (anonymous) @ vue-router.esm.js:2127 (anonymous) @ vue-router.esm.js:2203
Same issue on Chrome 138.0.7204.159 Windows Chrome 138.0.7204.158 Android Firefox Standard Release 141.0 Windows and Android
I hope he doesn't mind, but I'm just going to ping @marcelklehr since he seems to be the one responsible for changes/bugfixes to the People section of the Photos app, and this seems to be a pretty major one :)
Thanks for pinging me. I am aware of this issue and I also would like to see this working. I was responsible for the intial implementation of the people section, however, I am not the maintainer of this app.
I'm experiencing the same issue, would love to see a path towards a resolution.
cc @artonge @skjnldsv as maintainers
Some code migration as been made for NC32, typescript and lib update, so it might have been fixed in the process.
I'm still experiencing this with Photos 4.0.0 on nextcloud v31.0.8
To be more explicit, the migrations were done for NC32, and therefore, Photos 5.0.0
I am actually switching to Immich because of this issue for photo galleries.
The error is likely on https://github.com/nextcloud/photos/blob/295cb7fb1c308d03996475e64e5d7bcf810ebeea/src/mixins/FetchFacesMixin.ts#L173 due to the error message saying "replace"
Unfortunately, it isn't aas simple as adding a ?. Adding that or
.filter((t) => t.realpath)
Just prevents the undefined error, but you would still get no results. Which would likely mean that
https://github.com/nextcloud/photos/blob/295cb7fb1c308d03996475e64e5d7bcf810ebeea/src/mixins/FetchFacesMixin.ts#L161
May be giving results that are wrong.
Anyway I think if the devs want to fix it, it may be as simple as changing the logic of
https://github.com/nextcloud/photos/blob/295cb7fb1c308d03996475e64e5d7bcf810ebeea/src/mixins/FetchFacesMixin.ts#L120 and
https://github.com/nextcloud/photos/blob/295cb7fb1c308d03996475e64e5d7bcf810ebeea/src/mixins/FetchFacesMixin.ts#L170C1-L176C52
To this when unminified, basically it doesn't bother with doing the filename manipulation if realpath is not present (not sure when it would be present to begin with, but this will keep it working the way it used to. I tested only by patching
the unminified apps/photos/js/photos-src_components_Faces_FaceCover_vue.js since I couldn't get this bloody thing to build from source
In addition faceDetections may be missing as well
.map((t) => (t.realpath ? {
...t,
filename: p()
.decode(t.realpath)
.replace(`/${(0, i.HW)().uid}/files`, `/files/${(0, i.HW)().uid}`),
} : t))
.map((t) => ({
...t,
faceDetections: t.faceDetections
? JSON.parse(p().decode(t.faceDetections))
: [], // this works but I don't know the API spec so I don't know if this can be `{}` or `null`
}))
Source is
.map((file) => ({
...file,
filename: he.decode(file.props?.realpath).replace(`/${getCurrentUser()?.uid}/files`, `/files/${getCurrentUser()?.uid}`),
'face-detections': JSON.parse(he.decode(file.props?.['face-detections'])),
}))
To
.map((file) => (file.realpath ? {
...file,
filename: he.decode(file.props?.realpath).replace(`/${getCurrentUser()?.uid}/files`, `/files/${getCurrentUser()?.uid}`),
'face-detections': file.props?.['face-detections'] ? JSON.parse(he.decode(file.props?.['face-detections']): []),
}: file))
If anyone wants to make a PR with this information feel free to do so.
Note if you implement, it will still get 404 on some DAV stuff but at least you can see the photos.
Is there any progress on this issue? I'm keeping an eye on the solution.
I also recommend using the "memories" plugin for those experiencing this issue.