Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
buenaflor opened this issue Sep 3, 2024 · 0 comments

Comments

@buenaflor
Copy link
Contributor

buenaflor commented Sep 3, 2024

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"
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant