π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Log format of decoding error
laurenspriem012164355833
diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dartindex 5a562b710b..ef428f3946 100644--- a/mobile/lib/services/machine_learning/ml_service.dart+++ b/mobile/lib/services/machine_learning/ml_service.dart@@ -477,10 +477,9 @@ class MLService {);acceptedIssue = true;}- if (errorString- .contains('InvalidImageFormatException: Error decoding image')) {+ if (errorString.contains('InvalidImageFormatException')) {_logger.severe(- 'InvalidImageFormatException while processing image with ID ${instruction.file.uploadedFileID}, storing empty results so indexing does not get stuck',+ '$errorString with ID ${instruction.file.uploadedFileID}, storing empty results so indexing does not get stuck',e,s,);diff --git a/mobile/lib/utils/image_ml_util.dart b/mobile/lib/utils/image_ml_util.dartindex 6e44f1430f..ee259dd8af 100644--- a/mobile/lib/utils/image_ml_util.dart+++ b/mobile/lib/utils/image_ml_util.dart@@ -35,7 +35,7 @@ Future<(Image, ByteData)> decodeImageFromPath(String imagePath) async {await HeifConverter.convert(imagePath, format: 'jpg');if (jpgPath == null) {_logger.severe('Error converting $format to jpg:', e, s);- throw Exception('InvalidImageFormatException: Error decoding image');+ throw Exception('InvalidImageFormatException: Error decoding image of format $format');}final imageData = await File(jpgPath).readAsBytes();final image = await decodeImageFromData(imageData);@@ -43,11 +43,11 @@ Future<(Image, ByteData)> decodeImageFromPath(String imagePath) async {return (image, imageByteData);} else {_logger.severe(- 'Error decoding image of format ${imagePath.split('.').last}:',+ 'Error decoding image of format $format:',e,s,);- throw Exception('InvalidImageFormatException: Error decoding image');+ throw Exception('InvalidImageFormatException: Error decoding image of format $format');}}}