You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($metadata->getEtag('blurhash') === $currentEtag) {
return;
Regression from #42707 ?
This obviously works when there's already metadata available for that file, but it fails, when blurhash is the first one to generate metadata.
diff --git a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
index b57dfa317e4..15b830c0a88 100644
--- a/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php+++ b/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php@@ -74,8 +74,12 @@ class GenerateBlurhashMetadata implements IEventListener {
$currentEtag = $file->getEtag();
$metadata = $event->getMetadata();
- if ($metadata->getEtag('blurhash') === $currentEtag) {- return;++ try {+ if ($metadata->getEtag('blurhash') === $currentEtag) {+ return;+ }+ } catch (FilesMetadataNotFoundException) {
}
// too heavy to run on the live thread, request a rerun as a background job
Steps to reproduce
Upload a picture and wait for the exception
Expected behavior
Handle FilesMetadataNotFoundException exception correctly and generate blurhash.
Installation method
None
Nextcloud Server version
master
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Default user-backend (database)
LDAP/ Active Directory
SSO - SAML
Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered:
Bug description
Full exception:
If I understand the issue correctly, the issue is that
getEtag
throws aFilesMetadataNotFoundException
here, when the key does not exist:server/lib/private/FilesMetadata/Model/FilesMetadata.php
Lines 160 to 163 in 3fa5e59
But trying to generate a blurhash, this exception is not caught, therefore the blurhash metadata is never generated:
server/lib/private/Blurhash/Listener/GenerateBlurhashMetadata.php
Lines 75 to 78 in 79e9cdc
Regression from #42707 ?
This obviously works when there's already metadata available for that file, but it fails, when blurhash is the first one to generate metadata.
@ArtificialOwl
I assume something like this is needed?
Steps to reproduce
Expected behavior
Handle
FilesMetadataNotFoundException
exception correctly and generate blurhash.Installation method
None
Nextcloud Server version
master
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: