Skip to content

fix: remove dependency on AnalyticsSessionInfo#2625

Merged
bitsandfoxes merged 7 commits intomainfrom
fix/default-user-id
Apr 2, 2026
Merged

fix: remove dependency on AnalyticsSessionInfo#2625
bitsandfoxes merged 7 commits intomainfrom
fix/default-user-id

Conversation

@bitsandfoxes
Copy link
Copy Markdown
Contributor

@bitsandfoxes bitsandfoxes commented Apr 2, 2026

Resolves #2622

We first added the reliance on AnalyticsSessionInfo when building the first version of mobile native support to be able to tie the resulting issues together. With the growing platform support we kept hitting restriction and limitations (i.e. cannot use on consoles, causes crashes due to implicitly writing to disk without asking).

Additionally, the UnityEngine.Analytics.AnalyticsSessionInfo.userId API is part of a legacy system being phased out. Since we already fetch the native user ID on most platforms (mobile) we can clean this up, and move on, relying on our own mechanisms instead.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Sync attachments on Android, Windows, and Linux by bitsandfoxes in #2609
  • Improve Xbox native support by bitsandfoxes in #2617

Bug Fixes 🐛

  • Remove dependency on AnalyticsSessionInfo by bitsandfoxes in #2625
  • Pass failed request codes down to cocoa by bitsandfoxes in #2619

Internal Changes 🔧

Deps

  • Update .NET SDK to v6.3.0 by github-actions in #2615
  • Update Native SDK to v0.13.4 by github-actions in #2612
  • Update CLI to v3.3.5 by github-actions in #2614
  • Update CLI to v3.3.4 by github-actions in #2604
  • Update Java SDK to v8.37.1 by github-actions in #2605
  • Update Cocoa SDK to v9.8.0 by github-actions in #2596
  • Update Native SDK to v0.13.3 by github-actions in #2597
  • Update Java SDK to v8.36.0 by github-actions in #2591

Other

  • Update validate-pr workflow by stephanie-anderson in #2618
  • Add PR validation workflow by stephanie-anderson in #2608
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #2601

Other

  • Fix command injection vulnerability in iOS workflow by fix-it-felix-sentry in #2598

🤖 This preview updates automatically when you update the PR.

PopulateUser was falling back to options.InstallationId which caused
User.Id to be set on the scope before the .NET SDK Enricher runs.
This made HasUser() return true, preventing IsEnvironmentUser from
setting the Username when SendDefaultPii is enabled.

The Enricher already sets User.Id from InstallationId after the
HasUser() check, so the ID is still always present on every event.
@bitsandfoxes bitsandfoxes force-pushed the fix/default-user-id branch from d038eba to 166abe9 Compare April 2, 2026 18:49
@bitsandfoxes bitsandfoxes merged commit 9b310de into main Apr 2, 2026
70 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/default-user-id branch April 2, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android SIGSEGV crash in AnalyticsSessionInfo.userId during Sentry initialization

2 participants