Message - Unable to instrument the application package... (Legacy)

Applies to TestComplete 15.73, last modified on March 04, 2025
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.

TestComplete displays this message if it cannot sign your tested Android application with the specified certificate data. Signing an Android application is required, and it is one of the steps of application instrumentation. Without signing, TestComplete cannot complete the instrumentation.

Possible Reasons

TestComplete displays this message for one of the following reasons:

  • The specified keystore file does not exist.

  • You misprinted the alias.

  • The certificate is expired.

  • The keystore file is corrupted.

  • You do not have read access for the keystore file.

  • The keystore file is locked by some other application.

Fixing the Issue

The way you fix the issue depends on whether you use a custom or debug certificate.

Custom Certificate
  • Check whether you specified the right keystore file (not some other keystore file) and whether you spelled the alias correctly.

  • To check whether you have read access permissions for the keystore file, open the file in any text editor, for example, in Notepad. You should be able to view the file contents (note that the file is binary, so you will not see human-friendly text). If you failed to view the file, ask your system administrator to provide you with permissions for reading the file.

  • The keystore file could be locked by some other application at the moment when TestComplete attempted to read data from it. To check this, try signing your Android package with the same keystore file again.

  • If the error persists, then the certificate has expired or is corrupted. You have to re-create the keystore file. You can do this in the Eclipse IDE, Android Studio, or with the keytool.exe utility. See Signing Your Applications in Android Developer documentation.

Debug Certificate

Android developers use debug certificates to sign applications easier. Each user has their own certificate that is located in the following keystore file:

C:\Users\UserName\.android\debug.keystore (Windows Vista, Windows 7 and later)

C:\Documents and Settings\UserName\.android\debug.keystore (Windows XP)

The debug certificates expire in a year after creation.

If you chose to use the debug certificate in the wizard, and TestComplete displayed this message, then most likely, the certificate has expired. Another possible cause of the problem is that the certificate is corrupted. To solve both these problems, simply delete the certificate file (see above) and sign your package with the debug certificate again. TestComplete will generate the certificate automatically.

See Also

Preparing Android Applications (Legacy)

Highlight search results