Internal error when wrapping APK

Document ID : KB000032816
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

When attempting to wrap an APK via the MAA web portal the following error is received:

error.png

Reviewing catalina.out shows

Step 4 of 4: Signing APK with dummy certificate. 
jarsigner: unable to sign jar: no response from the Timestamping Authority. When connecting from behind a firewall an HTTP or HTTPS proxy may need to be specified. Supply the following options to jarsigner: 
-J-Dhttp.proxyHost=<hostname> 
-J-Dhttp.proxyPort=<portnumber> 
or 
-J-Dhttps.proxyHost=<hostname> 
-J-Dhttps.proxyPort=<portnumber> 
ERROR: jar signing failed... 
ERROR: Exiting, Signing APK failed!

Environment:

  • CA Mobile Application Analytics 15.2 +

Cause:

jarsigner attempts to connect to the time stamping authority (TSA) in order to add a timestamping block to the signed jar. This allows an application to be accepted by Java Plugin in a future time when the signer's certificate already expires.

Solution:

Manually wrap the apk and use the switch -t

"./wrap.sh -a <app_name.apk> -p <PlistName.plist> -t"

This tells the wrapper not to use the TSA for Jar signing.