[BUG] Can't change feature photo #1195

Closed
opened 2026-02-05 00:50:28 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Snyaify on GitHub (Aug 7, 2023).

The bug

Trying to change feature photo an identified person throught facial recognizion fail with error:

[Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Unable to run job handler: Error: Expected integer for width but received -2 of type number

[Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Error: Expected integer for width but received -2 of type number
at Object.invalidParameterError (/usr/src/app/node_modules/sharp/lib/is.js:124:10)
at Sharp. (/usr/src/app/node_modules/sharp/lib/resize.js:442:16)
at Array.forEach ()
at Sharp.extract (/usr/src/app/node_modules/sharp/lib/resize.js:437:38)
at MediaRepository.crop (/usr/src/app/dist/infra/repositories/media.repository.js:20:14)
at FacialRecognitionService.handleGenerateFaceThumbnail (/usr/src/app/dist/domain/facial-recognition/facial-recognition.services.js:149:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /usr/src/app/dist/domain/job/job.service.js:104:37
at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:342:28)
at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:525:24)
[Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Object:
{
"personId": "adfb289e-4869-4e6d-bc55-3450211de93c",
"assetId": "8a971994-4e5f-4f11-9f96-92436aa99399",
"boundingBox": {
"x1": 0,
"x2": 0,
"y1": 0,
"y2": 0
},
"imageHeight": 0,
"imageWidth": 0
}

The OS that Immich Server is running on

Unraid OS throught docker compose

Version of Immich Server

1.72.1

Version of Immich Mobile App

1.72

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

default from github

Your .env content

default from github

Reproduction steps

1. Open Explore tab throught web immich web interface
2. Select identified person
3. Press 3 dot's on right upper corner
4. Select "Change feature photo"
5. Select photo that should be used as person picture

Additional information

Here is a video with error:
https://clouds.be4free.ru/s/5Ntd3MsK6RcNRnN

Originally created by @Snyaify on GitHub (Aug 7, 2023). ### The bug Trying to change feature photo an identified person throught facial recognizion fail with error: [Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Unable to run job handler: Error: Expected integer for width but received -2 of type number -- [Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Error: Expected integer for width but received -2 of type number at Object.invalidParameterError (/usr/src/app/node_modules/sharp/lib/is.js:124:10) at Sharp.<anonymous> (/usr/src/app/node_modules/sharp/lib/resize.js:442:16) at Array.forEach (<anonymous>) at Sharp.extract (/usr/src/app/node_modules/sharp/lib/resize.js:437:38) at MediaRepository.crop (/usr/src/app/dist/infra/repositories/media.repository.js:20:14) at FacialRecognitionService.handleGenerateFaceThumbnail (/usr/src/app/dist/domain/facial-recognition/facial-recognition.services.js:149:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /usr/src/app/dist/domain/job/job.service.js:104:37 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:342:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:525:24) [Nest] 7 - 08/07/2023, 12:34:40 PM ERROR [JobService] Object: { "personId": "adfb289e-4869-4e6d-bc55-3450211de93c", "assetId": "8a971994-4e5f-4f11-9f96-92436aa99399", "boundingBox": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "imageHeight": 0, "imageWidth": 0 } ### The OS that Immich Server is running on Unraid OS throught docker compose ### Version of Immich Server 1.72.1 ### Version of Immich Mobile App 1.72 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML default from github ``` ### Your .env content ```Shell default from github ``` ### Reproduction steps ```bash 1. Open Explore tab throught web immich web interface 2. Select identified person 3. Press 3 dot's on right upper corner 4. Select "Change feature photo" 5. Select photo that should be used as person picture ``` ### Additional information Here is a video with error: [https://clouds.be4free.ru/s/5Ntd3MsK6RcNRnN](https://clouds.be4free.ru/s/5Ntd3MsK6RcNRnN)
Author
Owner

@bo0tzz commented on GitHub (Aug 7, 2023):

After this feature was added, have you rerun the face recognition job for all assets? You need to do that to calculate the bounding boxes of each face, as they weren't stored before.

@bo0tzz commented on GitHub (Aug 7, 2023): After this feature was added, have you rerun the face recognition job for all assets? You need to do that to calculate the bounding boxes of each face, as they weren't stored before.
Author
Owner

@Snyaify commented on GitHub (Aug 7, 2023):

bo0tzz
I guess not, i'll try. Thank you

@Snyaify commented on GitHub (Aug 7, 2023): **bo0tzz** I guess not, i'll try. Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1195