Skip to content

(android): SentryContextProvider initialization order conflict with Android Startup #263

Open
@buenaflor

Description

@buenaflor

Description

The Sentry Kotlin Multiplatform (KMP) SDK is currently incompatible with Android Startup due to an initialization order conflict. This issue prevents the proper initialization of the SDK on Android since we rely on SentryContextProvider to fetch the applicationContext.

The current workaround is to set a high enough init order for the context provider:

<provider
    android:name="io.sentry.kotlin.multiplatform.SentryContextProvider"
    android:authorities="${applicationId}.SentryContextProvider"
    android:exported="false"
    android:initOrder="9999" <-- this should be higher than InitializationProvider
    tools:node="replace"
>

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions