Skip to content

App crashes when JWT token expired before it retried to refresh it on init #565

Open
@buuuudzik

Description

@buuuudzik

We are using the Iterable SDK in our project, currently at version 1.3.19:
"@iterable/react-native-sdk": "1.3.19",

Recently, we have encountered errors in production, which I have also been able to reproduce in development mode. It appears that if the app is left logged in and then fully closed for a period longer than the JWT token expiration time, the Iterable SDK does not attempt to refresh the token before using it. This results in a complete app crash, and we have no means to prevent it.

Could you ensure that your SDK cannot cause the app to crash entirely? There should be an error handler to allow us to check what happened in the SDK without encountering an unmanageable low-level error.

Additionally, it would be helpful if we could pass a new auth token via Iterable.setEmail(email, token) while still utilizing the auto-refresh mechanism. Currently, when we pass the token using the mentioned method, the auto-refresh mechanism stops working.

Here is the error we found that causes the app to crash completely:
CleanShot 2024-07-25 at 15 57 19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions