Skip to content

fix: HTTP transport on Mono with high stripping - #2858

Merged
bitsandfoxes merged 9 commits into
mainfrom
fix/mono-linker-http-config
Oct 14, 2026
Merged

bitsandfoxes merged 9 commits into
mainfrom
fix/mono-linker-http-config

Conversation

@bitsandfoxes

Copy link
Copy Markdown
Contributor

Surfaced by #2854. That's the first time the Windows Mono job ran on Unity 6, where we build with High stripping.

On Mono, HttpWebRequest spins up the configuration system, which creates ExeConfigurationHost and the machine.config section types via reflection. The linker can't see that and strips them. So every envelope fails to send with Default constructor not found for type System.Configuration.ExeConfigurationHost. This isn't Sentry-specific, but it takes out our transport.

Unity ignores link.xml files inside packages, and we stopped writing one into Assets/ back in #707. So we're now providing the rules at build time via IUnityLinkerProcessor, and only for Mono.

The DependencyConflict package also breaks on Mono + High stripping (FieldAccessException in its own unaliased System.Text.Json). That's not ours to fix and Sentry doesn't go through that path, so it's skipped on the Mono job for now.

🤖 Generated with Claude Code

@bitsandfoxes
bitsandfoxes marked this pull request as ready for review October 13, 2026 12:01
@bitsandfoxes
bitsandfoxes requested review from a team, jpnurmi, limbonaut and tustanivsky October 13, 2026 15:10
Comment thread src/Sentry.Unity.Editor/MonoLinkerProcessor.cs Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ddb312e. Configure here.

Comment thread src/Sentry.Unity.Editor/MonoLinkerProcessor.cs
@bitsandfoxes
bitsandfoxes merged commit def6710 into main Oct 14, 2026
22 checks passed
@bitsandfoxes
bitsandfoxes deleted the fix/mono-linker-http-config branch October 14, 2026 10:02
@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- HTTP transport on `Mono` with high stripping ([#2858](https://github.com/getsentry/sentry-unity/pull/2858))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against ad0b6d0

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.

2 participants