Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-931

Unity3D - Failed to weave assembly.

      What happened?

      I get the "Failed to weave assembly." error for one of my assemblies in my Unity project. Happens on any assembly reload.
      Tools > Realm > Weave Assemblies also produces the same result.

      Repro steps

      Assembly Reload due to code changes in solution -> "Failed to weave assembly."
      Tools > Realm > Weave Assemblies -> "Failed to weave assembly."

      Version

      10.19.0

      What Atlas Services are you using?

      Local Database only

      What type of application is this?

      Unity

      Client OS and version

      Microsoft Windows 11 Pro - 10.0.22621 Build 22621, Unity 2021.3.16f1

      Code snippets

      No response

      Stacktrace of the exception/crash you're getting

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      [Game.Dialogue] Failed to weave assembly. If the error persists, please report it to https://github.com/realm/realm-dotnet/issues: System.InvalidOperationException: Operation is not valid due to the current state of the object.
        at Mono.Collections.Generic.Collection`1+Enumerator[T].CheckState () [0x00036] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
        at Mono.Collections.Generic.Collection`1+Enumerator[T].MoveNext () [0x00000] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
        at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00059] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00059] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at RealmWeaver.Weaver+<GetReferencedTypes>d__58.MoveNext () [0x0022b] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
        at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].MoveNext () [0x0004e] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () [0x0002b] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00059] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Set`1[TElement].UnionWith (System.Collections.Generic.IEnumerable`1[T] other) [0x00018] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable+DistinctIterator`1[TSource].FillSet () [0x0000b] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable+DistinctIterator`1[TSource].ToArray () [0x00000] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <1c318258bf0843289b0e2cbe692fee39>:0 
        at RealmWeaver.Weaver.WeaveSchema (Mono.Cecil.TypeDefinition[] types) [0x00070] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
        at RealmWeaver.Weaver.Execute (RealmWeaver.Analytics+Config analyticsConfig) [0x00105] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
        at RealmWeaver.UnityWeaver.WeaveAssemblyCore (System.String assemblyPath, System.Collections.Generic.IEnumerable`1[T] references, System.String framework, System.String targetOSName) [0x00066] in <847bd8c6804f451e8e587bcc6a3e4780>:0 
      UnityEngine.Debug:LogError (object)
      RealmWeaver.UnityWeaver/UnityLogger:Error (string,Mono.Cecil.Cil.SequencePoint)
      RealmWeaver.UnityWeaver:WeaveAssemblyCore (string,System.Collections.Generic.IEnumerable`1<string>,string,string)
      RealmWeaver.UnityWeaver/<>c__DisplayClass19_0:<WeaveAllAssemblies>b__0 ()
      System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
      

      Relevant log output

      No response

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: