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

Prevent error on generating thumbnails #1834

Closed
wants to merge 1 commit into from

Conversation

adriano-pinaffo
Copy link

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.

@szaimen szaimen added the 3. to review Waiting for reviews label May 29, 2023
@szaimen szaimen added this to the Nextcloud 28 milestone May 29, 2023
@marcelklehr
Copy link
Member

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.

@artonge
Copy link
Collaborator

artonge commented May 30, 2023

@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.

@marcelklehr
Copy link
Member

here you go: nextcloud/recognize@0fdb558

@adriano-pinaffo
Copy link
Author

@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

@marcelklehr
Copy link
Member

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

@adriano-pinaffo
Copy link
Author

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

image

@SeanDS
Copy link

SeanDS commented Sep 13, 2023

@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
Copy link

SeanDS commented Sep 14, 2023

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.

@blizzz blizzz added this to the Nextcloud 30 milestone Apr 8, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 22, 2024
44 tasks
@AndyScherzinger
Copy link
Member

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

@artonge
Copy link
Collaborator

artonge commented Aug 22, 2024

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 artonge closed this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants