Skip to content

Duplicate Session Start on RN #3503

Description

@markushi

Description

The LifecycleWatcher usually takes care of starting / restarting and ending sessions.

But due to #2241 we also directly start a new session when the SDK is initialized, in order to have a session we can mark as crashed in the case of an early app start crash.

So usually the following happens:

  1. the SDK is initialized and SentryAndroid.init starts the session
  2. Later LifecycleWatcher receives the system callback, but no-ops because the session is already running.

Due to the "async" / deferred way RN initializes the SDK, 1. and 2. are swapped: First LifecycleWatcher immediately receives a system callback and starts the session and then the SDK init starts a second one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions