-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Auto Session Tracking should only be enabled by default on Mobile until total process isolation is supported #264
Comments
There are 2 possible approaches to determine the platform: Application.platform or Platform dependent compilation. Suggested way is to use Possible implementation could look something like this scriptableOptions.AutoSessionTracking = IsAutoSessionTracking(options.AutoSessionTracking);
private bool IsAutoSessionTracking(bool autoSessionTracking)
{
#if UNITY_IOS || UNITY_ANDROID || UNITY_PS4 || UNITY_XBOXONE
return autoSessionTracking;
#elif UNITY_STANDALONE || UNITY_EDITOR
return PlayerSettings.forceSingleInstance;
#else
return autoSessionTracking;
#endif
} |
Or we live with this until we address getsentry/sentry-dotnet#1067 |
The |
As per a discord discussion:
|
Updating impact, priority & status after the workaround has been implemented. The final solution is blocked by the dotnet issue. |
…(desktop) (#643) * fix: add a workaround for #264 - don't run multiple sessions at the same time (desktop) * chore: update changelog * chore: lockfile implementation comments * refactor: move single-dotnet-instance logic to SentryUnity.cs * chore: minor log changes * Update src/Sentry.Unity/SentryUnity.cs Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
The session support currently expects exclusive access to the directory it caches data. This works well in sandboxed apps like on mobile but not on Desktop when multiple instances can be executed concurrently.
For this reason, until getsentry/sentry-dotnet#1067 is fixed, we can only opt-in to auto session tracking safely if we are sure there's only 1 instance of the app (mobile, or a player on desktop that only allows one instance running).
When
PlayerSettings.forceSingleInstance
is set we're safe to enable auto session tracking. Also if the player is Android or iOS and console.The text was updated successfully, but these errors were encountered: