We are facing an issue which is similar to this issue with our android app. The App is not working on some specific devices. The solution listed on this github issue is to reset the mobile device. Below is the error that is causing the issue.

02-28 15:46:02.743 24589 24752 E Encryptor: Error during asymmetric decryption 02-28 15:46:02.743 24589 24752 E Encryptor: javax.crypto.IllegalBlockSizeException 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:613) 02-28 15:46:02.743 24589 24752 E Encryptor: at javax.crypto.Cipher.doFinal(Cipher.java:2056) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithPrivateKey(Encryptor.java:530) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithRSABytes(Encryptor.java:427) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithRSA(Encryptor.java:408) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateUniqueId(SalesforceKeyGenerator.java:164) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getUniqueId(SalesforceKeyGenerator.java:88) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getUniqueId(SalesforceKeyGenerator.java:77) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateEncryptionKey(SalesforceKeyGenerator.java:145) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getEncryptionKey(SalesforceKeyGenerator.java:103) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.app.SalesforceSDKManager.getEncryptionKey(SalesforceSDKManager.java:1123) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager.getSmartStore(SmartStoreSDKManager.java:215) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.getSmartStore(SmartStorePlugin.java:697) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.registerSoup(SmartStorePlugin.java:458) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.access$800(SmartStorePlugin.java:79) 02-28 15:46:02.743 24589 24752 E Encryptor: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:160) 02-28 15:46:02.743 24589 24752 E Encryptor: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 02-28 15:46:02.743 24589 24752 E Encryptor: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 02-28 15:46:02.743 24589 24752 E Encryptor: at java.lang.Thread.run(Thread.java:1012) 02-28 15:46:02.743 24589 24752 E Encryptor: Caused by: android.security.KeyStoreException: Unknown error (internal Keystore code: -1000 message: In KeystoreOperation::finish 02-28 15:46:02.743 24589 24752 E Encryptor: 02-28 15:46:02.743 24589 24752 E Encryptor: Caused by: 02-28 15:46:02.743 24589 24752 E Encryptor: 0: In finish: KeyMint::finish failed. 02-28 15:46:02.743 24589 24752 E Encryptor: 1: Error::Km(ErrorCode(-1000))) (public error code: 10 internal Keystore code: -1000) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:369) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:78) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:128) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181) 02-28 15:46:02.743 24589 24752 E Encryptor: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:603) 02-28 15:46:02.743 24589 24752 E Encryptor: ... 18 more 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: Exception thrown while getting encryption key 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.nio.charset.Charset)' on a null object reference 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateEncryptionKey(SalesforceKeyGenerator.java:146) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getEncryptionKey(SalesforceKeyGenerator.java:103) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.app.SalesforceSDKManager.getEncryptionKey(SalesforceSDKManager.java:1123) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager.getSmartStore(SmartStoreSDKManager.java:215) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.getSmartStore(SmartStorePlugin.java:697) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.registerSoup(SmartStorePlugin.java:458) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.access$800(SmartStorePlugin.java:79) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:160) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 02-28 15:46:02.744 24589 24752 E SalesforceKeyGenerator: at java.lang.Thread.run(Thread.java:1012) 02-28 15:46:02.744 24589 24615 E GPUAUX : [AUX]GuiExtAuxCheckAuxPath:663: Null anb 02-28 15:46:02.744 24589 24615 E GPUAUX : [AUX]GuiExtAuxCheckAuxPath:663: Null anb 02-28 15:46:02.745 24589 24615 E GPUAUX : [AUX]GuiExtAuxCheckAuxPath:663: Null anb 02-28 15:46:02.745 24589 24615 E GPUAUX : [AUX]GuiExtAuxCheckAuxPath:663: Null anb 02-28 15:46:02.778 24589 24751 E Encryptor: Error during asymmetric decryption 02-28 15:46:02.778 24589 24751 E Encryptor: javax.crypto.IllegalBlockSizeException

We found that if we change the keystore file and created a new build then the app start working. But as per the documentation of google play store, we can not change the keystore. Is there any way to overcome this requirement or any other solution.

0

There are 0 best solutions below