Skip to content

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

Draft
bitsandfoxes wants to merge 2 commits into
mainfrom
fix/mono-linker-http-config
Draft

bitsandfoxes wants to merge 2 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

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.

1 participant