pulsejet / memories

Fast, modern and advanced photo management suite. Runs as a Nextcloud app.
https://memories.gallery
GNU Affero General Public License v3.0
3.21k stars 87 forks source link

Unable to set the Cover Image for people under certain conditions #1310

Open Andreaux opened 1 month ago

Andreaux commented 1 month ago

Describe the bug

I was unable to set the cover image for certain faces while it seemed to work for others and there was no error in the logs. It really seemed odd as it looked unrelated to the type of image I select to be the cover image for the face or where the selected image is located. I tried all kinds of things and finally looks like I narrowed it down to the length of the names. I am unable to set any image as cover for a person named "Kriszti" for example, but it works just fine if I add a single character to the name, for example "Krisztin"... it is then possible to change the cover image. If I revert the name back to anything shorter than 8 characters (7 or less) it will fail again.

EDIT: I just tried with "David" and it didn't fail, so there has to be something else too. The fact that it failed with my example still holds.

Steps To Reproduce

  1. go into "People"
  2. choose a face to experiment with
  3. change the name of the person to anything 1-word and less than 8 characters (in my case Kriszti)
  4. try to set a cover image for the face (it will likely fail with "Failed to set cover image")
  5. change the name to anything with 8 or more characters (in my case Krisztin)
  6. try to set the same cover image again (it will succeed)
  7. observe no errors in the log.

Platform

- OS: irrelevant
- Browser: irrelevant
- Memories Version: 7.4.1
- Recognize: 8.1.0
- Nextcloud Version: 30.0.0
- PHP Version: 8.2.23

Screenshots

No response

Additional context

No response

Andreaux commented 1 month ago

To add insult to injury, I just tried with "David" and it did not fail. I might have to scratch my theory there. I'm changing the name of the bug as I'm not really sure anymore about reproducing it, however, it is still there.

pulsejet commented 1 month ago

Interesting. We don't really use the name for this at all so someone else is going on here, maybe a collision.

Andreaux commented 1 month ago

Collision of what? Where and what should I check? I'd love to help.

pulsejet commented 1 month ago

Can't say, but here are a couple of things to check -

  1. Refresh browser / use a different device.
  2. Check JS console for any logs? The network tab should have the failed request and it's response too.

I did try setting a face to Kriszti in my dev setup and it works as expected.

Andreaux commented 1 month ago

Ok, so I have an error in the console when it fails. When I shorten the name and it succeeds, there is zero error. When it fails, I see this: Annotation 2024-10-14 041700 Annotation 2024-10-14 042255 Annotation 2024-10-14 042354