Kenny Wan
Mar 12, 2018
7:24 am

java.lang.NoSuchMethodError: android.app.enterprise.CertificateInfo.setAlias(Ljava/lang/String;)V

Hi,

I got this crash:

  java.lang.NoSuchMethodError: android.app.enterprise.CertificateInfo.setAlias(Ljava/lang/String;)V
      at com.samsung.android.knox.keystore.CertificateInfo.convertToOld(CertificateInfo.java:188)
      at com.samsung.android.knox.keystore.CertificateProvisioning.deleteCertificateFromKeystore(CertificateProvisioning.java:85)

 

this happens inside the "supportlib" and and seems the method "setAlias" is not found in the "android.app.enterprise.CertificateInfo". I checked the legacy knox doc(Standard and Premium) and there is no such method.

Is this a bug?

Thanks!

Kenny.

 

Similar topics

No similar topics found.
Samuel Goldwax
Mar 12, 2018
6:01 pm

Hi Kenny,

Could you let me know the device model, OS, and Knox version so I can try to reproduce the issue?

Thanks,

Sam

Kenny Wan
Mar 13, 2018
1:58 am

Hi,

This is found from our unit test. Should not depend on the device. And we double checked this API doc "setAlias" and it is not found anywhere in either legacy knox standard, preimum, knoxsdk, supportlib.

Br,

Kenny.

Kenny Wan
Mar 14, 2018
8:45 am

Any update? 

Br,

Kenny.

Samuel Goldwax
Mar 14, 2018
10:41 pm

Hi Kenny,

It seems like there might be a method missing. I'll bring this up with our R&D team. Could you provide a device dumpstate of the error in the meantime? It might be helpful in figuring out a solution. Please send it to me at s.goldwax@partner.samsung.com

Thanks,

Sam

Kenny Wan
Mar 15, 2018
2:00 am

Hi, 

As mentioned it is found in the unit test, thus no dumpstate is available. So the "setAlias" is found in the "supportlib"

static android.app.enterprise.CertificateInfo convertToOld(CertificateInfo newObj) {
    if (newObj == null) {
      return null;
    }
    android.app.enterprise.CertificateInfo oldObj = new android.app.enterprise.CertificateInfo();
    oldObj.setCertificate(newObj.getCertificate());
    oldObj.setAlias(newObj.getAlias());
    oldObj.setEnabled(newObj.getEnabled());
    oldObj.setHasPrivateKey(newObj.getHasPrivateKey());
    oldObj.setKeystore(newObj.getKeystore());
    oldObj.setSystemPreloaded(newObj.getSystemPreloaded());
    return oldObj;
  }

R&D team should know this well.

Thanks!

Kenny.

Kenny Wan
Mar 23, 2018
3:34 am

This problem is blocking the existing feature in the legacy device. any update?

Thanks!

Kenny.