sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

IL2CPP builds fail with code stripping: High

Open bitsandfoxes opened this issue 4 years ago • 3 comments
trafficstars

Unity 2021.1.12

Exception: IL2CPP error for method 'System.Collections.Immutable.ImmutableDictionary2<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'

bitsandfoxes avatar Jul 02 '21 11:07 bitsandfoxes

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

vaind avatar Mar 03 '22 09:03 vaind

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.

bitsandfoxes avatar Mar 03 '22 13:03 bitsandfoxes

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.

bruno-garcia avatar Mar 15 '22 15:03 bruno-garcia