Skip to content

UI thread blocking in OktaSdkBridgeModule causing app unresponsiveness #429

@anujsachan1990

Description

@anujsachan1990

Describe the bug?

The OktaSdkBridgeModule is currently performing several operations on the main UI thread, which can lead to app unresponsiveness, especially on devices with limited resources or slow network connections. This affects methods such as createConfig, signIn, and authenticate.

This may be unnoticeable in a few devices but I can see it clearly in Pixel 6,7,8 which are not too old devices. The UI Thread should not be blocked.

The Fix is here:
#428

What is expected to happen?

The app should remain responsive during Okta SDK operations, with no noticeable UI freezing or lag.

What is the actual behavior?

The app becomes unresponsive or experiences significant lag during Okta SDK operations, particularly on slower devices or networks.

Reproduction Steps?

  1. Initialize the Okta SDK using createConfig
  2. Attempt to sign in using signIn or authenticate method
  3. Observe UI responsiveness, especially on slower devices or networks

Additional Information?

https://github.com/user-attachments/assets/36b489be-2ff1-4439-8840-10dff45

when this method is called it blocked the UI thread
Screenshot 2024-09-06 at 4 09 51 pm
70268

SDK Version

"@okta/okta-react-native": "^2.8.0",

Build Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions