-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android App is throwing this exception on some specific devices Encryptor: Error during asymmetric decryption #2519
Comments
meta-krishna-meghwal
changed the title
In Android App, Encryptor: Error during asymmetric decryption
Android App is throwing this exception on some specific devices Encryptor: Error during asymmetric decryption
Feb 29, 2024
Can you give us more details:
|
Yes, the application was working previously on the same device and now it is consistently throwing erorr. |
Was there a OS upgrade on the device? |
No, there was not any OS upgrade |
There was a fix in that area in MSDK 12. Could you try with the latest version of MSDK and let us know if you still see the problem? |
Closing issue for lack of response from customer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please fill out the following details:
Version of Mobile SDK Used: 10.2
Issue found in Native App or Hybrid App: Hybrid
OS Version: Android 13 and Android 14
Device: Vivo V23
Steps to reproduce:
The app is not working properly on some specific devices, it is throwing below error.
Error Log:
02-28 15:44:32.530 23292 23292 E Encryptor: Error during asymmetric decryption 02-28 15:44:32.530 23292 23292 E Encryptor: javax.crypto.IllegalBlockSizeException 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:613) 02-28 15:44:32.530 23292 23292 E Encryptor: at javax.crypto.Cipher.doFinal(Cipher.java:2056) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithPrivateKey(Encryptor.java:530) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithRSABytes(Encryptor.java:427) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.analytics.security.Encryptor.decryptWithRSA(Encryptor.java:408) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateUniqueId(SalesforceKeyGenerator.java:164) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getUniqueId(SalesforceKeyGenerator.java:88) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getUniqueId(SalesforceKeyGenerator.java:77) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateEncryptionKey(SalesforceKeyGenerator.java:145) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getEncryptionKey(SalesforceKeyGenerator.java:103) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.app.SalesforceSDKManager.getEncryptionKey(SalesforceSDKManager.java:1123) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.rest.ClientManager.createNewAccount(ClientManager.java:368) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.ui.OAuthWebviewHelper.addAccount(OAuthWebviewHelper.java:671) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.ui.OAuthWebviewHelper$BaseFinishAuthFlowTask.onPostExecute(OAuthWebviewHelper.java:622) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.salesforce.androidsdk.ui.OAuthWebviewHelper$BaseFinishAuthFlowTask.onPostExecute(OAuthWebviewHelper.java:546) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.AsyncTask.finish(AsyncTask.java:771) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.Handler.dispatchMessage(Handler.java:106) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.Looper.loopOnce(Looper.java:223) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.os.Looper.loop(Looper.java:324) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.app.ActivityThread.main(ActivityThread.java:8377) 02-28 15:44:32.530 23292 23292 E Encryptor: at java.lang.reflect.Method.invoke(Native Method) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) 02-28 15:44:32.530 23292 23292 E Encryptor: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1059) 02-28 15:44:32.530 23292 23292 E Encryptor: Caused by: android.security.KeyStoreException: Unknown error (internal Keystore code: -1000 message: In KeystoreOperation::finish 02-28 15:44:32.530 23292 23292 E Encryptor: 02-28 15:44:32.530 23292 23292 E Encryptor: Caused by: 02-28 15:44:32.530 23292 23292 E Encryptor: 0: In finish: KeyMint::finish failed. 02-28 15:44:32.530 23292 23292 E Encryptor: 1: Error::Km(ErrorCode(-1000))) (public error code: 10 internal Keystore code: -1000) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:369) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:78) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:128) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181) 02-28 15:44:32.530 23292 23292 E Encryptor: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:603) 02-28 15:44:32.530 23292 23292 E Encryptor: ... 24 more 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: Exception thrown while getting encryption key 02-28 15:44:32.531 23292 23292 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:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.generateEncryptionKey(SalesforceKeyGenerator.java:146) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.security.SalesforceKeyGenerator.getEncryptionKey(SalesforceKeyGenerator.java:103) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.app.SalesforceSDKManager.getEncryptionKey(SalesforceSDKManager.java:1123) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.rest.ClientManager.createNewAccount(ClientManager.java:368) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.ui.OAuthWebviewHelper.addAccount(OAuthWebviewHelper.java:671) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.ui.OAuthWebviewHelper$BaseFinishAuthFlowTask.onPostExecute(OAuthWebviewHelper.java:622) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.salesforce.androidsdk.ui.OAuthWebviewHelper$BaseFinishAuthFlowTask.onPostExecute(OAuthWebviewHelper.java:546) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.AsyncTask.finish(AsyncTask.java:771) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.Handler.dispatchMessage(Handler.java:106) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.Looper.loopOnce(Looper.java:223) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.os.Looper.loop(Looper.java:324) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at android.app.ActivityThread.main(ActivityThread.java:8377) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at java.lang.reflect.Method.invoke(Native Method) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) 02-28 15:44:32.531 23292 23292 E SalesforceKeyGenerator: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1059) 02-28 15:44:32.927 23292 23938 E Encryptor: Error during asymmetric decryption 02-28 15:44:32.927 23292 23938 E Encryptor: javax.crypto.IllegalBlockSizeException
The text was updated successfully, but these errors were encountered: