Search Issue Tracker


Fixed in 2021.3.14f1



Found in


Issue ID




Error "IL2CPP error for type 'System.Net.WebHeaderCollection/RfcChar'" is thrown when building on WebGL platform



How to reproduce:
1. Open the attached project “BugRfcChar (2).zip”
2. Press File → Build Settings
3. Build the project on WebGL
4. Observe the Console

Expected result: project builds successfully
Actual result: project fails to build

Reproducible with: 2021.3.4f1, 2021.3.8f1
Not reproducible with: 2020.3.37f1, 2021.3.3f1, 2021.3.9f1, 2021.3.11f1, 2022.1.10f1, 2022.2.0b2, 2023.1.0a4

Reproducible on: Windows 10 Pro

Full error:
Error: IL2CPP error for type 'System.Net.WebHeaderCollection/RfcChar' in assembly 'C:\Users\danielius.pliuskys\Desktop\BugRfcChar\Library\Bee\artifacts\WebGL\ManagedStripped\System.dll'
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at Unity.IL2CPP.CodeWriters.ChunkedMemoryStream.Seek(Int64 offset, SeekOrigin origin)
at Unity.IL2CPP.CodeWriters.InMemoryGeneratedMethodCodeWriter.Write(IGeneratedMethodCodeStream other)
at Unity.IL2CPP.SourceWriters.SourceWriterBase\{{2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager}}3.WorkerWriteItemsToFile(WorkItemData\{{2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler}}1.WorkerLoop(Object data)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Comments (4)

  1. danb1

    Sep 30, 2022 16:41

    Still happening as of 2021.3.10f1

  2. Selaphiel

    Aug 12, 2022 12:03

    Also in 2021.3.8f1

  3. osdima1

    Aug 10, 2022 11:22

    Same here 2021.3.7f1

  4. gboulard_amiltone

    Aug 01, 2022 16:07

    still reproducible with 2021.3.7f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.