GTS test failing because of undefined symbols
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 326
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 17
Description
Hello,
We are building an android system application that uses the AWS IOT SDK for Android.
To be able to deploy this app on Android TV STB's, we need to run the android test suites (CTS/GTS).
Unfortunately, We have a GTS test failing with our application.
The failure seems related to the 'conscrypt' dependency of the AWS IOT SDK.
Could you please check bellow logs and share any thoughts you may have on how to fix this?
```
com.android.compatibility.common.tradefed.testtype.JarHostTest com.android.gts.api.UnofficialApisUsageTest#testNonApiReferences fail:
junit.framework.AssertionFailedError:
Undefined type ref: com.android.org.conscrypt.OpenSSLSocketImpl from: /vendor/app/App/App.apk
Undefined type ref: com.android.org.conscrypt.SSLParametersImpl from: /vendor/app/App/App.apk
Undefined type ref: dalvik.system.BlockGuard from: /vendor/app/App/App.apk
Undefined type ref: dalvik.system.BlockGuard.Policy from: /vendor/app/App/App.apk
Undefined type ref: dalvik.system.CloseGuard from: /vendor/app/App/App.apk
Undefined type ref: org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl from: /vendor/app/App/App.apk
Undefined type ref: org.apache.harmony.xnet.provider.jsse.SSLParametersImpl from: /vendor/app/App/App.apk
Undefined method ref: com.android.org.conscrypt.OpenSSLSocketImpl.(com.android.org.conscrypt.SSLParametersImpl) from: /vendor/app/App/App.apk
Undefined method ref: dalvik.system.BlockGuard.Policy.onNetwork()void from: /vendor/app/App/App.apk
Undefined method ref: dalvik.system.BlockGuard.getThreadPolicy()dalvik.system.BlockGuard.Policy from: /vendor/app/App/App.apk
```
GTS version 7.0_r4
Device android version:
ro.build.version.release:10
ro.build.version.sdk:29
I think the conscrypt errors come from here:
```
public static SSLSocketFactory wrapSocketFactoryIfNeeded(OpenSSLSocketFactoryImpl factory) {
if (Build.VERSION.SDK_INT < 19) {
return new PreKitKatPlatformOpenSSLSocketAdapterFactory(factory);
} else if (Build.VERSION.SDK_INT < 22) {
return new KitKatPlatformOpenSSLSocketAdapterFactory(factory);
}
return factory;
}
```
and KitKatPlatformOpenSSLSocketAdapterFactory extends com.android.org.conscrypt.OpenSSLSocketImpl;
For the BlockGuard error, the api is internal and Google disallows using it:
```
@libcore.api.CorePlatformApi
@libcore.api.IntraCoreApi
public final class BlockGuard {
}
```
as for the CloseGuard error, CloseGuard move from dalvik.system to android.util
Regards
Contributor guide
Assessment
This issue has not been assessed yet.