Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

People: New face cannot be named due to invalid file or photo UID #4221

Closed
Radiokot opened this issue Apr 26, 2024 · 16 comments
Closed

People: New face cannot be named due to invalid file or photo UID #4221

Radiokot opened this issue Apr 26, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@Radiokot
Copy link
Collaborator

1. What is not working as documented?

Under the "People", "New" tab, I have a face of mine. I want to give it my name by selecting it from the dropdown list. I get "Entity not found" error.

image
image

2. How can we reproduce it?

I don't know, this is the only stuck "new face" I have this problem with.

3. What behavior do you expect?

I expect the face to be named successfully and disappear from the "New" tab.

4. What could be the cause of your problem?

🤷🏻‍♂️

5. Can you provide us with example files for testing, error logs, or screenshots?

Screenshot attached above.

6. Which software versions do you use?

(a) photoprism/photoprism:240420@sha256:3dc6b93163548fcd83c2a51e33562e079afa4b52f80883dc6f942a4ec7a99b37

(b) mariadb:10.5.12@sha256:dfcba5641bdbfd7cbf5b07eeed707e6a3672f46823695a0d3aba2e49bbd9b1dd

(c) Ubuntu

(d) Edge 124.0.2478.51 (Official build) (64-bit)

(e) Ad Blockers, Browser Plugins, and/or Firewall Software?

uBlock origin

7. On what kind of device is PhotoPrism installed?

This is especially important if you are reporting a performance, import, or indexing issue. You can skip this if you're reporting a problem you found in our public demo, or if it's a completely unrelated issue, such as incorrect page layout.

(a) x86_64 laptop, Intel Core i5

(b) Physical Memory & Swap Space in GB: 8/24

(c) SSD

(d) Anything else that might be helpful to know?

Always provide device, memory, and storage details if you have a backend, performance, import, or indexing issue.

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

Cloudflare tunnel, but it doesn't matter for the issue.

@Radiokot Radiokot added the bug Something isn't working label Apr 26, 2024
@graciousgrey
Copy link
Member

Thank you very much for reporting.

If you click on the face, do you see the photos that are assigned to this face cluster? Could you turn on trace logs and watch them while you try to name the face? This could give us a hint as to where the problem might lie.

@Radiokot
Copy link
Collaborator Author

  • If I click on this face, I see 8 other photos with me from this day, so it works;
  • Here's the trace log output when I try to name the face:
web_1        | 2024-04-29T07:42:09.566468244Z time="2024-04-29T07:42:09Z" level=debug msg="api-v1: abort /api/v1/markers/:marker_uid with code 404 (entity not found)"
web_1        | 2024-04-29T07:42:09.566612417Z time="2024-04-29T07:42:09Z" level=debug msg="faces: file fscche6v4nz4g9n0 record not found (find marker to update)"
web_1        | 2024-04-29T07:42:09.566910219Z time="2024-04-29T07:42:09Z" level=debug msg="server: PUT /api/v1/markers/mscche6odyxe9a2q (404) [21.176438ms]"

@Radiokot
Copy link
Collaborator Author

Well, the file fscche6v4nz4g9n0 this face marker refers to is indeed not there: search for uid:fscche6v4nz4g9n0 gives not results

@Radiokot
Copy link
Collaborator Author

I think this may be caused by re-uploading the updated version of this exact photo and then running index cleanup.
This is what I remember doing before facing this bug:

  1. Upload the photo (WebDAV to originals)
  2. Get it indexed
  3. Crop the original photo on the phone (keeping the file name)
  4. Upload it again
  5. Get it indexed again
  6. Run the index with "Cleanup" checkbox

@lastzero
Copy link
Member

It may be that cleanup currently does not remove related face markers when permanently deleting other index entries.

@lastzero
Copy link
Member

Does a full rescan fix this?

@Radiokot
Copy link
Collaborator Author

I'll launch full rescan now

@Radiokot
Copy link
Collaborator Author

It did not help: the stray marker remained there.
However, by opening the updated photo and naming my face on the "People" tab, I was able to finally get rid of it 👌🏻

@lastzero
Copy link
Member

The "faces audit --fix" command might have helped as well.

@lastzero
Copy link
Member

lastzero commented Apr 29, 2024

From what I remember, markers reference the sha1 hash and the file or photo UID. So if you re-upload the same file with a (now) different UID, that might not cause the existing marker to get removed. The update method might then try to find the old file / photo, which fails since the stored UID is wrong.

@Radiokot
Copy link
Collaborator Author

Thanks for help and clarification, Michael

@lastzero
Copy link
Member

lastzero commented May 8, 2024

@Radiokot There is a good chance that this problem cannot occur anymore with these changes:

Would you be able to test this for us and report back (or otherwise close this issue)?

@lastzero lastzero changed the title New face can't be named – Entity not found People: New face cannot be named due to invalid file or photo UID May 8, 2024
@lastzero lastzero added the please-test Ready for acceptance test label May 8, 2024
@lastzero lastzero assigned Radiokot and unassigned lastzero May 8, 2024
@Radiokot
Copy link
Collaborator Author

Radiokot commented May 8, 2024

Sorry, Michael, I can't test it as my Intel server capable of face recognition is not currently running and needs repair.

@graciousgrey
Copy link
Member

I will then try to reproduce it. Good luck with the repair!

@graciousgrey
Copy link
Member

Unfortunately, I could not reproduce this. I replaced a file that was used as a cover for a new face with a cropped version and ran the indexing with the cleanup option enabled. I also tried complete indexing and no indexing, but in neither case did I get the "Entity not found" error message when I subsequently named the new face.

@Radiokot
Copy link
Collaborator Author

Radiokot commented May 9, 2024

Okay, thank you for checking it, Theresa, the issue is to be closed as it can't be reproduced, and the original problem is solved anyway.

@Radiokot Radiokot closed this as completed May 9, 2024
@graciousgrey graciousgrey removed the please-test Ready for acceptance test label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Preview 🐳
Development

No branches or pull requests

3 participants