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

BuildInfoExtractorUtils#searchAdditionalPropertiesFile(...) fails with "Malformed \uxxxx encoding " #799

Open
rzo1 opened this issue Jul 19, 2024 · 1 comment
Labels
bug Create a report to help us improve

Comments

@rzo1
Copy link

rzo1 commented Jul 19, 2024

Describe the bug

As reported in jfrog/jenkins-artifactory-plugin#913, the BuildInfoExtractorUtils might fail due to "Malformed \uxxxx encoding " in some rare occasions.

To Reproduce
We didn't manage to reproduce it, because it is merly impossible to debug which file is causing it in a production environment running Jenkins CI

Expected behavior
The extractor shouldn't hard fail here. Maybe we can (silently?) ignore the exception or catch it accordingly as proposed in jfrog/jenkins-artifactory-plugin#913 (comment).

Versions

Additional context
Add any other context about the problem here.

@rzo1 rzo1 added the bug Create a report to help us improve label Jul 19, 2024
@rzo1
Copy link
Author

rzo1 commented Jul 19, 2024

Wonder, if we can add a

Index: build-info-extractor/src/main/java/org/jfrog/build/extractor/BuildInfoExtractorUtils.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/BuildInfoExtractorUtils.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/BuildInfoExtractorUtils.java
--- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/BuildInfoExtractorUtils.java	(revision b82ee0627bd002fc987e85898d3ba48f950a6366)
+++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/BuildInfoExtractorUtils.java	(date 1721392549052)
@@ -114,7 +114,7 @@
                 }
             }
         } catch (IOException | InvalidAlgorithmParameterException | IllegalBlockSizeException | NoSuchPaddingException |
-                 BadPaddingException | NoSuchAlgorithmException | InvalidKeyException e) {
+                 BadPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalArgumentException e) {
             throw new RuntimeException("Unable to load build info properties from file: " + propertiesFile.getAbsolutePath(), e);
         }
         return props;

for now, so it becomes more evident in jfrog/jenkins-artifactory-plugin#913 which file actually causes this behaviour. Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

1 participant