Troubleshooting
These are some common issues you may encounter while protecting your product with PreEmptive Protection™ DashO™. 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
- Activation Tool Issues
- Activation Tool shows Windows Firewall dialog
- Activation Tool does not proceed after the browser process is complete
- Wizard Issues
- Performance Issues
- Errors
- Error: Class not found: java.lang.Record
- Error: Error creating output file for {some class}: While parsing {some class and method}
- Error: Error computing frames: Method(s) too large: {some method(s)}
- 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: Referenced Field Not Found: {some class and method} references field {some field} 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: Ambiguous {some area} class rule: '{some class rule}'. Please select the class or add a nested rule.
- 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 and method}. This method may have been already protected by DashO.
- Error: DashO does not currently support multi-release jars as inputs: {some path}
- Error: Running on Java {some version} is not supported. Please run on Java 11.
- Error: Unable to access lock: {some path}/dasho.license.lock
- 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: Referenced Field Not Found: {some class and method} references field {some field} 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.
- Warning: Some strings could not be encrypted, ... First found in: {some class and method}.
- Warning: We recommend using Long Term Support (LTS) releases of Java when running. Java {some version} is not an LTS release.
- Warning: Globally Excluded Class ({some class}) was configured to both update references ({some rule}) and not update references ({some other rule}). References will not be updated in this class.
- Error: Classes renaming alphabet: Minimum length of {n} exceeds alphabet's maximum length {m}".
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
The most common reason for DashO not launching is that it is unable to find an appropriate version of Java.
This may appear as the message: A Java Exception has occured.
when launching the GUI or Unsupported major.minor version 52.0
when running the CLI.
It may be easier to diagnose the issue by attempting to rundashocmd.bat --version
(or ./dashocmd --version
) in DashO Home from a command prompt.
Verify an appropriate Java runtime is available and properly configured.
Note: If you did not use one of the provided installers, make sure an appropriate version of
java
is on the path. You can determine the version ofjava
on your path by runningjava -version
from a command prompt. You can also setDASHO_JAVA_HOME
. UsingDASHO_JAVA_HOME
takes precedence over the path. Make sure it is configured with an appropriate version.
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
{folder}'s contents do not display on macOS
Starting with Catalina, macOS began restricting application access to some user folders (e.g. Downloads, Desktop, Documents). When launched as an application, DashO may be unable to request access to those folders. It will instead show them as empty.
To use the DashO GUI with projects located in these directories, launch it using the dashogui
shell script located within the application (PreEmptive Protection DashO x.y.app/Contents/Java/dashogui
)
Alternatively, move the project into a directory that does not require permissions to access.
Activation Tool Issues
Activating via the the Config Editor uses the DashO Activation Tool. The Activation Tool works by launching a web browser to preemptive.com, where you can log in and activate your installation of DashO. Once you complete the activation process in the browser, the browser sends the necessary information back to the Activation Tool so that it can verify and save the activation.
The following subsections detail how to resolve issues that may arise from the Activation Tool.
Activation Tool shows Windows Firewall dialog
In order for the Activation Tool to receive information from the browser, it listens on a TCP port for the localhost
hostname.
This can trigger a Windows Security Alert dialog with the following message:
Windows Defender Firewall has blocked some features of OpenJDK Platform binary on all public, private and domain networks.
As the Activation Tool only listens on localhost
, it does not require a firewall exception.
This dialog can be safely dismissed by doing the following:
- Uncheck all checkboxes.
- Click the Cancel button.
Note: If you are not using the included java runtime, dismissing the exception will affect other applications which use the same java installation.
Activation Tool does not proceed after the browser process is complete
While the Activation Tool is waiting for information from the web browser, it displays this screen:
However, if the browser's HTTP request to the Activation Tool is blocked or otherwise fails, the tool will continue showing the screen above even when the browser has reported its phase of the activation process is complete.
To address this:
- In the web browser's success message, look for the Activation Token and copy it to your clipboard.
- In the Activation Tool, click the hyperlink at the bottom of the window labeled click here to activate manually.
- On the screen that appears, enter the activation token into the form and click Activate.
Wizard Issues
The Wizard was not able to locate the buildscript section of build.gradle. You may need to manually incorporate the DashO Gradle Plugin for Android.
The wizard could not locate the build.gradle
file containing the buildscript
section.
Project setup could not be entirely completed.
You will need to manually configure it.
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: Class not found: java.lang.Record
When obfuscating input with a record (compiled with Java 14 or later), and the JDK_HOME environment variable points to JDK below 17, DashO gives the following error:
Error: Class not found: java.lang.Record; super class of com.preemptive.sealedrecordtest.ConstantExpr
Warning: java.lang.Record not found
Warning: java.lang.runtime.ObjectMethods not found
To avoid this error, make sure your JDK_HOME environment variable points to Java 17 or later version when obfuscating input with a record. This requirement also applies to records that extend interfaces, including sealed interfaces.
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: Error computing frames: Method(s) too large: {some method(s)}
Some of DashO's protection techniques may increase the overall code size of a method.
In rare instances, the protection may increase a method's size beyond what the Java Virtual Machine will support.
You can either exclude some method(s)
from Control Flow and/or String Encryption, or refactor them into smaller methods.
Note: No more than one method per class will be listed.
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 Members.
Error: Referenced Field Not Found: {some class and method} references field {some field} in [class|interface] {some other class}
While scanning through the code in some class and method
, some field
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 Members.
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: Ambiguous {some area} class rule: '{some class rule}'. Please select the class or add a nested rule.
This will occur if DashO is unable to determine the expected behavior.
When the selects-class
attribute is false
, the rule looks at its children, the nested rules, to determine if the class is matched.
With no children the rule is ambiguous.
To resolve this error, do one of the following:
- Set
select-class
totrue
(orexcludeclass
tofalse
). - Add a nested rule.
- Delete the class rule.
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.
If you see this error when building using one of the plugins, make sure you have correctly configured the location of DashO:
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 and 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}
.
Error: DashO does not currently support multi-release jars as inputs: {some path}
DashO does not support multi-release jars configured as inputs.
Error: Running on Java {some version} is not supported. Please run on Java 11.
DashO does not support running on older JVM releases which do not have Long Term Support.
Error: Unable to access lock: {some path}/dasho.license.lock
DashO was unable to create a lock file.
This may occur if another user on the device has already activated a license; the license file may be writable only by that user.
Make sure the file exists and is writable.
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.
Note: You may also see this warning if a multi-release jar is in the support classpath.
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 Members.
Warning: Referenced Field Not Found: {some class and method} references field {some field} in [class|interface] {some other class}
While scanning through the code in some class and method
, some field
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 upgrade this to an error by unchecking Ignore Missing Members.
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.
Warning: Some strings could not be encrypted, ... First found in: {some class and method}.
Introduced in Java 9, invokedynamic
-based string concatenation (described in JEP-280) may pass string constants to a bootstrap method.
DashO String Encryption does not currently support this on Java 9 or Java 10.
Constant strings when concatenated with non-constant values (e.g. "Welcome, " + name + ", to string concatenation."
) will not be encrypted, by default.
DashO will issue a warning, only once per build, if this issue is encountered.
This issue only affects classes compiled for the Java 9 or Java 10 JVM.
There are two solutions which will allow DashO String Encryption to work:
- Compile for a JVM other than 9 or 10.
- Compile with
-XDstringConcat=indy
, as described in JEP-280.
Warning: We recommend using Long Term Support (LTS) releases of Java when running. Java {some version} is not an LTS release.
We recommend running with Long Term Support (LTS) releases of Java.
Warning: Globally Excluded Class ({some class}) was configured to both update references ({some rule}) and not update references ({some other rule}). References will not be updated in this class.
The class {some class}
was found to match conflicting rules, {some rule}
and {some other rule}
.
If {some class}
references classes, methods, or fields in classes processed by DashO, you should update {some other rule}
to either enable reference updating or not match {some class}
.
If {some class}
does not, then update {some rule}
to either disable reference updating or not match {some class}
.
Error: Classes renaming alphabet: Minimum length of {n} exceeds alphabet's maximum length {m}".
The value of the parameter "Minimum Length" of a class/method name in Renaming Options is exceeded over one allowed by the currently selected renaming alphabet. To avoid this error, you should decrease the value of this parameter or shorten the alphabet.