dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
972 stars 580 forks source link

dji.sdk.sdkmanager.DJISDKManager -> KeyStore exception #389

Open roziewsky opened 5 years ago

roziewsky commented 5 years ago

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)

dji-sdk[bot] commented 5 years ago

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 dev@dji.com, as it's our official channel for developers to request DJI Developer Support now.

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

ber4444 commented 5 years ago

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

kwatkins commented 5 years ago

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

gianks commented 4 years ago

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

LuvForAirplanes commented 4 years ago

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.

ismalel commented 4 years ago

Im having this problem as well,

Has anyone found a solution?

Regards

india2sarthak commented 3 years ago

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

mayurpatil307 commented 3 years ago

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

zhaocundang commented 3 years ago

demo 解决了吗 亲?

VineetTambe commented 2 years ago

Facing a similar issue. Any update on fixes?