Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- Resolved possible startup crashes on Android VR platforms like the Oculus Quest. The SDK no longer natively subscribles to interaction hooks for automatic tracing and breadcrumb creation. ([#2393](https://github.com/getsentry/sentry-unity/pull/2393))

### Dependencies

- Bump Native SDK from v0.11.2 to v0.12.1 ([#2357](https://github.com/getsentry/sentry-unity/pull/2357), [#2378](https://github.com/getsentry/sentry-unity/pull/2378), [#2388](https://github.com/getsentry/sentry-unity/pull/2388))
Expand Down
3 changes: 3 additions & 0 deletions src/Sentry.Unity.Android/SentryJava.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public void Init(SentryUnityOptions options)
androidOptions.Call("setEnableActivityLifecycleBreadcrumbs", false);
androidOptions.Call("setAnrEnabled", false);
androidOptions.Call("setEnableScopePersistence", false);
// Disable user interaction tracking to prevent conflicts with VR platforms (e.g., Oculus InputHooks)
androidOptions.Call("setEnableUserInteractionBreadcrumbs", false);
androidOptions.Call("setEnableUserInteractionTracing", false);
}, options.DiagnosticLogger));
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ internal void ModifyManifest(string basePath)
androidManifest.SetAutoAppLifecycleBreadcrumbs(false);
androidManifest.SetAnr(false);
androidManifest.SetPersistentScopeObserver(false);
// Disable user interaction tracking to prevent conflicts with VR platforms (e.g., Oculus InputHooks)
androidManifest.SetEnableUserInteractionBreadcrumbs(false);
androidManifest.SetEnableUserInteractionTracing(false);

// TODO: All SentryOptions and create specific Android options

Expand Down Expand Up @@ -493,6 +496,12 @@ internal void SetNdkScopeSync(bool enableNdkScopeSync)
internal void SetAutoTraceIdGeneration(bool enableAutoTraceIdGeneration)
=> SetMetaData($"{SentryPrefix}.traces.enable-auto-id-generation", enableAutoTraceIdGeneration.ToString());

internal void SetEnableUserInteractionBreadcrumbs(bool enableUserInteractionBreadcrumbs)
=> SetMetaData($"{SentryPrefix}.breadcrumbs.user-interaction", enableUserInteractionBreadcrumbs.ToString());

internal void SetEnableUserInteractionTracing(bool enableUserInteractionTracing)
=> SetMetaData($"{SentryPrefix}.traces.user-interaction.enable", enableUserInteractionTracing.ToString());

internal void SetDebug(bool debug) => SetMetaData($"{SentryPrefix}.debug", debug ? "true" : "false");

// https://github.com/getsentry/sentry-java/blob/db4dfc92f202b1cefc48d019fdabe24d487db923/sentry/src/main/java/io/sentry/SentryLevel.java#L4-L9
Expand Down
Loading