sentry-unity
sentry-unity copied to clipboard
IL2CPP builds fail with code stripping: High
Unity 2021.1.12
Exception: IL2CPP error for method 'System.Collections.Immutable.ImmutableDictionary
2<TKey,TValue> System.Collections.Immutable.ImmutableDictionary::CreateRange(System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair`2<TKey,TValue>>)' in assembly '/Users/bitfox/_Workspace/unity_2021_1_12/Temp/StagingArea/assets/bin/Data/Managed/System.Collections.Immutable.dll'
Unity 2020.3.12
Exception: IL2CPP error for method 'System.Byte Sentry.Internal.Extensions.StreamExtensions/<ReadAllBytesAsync>d__0::System.Collections.Generic.IAsyncEnumerator<System.Byte>.get_Current()' in /_/src/Sentry/Internal/Extensions/StreamExtensions.cs:16707566
Unity 2019.4.21
Exception: IL2CPP error for type 'System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1' in assembly '/Users/bruno/git/sentry-unity/samples/unity-of-bugs/Temp/StagingArea/Data/Managed/Microsoft.Bcl.AsyncInterfaces.dll'
Doesn't look like a "Bug" to me. If anything, this is a unity issue? Is it actually actionable here? If not, I'd close this and/or report as a Unity bug
At the time it wasn't quite clear who or what the culprit was. Unity provides the option of adding a link.xml to preserve code from the code stripper and I wasn't sure if there wasn't a way to actually fix it ourselves. We'll have to revisit this issue now with the addition of the Alias tool.
It's possibly something we can fix with link.xml but if not, perhaps we need to open an issue with Unity.
As a dev, building for mobile, I'll want my app and smaller as possible, and sounds like code stripping mode high is a way to achieve that. This came up on Discord before too.