Appstore SDK Troubleshooting
This page describes how to troubleshoot issues you might encounter in your app when working with In-App Purchasing (IAP) or DRM from the Appstore SDK. If you're having issues when making calls for IAP or DRM, check the device logs for the following errors.
DATA_AUTH_KEY_LOAD_FAILURE: CERT_NOT_FOUND
This exception can be seen in the device logs. It occurs when your app isn't configured with a public key. To configure your app with a public key:
- Log into the Developer Console with your developer account.
- Go to Apps & Services > My Apps. Then click your app.
- Go to the Upload Your App File screen.
- In the Additional information section, click View public key.
-
In the Public Key dialog box that appears, click the AppstoreAuthenticationKey.pem link to download a PEM file. This file contains your public key.
-
Copy the AppstoreAuthenticationKey.pem file. Then paste it into the app/src/main/assets folder of your Android Studio project.
In the Project view, the assets folder is usually in app/src/main/assets. If your app doesn't have an assets folder, you must create one. Then drag your PEM file into it.
For additional details, see Configure Appstore SDK with your public key.
AUTH_TOKEN_VERIFICATION_FAILURE
This exception can be seen in the device logs and might occur in different testing scenarios. The following steps could help resolve your issue.
-
If you see the issue when using the App Tester, make sure you're using the debug version of your app and you have enabled sandbox mode. To enable sandbox mode, connect your device through ADB and issue this command
adb shell setprop debug.amazon.sandboxmode debug
. For more details, see Using App Tester. -
If you see the issue when using the Live App Testing (LAT) service, make sure your app is properly configured with a PEM file that contains your public key. To configure your app with a public key:
- Log into the Developer Console with your developer account.
- Go to Apps & Services > My Apps. Then click your app.
- Go to the Upload Your App File screen.
- In the Additional information section, click View public key.
-
In the Public Key dialog box that appears, click the AppstoreAuthenticationKey.pem link to download a PEM file. This file contains your public key.
-
Copy the AppstoreAuthenticationKey.pem file. Then paste it into the app/src/main/assets folder of your Android Studio project.
In the Project view, the assets folder is usually in app/src/main/assets. If your app doesn't have an assets folder, you must create one. Then drag your PEM file into it.
For additional details, see Configure Appstore SDK with your public key.
-
Follow the recommendation on code obfuscation.
Related resources
Last updated: Oct 02, 2023