Mobile-SDK-Android icon indicating copy to clipboard operation
Mobile-SDK-Android copied to clipboard

dji.sdk.sdkmanager.DJISDKManager -> KeyStore exception

Open roziewsky opened this issue 6 years ago • 10 comments

Description: After updating android sdk to version 28 and DJI sdk from version 4.6 to 4.9 there is a problem with app working on Huawei. During DJI sdk registering.

DJI sdk: 4.9 Android sdk (compileSdkVersion): 28 Android system version: every Android device: huawei mate 10 pro

Crash stacktrace:

W/KeyStore: KeyStore exception android.os.ServiceSpecificException: (code 7) at android.os.Parcel.createException(Parcel.java:1967) at android.os.Parcel.readException(Parcel.java:1921) at android.os.Parcel.readException(Parcel.java:1871) at android.security.IKeystoreService$Stub$Proxy.get(IKeystoreService.java:786) at android.security.KeyStore.get(KeyStore.java:195) at android.security.keystore.AndroidKeyStoreSpi.engineGetCertificate(AndroidKeyStoreSpi.java:144) at java.security.KeyStore.getCertificate(KeyStore.java:1120) at android.security.net.config.KeyStoreCertificateSource.ensureInitialized(KeyStoreCertificateSource.java:61) at android.security.net.config.KeyStoreCertificateSource.getCertificates(KeyStoreCertificateSource.java:46) at android.security.net.config.CertificatesEntryRef.getTrustAnchors(CertificatesEntryRef.java:40) at android.security.net.config.NetworkSecurityConfig.getTrustAnchors(NetworkSecurityConfig.java:84) at android.security.net.config.NetworkSecurityTrustManager.getAcceptedIssuers(NetworkSecurityTrustManager.java:170) at android.security.net.config.RootTrustManager.getAcceptedIssuers(RootTrustManager.java:140) at dji.thirdparty.afinal.utils.HttpsHelper$DJIX509TrustManager.getAcceptedIssuers(Unknown Source:6) at dji.thirdparty.okhttp3.internal.platform.Platform.buildTrustRootIndex(Unknown Source:2) at dji.thirdparty.okhttp3.internal.platform.AndroidPlatform.buildTrustRootIndex(Unknown Source:29) at dji.thirdparty.okhttp3.internal.platform.Platform.buildCertificateChainCleaner(Unknown Source:2) at dji.thirdparty.okhttp3.internal.platform.AndroidPlatform.buildCertificateChainCleaner(Unknown Source:59) at dji.thirdparty.okhttp3.internal.tls.CertificateChainCleaner.get(Unknown Source:4) at dji.thirdparty.okhttp3.OkHttpClient$Builder.sslSocketFactory(Unknown Source:22) at dji.internal.network.f.(Unknown Source:41) at dji.internal.network.f.getInstance(Unknown Source:9) at dji.internal.network.e.(Unknown Source:3) at dji.internal.network.e$a.(Unknown Source:2) at dji.internal.network.e$a.a(Unknown Source:0) at dji.internal.network.e.getInstance(Unknown Source:0) at dji.internal.analytics.DJIAnalyticsEngine.init(Unknown Source:50) at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:22) at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:129) at dji.sdk.sdkmanager.DJISDKManager.access$1200(Unknown Source:0) at dji.sdk.sdkmanager.DJISDKManager$5.run(Unknown Source:104) at java.lang.Thread.run(Thread.java:784)

roziewsky avatar Feb 07 '19 16:02 roziewsky

Hi, there are two options for you to ask for help:

  1. Post your issues on StackOverflow: https://stackoverflow.com/questions/tagged/dji-sdk, the community can help you.

  2. Report your issues to [email protected], as it's our official channel for developers to request DJI Developer Support now.

For DJI Developer Support, we have the following three tiers:

  • Standard

This free support is available to anyone reaching out to [email protected]. There is no guarantee for response time.

  • Preferred

    This support comes with Pro membership for 99 USD per year. You can purchase it on DJI Developer Website. These requests have priority over Standard ones. Starting today, Preferred questions will be replied to within 2 to 5 business days (Monday – Friday).

  • Premium

    This one-time ticket is considered high-priority and costs 499 USD per issue. You can purchase it on DJI Developer Website after you become the Pro membership developer. Starting today, Premium questions will be replied to within 1 business day (Monday – Friday). This may include communication with DJI SDK engineers, but will not involve face-to-face interaction. Time limitations apply, and please keep in mind that one question is permitted per ticket. We will do our best to resolve your issue, but there some situations demand deeper engineering efforts.

dji-sdk[bot] avatar Feb 07 '19 16:02 dji-sdk[bot]

Did you find the cause of this issue? I'm having the same problem.

ber4444 avatar Apr 10 '19 16:04 ber4444

Try adding <uses-library android:name="org.apache.http.legacy" android:required="false" /> in the android manifest under the application section

kwatkins avatar May 02 '19 18:05 kwatkins

Hi, same here, now! I already added the proposed line to make the application ImportSDKDemo not to crash all the time at start but it didn't fix this KeyStore issue. As reported already on StackOverflow the problem should be related in how DJU SDK access private keys, please see here: https://stackoverflow.com/questions/52024752/android-9-keystore-exception-android-os-servicespecificexception

Please acknowledge. Regards

gianks avatar Dec 30 '19 01:12 gianks

Come on, let's not let this thread get stale. I'm having the same issue on a huawei mediapad and would love to get the issue fixed. I agree it is a problem w how DJI accesses their keys.

LuvForAirplanes avatar Jan 22 '20 17:01 LuvForAirplanes

Im having this problem as well,

Has anyone found a solution?

Regards

ismalel avatar Apr 14 '20 17:04 ismalel

@dji-dev Guys, any update on this? Facing this as well.

india2sarthak avatar Nov 24 '20 11:11 india2sarthak

+1 @dji-dev facing the same issue. Any update on this?

mayurpatil307 avatar Mar 02 '21 04:03 mayurpatil307

demo 解决了吗 亲?

zhaocundang avatar Jun 04 '21 05:06 zhaocundang

Facing a similar issue. Any update on fixes?

VineetTambe avatar Aug 24 '21 15:08 VineetTambe