IBM Support

PI94658: ATTEMPTS TO RESET COOKIES IN ANDROID SDK CAUSES THE APP TO CRASH.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Product components impacted: Android SDK
    Affected mobile development environments: Android
    Mobile Devices Operating Systems impacted: Android
    User roles impacted: Developer
    Distribution: Fix Central, DevCenter
    Versions affected: 8.0
    The MobileFirst native Android application might crash when
    attempting to reset cookies with the following call:
    getWLClient().getCookieStore().removeAll();
    The following error can be seen in the logs:
    java.lang.ClassCastException: com.worklight.wlclient.cookie.
    PersistentCookieJar cannot be cast to java.net.CookieManager
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users trying to use PersistantCookieJar class methods        *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * App is crashing due to a bug in our code, when users call    *
    * clear cookies method. The bug is ClassCastException when     *
    * returning a cookieJar Object.                                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • A method returns an object that is cast to CookieManager
    class.so had to make persistantCookieJar class extend
    java.net.CookieManager. CookieManager class extended, this
    ensured cast to CookieManager is possible for object of
    PersistantCookieJar
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI94658

  • 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

    2018-03-05

  • Closed date

    2018-03-29

  • Last modified date

    2018-03-29

  • 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:
29 March 2018