cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

android instrumentation - finished with non-zero exit value 5

elalvin24
Newcomer

---18.680 FINE: APKit-C(1): Instrumenting all packages (for 3rd partyweb requests): true

---18.681 INFO: APKit-AdkInstrumentor(1): Dynatrace Auto-Instrumentation version 7.2.7.1233 for Android

---18.682 FINE: APKit-AdkInstrumentor(1): Unpacking APK and updating AndroidManifest.xml ...

---18.690 FINE: APKit-aG(14): ProcessStreamReader begins ...

---19.055 FINE: APKit-aG(14): ---18 AM brut.androlib.ApkDecoder decode

---19.055 FINE: APKit-aG(14): INFO: Using Apktool 2.3.3-ecb117-SNAPSHOT on app.apk

---19.075 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources loadMainPkg

---19.075 FINE: APKit-aG(14): INFO: Loading resource table...

---19.652 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources decodeManifestWithResources

---19.653 FINE: APKit-aG(14): INFO: Decoding AndroidManifest.xml with resources...

---19.668 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources getFrameworkDir

---19.669 FINE: APKit-aG(14): SEVERE: WARNING: Could not write to (/Users/---/Library/apktool/framework), using /var/folders/z8/xmqgl87x7fnb91f7m34dw8300000gq/T/ instead...

---19.669 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources getFrameworkDir

---19.670 FINE: APKit-aG(14): SEVERE: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable

---19.712 FINE: APKit-aG(14): ---19 AM brut.androlib.res.AndrolibResources loadFrameworkPkg

---19.713 FINE: APKit-aG(14): INFO: Loading resource table from file: /var/folders/z8/xmqgl87x7fnb91f7m34dw8300000gq/T/1.apk

---24.178 FINE: APKit-aG(14): ---24 AM brut.androlib.res.AndrolibResources adjustPackageManifest

---24.179 FINE: APKit-aG(14): INFO: Regular manifest package...

---24.180 FINE: APKit-aG(14): ---24 AM brut.androlib.res.AndrolibResources decode

---24.181 FINE: APKit-aG(14): INFO: Decoding file-resources...

---25.324 FINE: APKit-aG(14): ---25 AM sun.awt.SunDisplayChanger notifyListeners

---25.324 FINE: APKit-aG(14): FINEST: notifyListeners

---27.907 FINE: APKit-aG(14): Exception in thread "main" java.lang.NullPointerException

---27.908 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.reset(Matcher.java:416)

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)

---27.909 FINE: APKit-aG(14): at java.base/java.util.regex.Pattern.matcher(Pattern.java:1133)

---27.909 FINE: APKit-aG(14): at brut.androlib.res.data.value.ResStringValue.<init>(ResStringValue.java:46)

---27.910 FINE: APKit-aG(14): at brut.androlib.res.data.value.ResStringValue.<init>(ResStringValue.java:41)

---27.910 FINE: APKit-aG(14): at brut.androlib.res.data.value.ResValueFactory.factory(ResValueFactory.java:48)

---27.910 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:32)

---27.910 FINE: APKit-aG(14): at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:385)

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

---27.911 FINE: APKit-aG(14): at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

---27.915 FINE: APKit-aG(14): at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)

---27.916 FINE: APKit-aG(14): at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)

---27.918 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)

---27.918 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:136)

---27.919 FINE: APKit-aG(14): at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:120)

---27.920 FINE: APKit-aG(14): at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:260)

---27.921 FINE: APKit-aG(14): at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)

---27.922 FINE: APKit-aG(14): at brut.androlib.ApkDecoder.decode(ApkDecoder.java:142)

---27.922 FINE: APKit-aG(14): at brut.apktool.Main.cmdDecode(Main.java:168)

---27.922 FINE: APKit-aG(14): at brut.apktool.Main.main(Main.java:73)

---31.731 FINE: APKit-aG(14): ProcessStreamReader finished

---31.732 FINE: APKit-aG(1): syncExecProcess rc=1

---31.733 SEVERE: APKit-AdkInstrumentor(1): extracting the apk failed rc = 1

Throwable occurred: aC: extracting the apk failed rc = 1

at aG.a(SourceFile:199)

at aG.a(SourceFile:155)

at aG.a(SourceFile:150)

at v.a(SourceFile:142)

at e.f(SourceFile:181)

at e.<init>(SourceFile:88)

at a.<init>(SourceFile:27)

at com.dynatrace.android.instrumentation.AdkInstrumentor.c(SourceFile:337)

at com.dynatrace.android.instrumentation.AdkInstrumentor.main(SourceFile:247)


_____________


I see that there are errors that relates to Pattern and Matcher, but I don't think that is in my code right? Because I have been using that in the previous apk builds and I did not get this error before. Any help would be appreciated, thank you.

1 REPLY 1

Thomas_Wirth1
Dynatrace Champion
Dynatrace Champion

Hey Alvin,


The auto-instrumentor was not able to read a file successfully. Based on the reported stacktrace it is not possible to determine which value in which file the auto-instrumentor was not able to determine.

Normally, we would recommend to create a support ticket with the debug logs. But in this case it is different, because you are using version 7.x.


We strongly recommend to upgrade to version 8.x. This version contains several new features and improvements. Auto-instrumentation works differently in version 8.x compared to version 7.x and will not be affected by the reported problem.


official documentation: https://www.dynatrace.com/support/help/technology-support/operating-systems/android/

migration page: https://www.dynatrace.com/support/help/technology-support/operating-systems/android/legacy-documenta...

Featured Posts