Repository navigation
Closed
Labels
BugIssue type
Description
While trying to add the Android SDK to the Unity SDK through getsentry/sentry-unity#307:
Building from main branch, with the SDK added but no DSN given, the app fails to launch with:
09-11 17:38:03.873 6108 6108 D Sentry : io.sentry.auto-init read: true
09-11 17:38:03.873 6108 6108 I Sentry : Retrieving auto-init from AndroidManifest.xml
09-11 17:38:03.890 1199 6134 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)
09-11 17:38:03.899 6108 6108 D AndroidRuntime: Shutting down VM
09-11 17:38:03.900 6108 6108 E AndroidRuntime: FATAL EXCEPTION: main
09-11 17:38:03.900 6108 6108 E AndroidRuntime: Process: com.DefaultCompany.unityofbugs, PID: 6108
09-11 17:38:03.900 6108 6108 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/app/FrameMetricsAggregator;
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.ActivityFramesTracker.<init>(ActivityFramesTracker.java:20)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.AndroidOptionsInitializer.init(AndroidOptionsInitializer.java:103)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.AndroidOptionsInitializer.init(AndroidOptionsInitializer.java:69)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.AndroidOptionsInitializer.init(AndroidOptionsInitializer.java:53)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.SentryAndroid.lambda$init$1(SentryAndroid.java:74)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.-$$Lambda$SentryAndroid$g99QaqNwcEFxja-3CMUNWZ36_g4.configure(Unknown Source:8)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.Sentry.init(Sentry.java:116)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:71)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:40)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.SentryInitProvider.onCreate(SentryInitProvider.java:27)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at io.sentry.android.core.SentryInitProvider.attachInfo(SentryInitProvider.java:44)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:7237)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6782)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6693)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread.access$1400(ActivityThread.java:232)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2014)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.os.Looper.loop(Looper.java:241)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7617)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
09-11 17:38:03.900 6108 6108 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: androidx.core.app.FrameMetricsAggregator
Metadata
Metadata
Assignees
Labels
BugIssue type
Activity
work around to work on Unity
work around for: getsentry/sentry-java#1711
marandaneto commentedon Sep 13, 2021
@bruno-garcia as you do with
gson, you've to do with the other transitive dependencies since themsbuilddoes not use Gradle to resolve dependencies via Maven.also its dependencies, the other way around is disabling/removing the integrations/processors that use them.
AppLifecycleIntegration,ActivityLifecycleIntegrationandPerformanceAndroidEventProcessordoes that help? can we close it?
bruno-garcia commentedon Sep 14, 2021
@marandaneto So those are now mandatory dependencies?
I'm not sure we want to impose those upon Unity games
I see, we'd need a way to turn them off via AndroidManifest, this way we can just opt-out and avoid the extra dependencies.
Alternatively if we end up using some of the performance features from the Android SDK we can just force the dependencies into the app.
marandaneto commentedon Sep 14, 2021
they always were -> https://docs.sentry.io/platforms/android/configuration/releases/#androidx-support since those features are enabled by default.
either we disable performance and release health or do reflection to check its availability, actually we do that for release health, its probably not checking for
androidxCorebruno-garcia commentedon Sep 14, 2021
@marandaneto we're probably better off introducing a toggle we can add to the manifest that turns off that stuff. We'd like to unblock this: getsentry/sentry-unity#307
marandaneto commentedon Sep 14, 2021
@bruno-garcia the toggle is disabling the features I've mentioned, they already have manifest options.
what do you mean by
turns off that stuff?