IBM Support

PI83412: ANDROID APP WOULD CRASH AFTER UPGRADE OKHTTP3 PLUGIN

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • After upgrading from OkHttp 3.0.1 to 3.1.0 Android App crash
    and  get the following
    stack trace and crash after calling build() to create a
    OkHttpClient.
    java.lang.IllegalStateException: Unable to extract the trust
    manager on okhttp3.internal.Platform$Android@1d8cf999,
    sslSocketFactory is class
    com.google.android.gms.org.conscrypt.KitKatPlatformOpenSSLSocket
    AdapterFactory
            at okhttp3.OkHttpClient.<init>(OkHttpClient.java:187)
            at okhttp3.OkHttpClient.<init>(OkHttpClient.java:60)
            at
    okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:719)
    This issue was not present in 3.0.1.
    Here's where the crash happens:
    OkHttpClient.Builder builder = new OkHttpClient.Builder()
                        .connectTimeout(10, TimeUnit.SECONDS)
                        .writeTimeout(10, TimeUnit.SECONDS)
                        .readTimeout(30, TimeUnit.SECONDS);
                OkHttpClient client = builder.build();
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of the MobileFirst SDK for Android on devices with     *
    * Android v 4.4 or prior where the app makes a connection to   *
    * the MobileFirst server over SSL & TLS1.2                     *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * A MobileFirst app crashes on Android devices with Android v  *
    * 4.4 or prior when it attempts to connect to the MobileFirst  *
    * server over SSL and TLS1.2. The following exception is seen  *
    * the in the logcat                                            *
    * java.lang.IllegalStateException: Unable to extract the trust *
    * manager on okhttp3.internal.Platform$Android@1d8cf999,       *
    * sslSocketFactory is class                                    *
    * com.google.android.gms.org.conscrypt.KitKatPlatformOpenSSLSo *
    * cket                                                         *
    * AdapterFactory                                               *
    *         at                                                   *
    * okhttp3.OkHttpClient.<init>(OkHttpClient.java:187)           *
    *         at okhttp3.OkHttpClient.<init>(OkHttpClient.java:60) *
    *         at                                                   *
    * okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:719)    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * -                                                            *
    ****************************************************************
    

Problem conclusion

  • The issue is seen due to a bug in a third party library - OkHttp
    ( https://github.com/square/okhttp/issues/2323 ). Modifications
    to the MobileFirst SDK were made to overcome this bug.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI83412

  • Reported component name

    MOBILE1ST PLATF

  • Reported component ID

    5725I4301

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-06-21

  • Closed date

    2017-07-19

  • Last modified date

    2017-07-19

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    MOBILE1ST PLATF

  • Fixed component ID

    5725I4301

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"800","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
19 July 2017