photos icon indicating copy to clipboard operation
photos copied to clipboard

Prevent error on generating thumbnails

Open adriano-pinaffo opened this issue 2 years ago • 8 comments

When generating the thumbnails the parsing throws an error if the file property representing the image size metadata is an empty string. This protects the string by making it be a "{}" if the string is empty. This is described in #1833.

adriano-pinaffo avatar May 28 '23 23:05 adriano-pinaffo

I've recently fixed a bug in recognize that would cause this, so this might not be necessary, but we can add it for good measure.

marcelklehr avatar May 30 '23 08:05 marcelklehr

@marcelklehr can you point to the fix and @adriano-pinaffo can you check if this fix the issue for you? I would rather fix the issue than silent the error.

artonge avatar May 30 '23 08:05 artonge

here you go: https://github.com/nextcloud/recognize/commit/0fdb558f46df1141d4f205d3eb6fa09104a73c71

marcelklehr avatar May 30 '23 09:05 marcelklehr

@artonge @marcelklehr it seems it won't fix the issue because my FacePhoto.php's getMetadata() is already returning the data JSON encoded. See below: image

adriano-pinaffo avatar May 30 '23 11:05 adriano-pinaffo

@adriano-pinaffo Could you disable recognize to check whether this bug stems from recognize then?

marcelklehr avatar May 30 '23 12:05 marcelklehr

I disabled Recognize, went back to Photos and CTRL+F5 it... still, Images are not shown

image

adriano-pinaffo avatar May 30 '23 17:05 adriano-pinaffo

@marcelklehr I had this issue with Photos before installing Memories. Since installing Memories I am able to view the photos there but not in the Photos app.

It might be useful to note, that I only started to get this issue in Photos after I ran files:scan, files:repair-tree, files:cleanup and files:scan-app-data operations with occ after I manually modified the file system. This is probably related.

SeanDS avatar Sep 13 '23 11:09 SeanDS

Update: I fixed it by running occ files:scan --all then occ files:scan --all --generate-metadata, also having updated to 26.0.1 to 26.0.5.

SeanDS avatar Sep 14 '23 06:09 SeanDS

@artonge what do you think still needed or fixed and can be closed?

AndyScherzinger avatar Aug 22 '24 07:08 AndyScherzinger

The code has changed since then. I don't see how the error could occur at the time, and don't see how it could occur now. Feel free to reopen if needed.

artonge avatar Aug 22 '24 08:08 artonge