Troubleshooting
These are some common issues you may encounter while protecting your product with PreEmptive Protection™ DashO™ for Android & Java. If you don't see your specific issue below, try configuring DashO to log additional information. The DashO Gradle Plugin for Android and DashO Gradle Plugins for Java each have their own troubleshooting sections. If you are using either of these integrations, check out their troubleshooting pages here:
- How to Enable Verbose or Debug Logging
- UI Issues
- Performance Issues
- Errors
- Error: Error creating output file for {some class}: While parsing {some class and method}
- Error: Method code too large!
- Error: {some number}
- Error: Class not found {some class}; super class of {some other class}
- Error: Unable to resolve common supertype for: {some class} and {some other class}
- Missing org.apache.http.impl.client.DefaultHttpClient in an Android project.
- Error: Required Method Not Found: {some class and method} call to method {some method} in [class|interface] {some other class}
- Error: Unable to add to path: {some path}: {message}
- Error: Unable to add to path: {some path}: DashO does not currently support multidex APKs.
- Error: {some class} did not match any classes in the input path.
- Error: Method {some class and method} not found.
- Error: Recursive definition at position {i} in "${expression}"
- Error: Invalid Regular Expression used in {context} : {expression} : {details}
- Error: Error reading {path to project.dox} - Illegal version number: X.Y.Z
- Error: Error caching inputs: {some message}
- Error: Issue decoding APK
- Error: Wildcard method call removal is no longer supported: {some instance}
- Error: Unexpected path map version "{some version}" (expected: {some other version}).
- Error: Error reading {some class}.{some method}. This method may have been already protected by DashO.
- Warnings
- Warning: A path in ${gradleInput} does not appear to contain any classes.
- Warning: File format changed. project.dox (vX.Y.Z) has been updated to vX.Y.Z. Please save the updated version.
- Warning: Duplicate class {some class} in {some path} ignored; using version from {some other path}
- Warning: Required Method Not Found: {some class and method} call to method {some method} in [class|interface] {some other class}
- Warning: The 'EnclosingMethod' attribute of class '{some class}' references '{some other class}' which was not part of the inputs, and will be retained unmodified in the obfuscated output.
- Warning: Your Android Mode project file contains {some configuration element}. This is ignored in Android Mode.
How to Enable Verbose or Debug Logging
DashO can be configured to log additional information:
- If running the DashO GUI, use a Logging Level of
Verbose
(orDebug
) and selectPrint Stack Traces
in the preferences. - If running the DashO command line, add the arguments:
--verbose
(or--debug
) and--printStackTraces
when runningdashocmd
. - If running DashO via the DashO Gradle Plugins for Java, add
verbose = true
(ordebug = true
) todashOConfig
. - If running DashO via the DashO Gradle Plugin for Android, add
verbose true
(ordebug true
) todasho
. - If running DashO via the Ant integration, set
verbose="true"
andprintstacktraces="true"
in theobfuscate
task. It may also be helpful to set anoutput
and/orerror
file.
UI Issues
DashO Does Not Launch
Try running java -jar DashOProGUI.jar
in DashO Home from a command prompt.
If that works, verify the Java runtime specified in your DashO configuration.
High-DPI and Scaling Issues
Desktop apps that run on Java (i.e. DashO) often render poorly under Windows on high-DPI displays when scaling is turned up above 100%.
These issues manifest themselves in DashO's GUI as truncated tooltips (e.g. View the User
instead of View the User Guide
), smaller icons, and a small splash screen image.
The rendering can be improved by changing a Windows setting for javaw.exe
:
- Determine the location of the JDK (or JRE) used to run DashO.
- In Windows Explorer, locate
javaw.exe
(it will be in eitherbin
orjre/bin
). - Right-click on
javaw.exe
and chooseProperties
. - Go to the
Compatibility
section. - Check
Override high DPI scaling behavior
. - Choose
System
. - Click
OK
Performance Issues
Android Mode Build Takes Longer than Expected
The DashO Gradle Plugin for Android protects all available code in Android application builds, including any library projects or third party libraries on which your application directly or indirectly depends. This results in strong protection, as String Encryption and Control Flow Obfuscation combined with R8's renaming make it difficult for an attacker to differentiate between your application's classes and those of common libraries. However, you may want to reduce the number of classes that DashO processes if you are concerned about build times.
It is likely that many of your application's dependencies are Android support libraries, these can be excluded from protection by adding excludeFromProtection "^android"
to dasho
.
DashO will then exclude all inputs whose names start with android
.
You can also use Global Exclusions to prevent DashO from processing classes in certain packages. The specific packages that you may want to exclude will vary from project to project.
Errors
Error: Error creating output file for {some class}: While parsing {some class and method}
Run DashO again with debug logging and contact support with the logs.
You can try excluding some class and method
from protection to work around the issue.
Error: Method code too large!
Some of DashO's protection techniques may increase the overall code size of a method. In rare instances, the protection may increase the methods to be larger than the Java Virtual Machine will support. Run DashO again with debug logging to determine the class and method being written. You can either exclude the method from protection or refactor the code to have smaller methods.
Error: {some number}
Run DashO again with debug logging and contact support with the logs. If you can determine the class or method being manipulated at the time, you can try to exclude it from protection to work around the issue.
Error: Class not found {some class}; super class of {some other class}
When determining how classes are used and what can be renamed, DashO must have access to the super class to determine which methods are inherited and which are overridden.
You should add the jar containing some class
to the supporting classpath (or to the inputs if it also needs to be protected by DashO).
If some class
is java.lang.Object
, you need to configure Include JDK (or add android.jar
to the support classpath, if this is an Android project).
If some other class
is a class you do not feel is really used by your application, check the Removal configuration.
If DashO is configured to not remove unused classes, the super classes of all the input classes need to be accessible.
Error: Unable to resolve common supertype for: {some class} and {some other class}
This error is typically caused by either some class
or some other class
not being found in the inputs or support classpath.
Enable Print Stack Traces for more information on the underlying issue.
Missing org.apache.http.impl.client.DefaultHttpClient in an Android project.
Google stopped distributing this class inside android.jar
with Marshmallow(6.0 - SDK v23).
Add ${sdk.dir}/platforms/${sdk.target}/extras/org.apache.http.legacy.jar
to the support classpath.
Error: Required Method Not Found: {some class and method} call to method {some method} in [class|interface] {some other class}
While traversing the execution path of some class and method
, some method
was not found in some other class
.
This can happen if you referenced the wrong version of a support library in the DashO configuration.
Verify your inputs and support classpath.
You can downgrade this to a warning by checking Ignore Missing Methods.
Error: Unable to add to path: {some path}: {message}
An error occurred when trying to read an input or support classpath entry.
The message
will have additional details.
Verify the entry (or the User Property definition(s) expanded by the entry).
Note: If this is a support classpath entry, and you would rather this be a warning, add a User Property named
WARN_ON_MISSING_SUPPORT_ENTRY
and set it totrue
.
Error: Unable to add to path: {some path}: DashO does not currently support multidex APKs.
DashO does not support post-processing multidex APKs as inputs, but does support multidex APKs when integrated into the Gradle build. Please integrate DashO into the Gradle build process, instead.
Error: {some class} did not match any classes in the input path.
The configured special entry point some class
was not found in the inputs.
Verify the class name is spelled correctly and is part of the inputs.
Viewing the project in the GUI may help determine if the class is part of the inputs.
Error: Method {some class and method} not found.
The configured entry point some class and method
was not found in the inputs.
Verify the class and method are spelled correctly and that the method's signature is correct.
Viewing the project in the GUI may help determine if the class and method are part of the inputs.
Error: Recursive definition at position {i} in "${expression}"
Property expansion supports nested properties.
This error occurs when recursion is found while trying to evaluate a property which contains nested properties.
To fix this, you will need to remove the recursive definition.
The property name starting at i
in the expression
is where the recursion was encountered.
Error: Invalid Regular Expression used in {context} : {expression} : {details}
This error is caused when an invalid regular expression was found. The message contains:
context
- The area in your configuration where theexpression
is used.expression
- The expression that caused the error. This could be from an expanded property reference.details
- Additional details about the specific issue.
Verify the syntax of the Java regular expression.
Error: Error reading {path to project.dox} - Illegal version number: X.Y.Z
You are attempting to open a newer DashO configuration file in an older version of DashO. This file must be opened with DashO vX.Y.Z (or later). Newer versions of DashO can read older versions of the configuration files.
Error: Error caching inputs: {some message}
There was an issue with the cache used by Automatic Input Management. See the message for additional details.
Error: Issue decoding APK
APKTool encountered an issue while decoding the APK. Turn on debug logging and look at the console for additional information.
Error: Wildcard method call removal is no longer supported: {some instance}
Wildcard method call removal is no longer supported. You need to configure the specific classes where that method exists.
Error: Unexpected path map version "{some version}" (expected: {some other version}).
You will see this message when DashO attempts to read a path map file with a version that is incompatible with your version of DashO.
If you encounter this message in the GUI, then this means that the last build done with this configuration was with a version of the DashO Gradle Plugin for Android that is not compatible with the version of DashO that you are running (e.g., you built with version 0.10.0 of the DashO Gradle Plugin for Android and then opened the configuration with a non-beta version of DashO 10.0). Make sure that you are using a version of the DashO Gradle Plugin for Android that is compatible with the version of DashO that you want to use, and then build your Android project.
If you encounter this message during a Gradle build, then the versions of DashO and of the DashO Gradle Plugin for Android that you are trying to use are incompatible.
See Version Compatibility for more information about versions of the DashO Gradle Plugin for Android and their compatibility with DashO.
Error: Error reading {some class}.{some method}. This method may have been already protected by DashO.
You may encounter this error if you attempt to process code that was already protected by DashO. DashO is not designed to re-process code that it has already protected. For instance, you may encounter this error if you integrate DashO with a library and with an Android app that uses that library. In such a case, protecting the app is sufficient; protecting the app will also protect the library code inside the app.
Avoid using DashO to process code that has already been protected by DashO.
If you encounter this issue when using the DashO Gradle Plugin for Android, configure excludeFromProtection
with the input that contains {some class}
.
Warnings
Warning: A path in ${gradleInput} does not appear to contain any classes.
In a legacy DashO Gradle Plugin based Android build, DashO is configured to receive its inputs from the property gradleInput
, which is passed in from the DashO Gradle Plugin.
This property has a default value of one or more paths configured (on the User Properties page) so that DashO can load the classes and populate the class trees in the GUI.
If this default value does not contain any classes, then class trees will not populate correctly and it will be difficult to establish new checks and rules.
This may happen for the following reasons:
- The classes might not have been compiled.
Run
gradlew assemble
or a similar task to compile the project. - The wizard set
gradleInput
based on a build variant that has not been built (e.g.,gradleInput
refers to the location for therelease
classes, but onlydebug
has been built). Building all variants will fix this. - You are using Kotlin in your project and
gradleInput
does not include your Kotlin classes. Add the location of your Kotlin classes togradleInput
, separated from any other paths with platform independent property expansion${path.separator}
(or the platform dependent;
or:
). The path to your Kotlin classes will generally look like this:
build/tmp/kotlin-classes/[<flavorName>]<buildType>
- The location where the Android Gradle Plugin places compiled classes may have changed (e.g., your DashO project was created for an older version of the Android Gradle Plugin than the version that you are currently using).
You will need to locate a directory containing classes for at least one build variant and update the the default value for
gradleInput
to refer to this location.
If your version of the Android Gradle Plugin is before 3.2.0, then the path to your classes is will generally look like this:
build/intermediates/classes[/<flavorName>]/<buildType>
If you are using version 3.2.0 or later of the Android Gradle Plugin, then the path to your classes will generally look like this:
build/intermediates/javac/[<flavorName>]<buildType>/compile[<flavorName>]<buildType>JavaWithJavac/classes
E.g., if your project uses the Android Gradle Plugin version 3.2.0 and you want the GUI to display classes with the release
build type and the pro
flavor, then the path could be build/intermediates/javac/proRelease/compileProReleaseJavaWithJavac/classes
.
You will need to click the Reload Class List button on the toolbar after updating your properties to repopulate the class trees.
Warning: File format changed. project.dox (vX.Y.Z) has been updated to vX.Y.Z. Please save the updated version.
This warning occurs when you open a project configuration from an older version of DashO. Saving the updated version will prevent this warning in the future but will also prevent this file from being opened in the older version of DashO. The GUI always uses the latest format when saving the configuration.
Warning: Duplicate class {some class} in {some path} ignored; using version from {some other path}
The same class definition was found in two different entries in either the inputs or support classpath. This can happen when you have more than one version of the same library configured or two separate libraries which contain the same class (or contain different classes that use the same fully qualified name). You should remove the duplicated library. You can also change the order of the entries. The class in the latter entry will be the one which is ignored.
Warning: Required Method Not Found: {some class and method} call to method {some method} in [class|interface] {some other class}
While traversing the execution path of some class and method
, some method
was not found some other class
.
This can happen if you referenced the wrong version of a support library in the DashO configuration.
Verify your inputs and support classpath.
You can upgrade this to an error by unchecking Ignore Missing Methods.
Warning: The 'EnclosingMethod' attribute of class '{some class}' references '{some other class}' which was not part of the inputs, and will be retained unmodified in the obfuscated output.
The EnclosingMethod
attribute references the class and method which encloses the local or anonymous {some class}
.
Adding the missing {some other class}
to the inputs will prevent this warning.
If {some other class}
does not exist at all, it may indicate an issue with your compiler.
If you are worried about the original name still being referenced in your protected code and cannot add {some other class}
to the inputs, you can instruct DashO to remove the EnclosingMethod
attribute.
Warning: Your Android Mode project file contains {some configuration element}. This is ignored in Android Mode.
Many Standard Mode settings are irrelevant in Android Mode. Warning messages of this form point out XML elements, XML attributes, global options, and special user properties in your project file that are ignored in Android Mode.
In many cases, (e.g., Entry Points, Renaming Exclusions, Removal Exclusions, and Method Call Removal), you may want to migrate these settings to your R8 configuration. After you have done any required migration, you can safely remove the ignored settings from your project file with a text editor.