Skip to content

[browser][coreCLR] BFA_BAD_PLACE_FOR_GENERIC_METHOD #122567

Closed

Description

@pavelsavara

BFA_BAD_PLACE_FOR_GENERIC_METHOD

TypeLoadException: Generic method or method in generic class is internal call, PInvoke, or is defined in a COM Import class.
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS(String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
   at Microsoft.AspNetCore.Components.RenderTree.WebRenderer.AttachWebRendererInterop(IJSRuntime jsRuntime, JsonSerializerOptions jsonOptions, JSComponentInterop jsComponentInterop)
   at Microsoft.AspNetCore.Components.RenderTree.WebRenderer..ctor(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, JsonSerializerOptions jsonOptions, JSComponentInterop jsComponentInterop)
   at Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer..ctor(IServiceProvider serviceProvider, ResourceAssetCollection resourceCollection, ILoggerFactory loggerFactory, JSComponentInterop jsComponentInterop)
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost.RunAsyncCore(CancellationToken cancellationToken, WebAssemblyCultureProvider cultureProvider)
   at blazorwasmruntime.Program.Main(String[] args)

Activity

  1. added this to the 11.0.0 milestone on Dec 15, 2025
  2. added
    arch-wasm
    os-browser
    on Dec 15, 2025
  3. dotnet-policy-service commented on Dec 15, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @mangod9
    See info in area-owners.md if you want to be subscribed.

  4. pavelsavara commented on Dec 15, 2025

    @pavelsavara
    MemberAuthor

    native stack trace

    MethodTableBuilder::EnumerateClassMethods() (methodtablebuilder.cpp:3080)
    MethodTableBuilder::BuildMethodTableThrowing(LoaderAllocator*, Module*, Module*, unsigned int, BuildingInterfaceInfo_t*, MethodTableBuilder::bmtLayoutInfo const*, MethodTable*, MethodTableBuilder::bmtGenericsInfo const*, SigPointer, unsigned short) (methodtablebuilder.cpp:1630)
    ClassLoader::CreateTypeHandleForTypeDefThrowing(Module*, unsigned int, Instantiation, AllocMemTracker*) (methodtablebuilder.cpp:12907)
    ClassLoader::CreateTypeHandleForTypeKey(TypeKey const*, AllocMemTracker*) (clsload.cpp:2644)
    ClassLoader::DoIncrementalLoad(TypeKey const*, TypeHandle, ClassLoadLevel) (clsload.cpp:2591)
    ClassLoader::LoadTypeHandleForTypeKey_Body(TypeKey const*, TypeHandle, ClassLoadLevel) (clsload.cpp:3312)
    ClassLoader::LoadTypeHandleForTypeKey(TypeKey const*, TypeHandle, ClassLoadLevel, InstantiationContext const*) (clsload.cpp:3043)
    ClassLoader::LoadTypeDefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel, Instantiation*) (clsload.cpp:1968)
    MemberLoader::GetMethodDescFromMethodDef(Module*, unsigned int, int, ClassLoadLevel) (memberload.cpp:604)
    CEEInfo::resolveToken(CORINFO_RESOLVED_TOKEN*) (jitinterface.cpp:985)
    InterpCompiler::ResolveToken(unsigned int, CorInfoTokenKind, CORINFO_RESOLVED_TOKEN*) (compiler.cpp:3674)
    InterpCompiler::EmitCall(CORINFO_RESOLVED_TOKEN*, bool, bool, bool, bool) (compiler.cpp:4388)
    InterpCompiler::GenerateCode(CORINFO_METHOD_INFO*) (compiler.cpp:9036)
    InterpCompiler::CompileMethod() (compiler.cpp:1878)
    CILInterp::compileMethod(ICorJitInfo*, CORINFO_METHOD_INFO*, unsigned int, unsigned char**, unsigned int*) (eeinterp.cpp:115)
    invokeCompileMethod(EECodeGenManager*, CEECodeGenInfo*, unsigned char**, unsigned int*, NativeCodeVersion) (jitinterface.cpp:13003)
    UnsafeJitFunctionWorker(EECodeGenManager*, CEECodeGenInfo*, NativeCodeVersion, unsigned int*) (jitinterface.cpp:13224)
    UnsafeJitFunction(PrepareCodeConfig*, COR_ILMETHOD_DECODER*, bool*, bool*, unsigned int*) (jitinterface.cpp:13499)
    MethodDesc::JitCompileCodeLocked(PrepareCodeConfig*, COR_ILMETHOD_DECODER*, ListLockEntryBase<NativeCodeVersion>*, unsigned int*, bool*) (prestub.cpp:908)
    MethodDesc::JitCompileCodeLockedEventWrapper(PrepareCodeConfig*, ListLockEntryBase<NativeCodeVersion>*) (prestub.cpp:802)
    MethodDesc::JitCompileCode(PrepareCodeConfig*) (prestub.cpp:674)
    MethodDesc::PrepareILBasedCode(PrepareCodeConfig*) (prestub.cpp:404)
    MethodDesc::PrepareCode(PrepareCodeConfig*) (prestub.cpp:314)
    MethodDesc::PrepareInitialCode(CallerGCMode) (prestub.cpp:304)
    MethodDesc::DoPrestub(MethodTable*, CallerGCMode) (prestub.cpp:2271)
    InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3::operator()() const (interpexec.cpp:2961)
    std::__2::invoke_result<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>::type CallWithSEHWrapper<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>(InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3)::'lambda'(std::__2::invoke_result<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>::type CallWithSEHWrapper<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>(InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3)::Local*)::operator()(std::__2::invoke_result<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>::type CallWithSEHWrapper<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>(InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3)::Local*) const (interpexec.cpp:54)
    std::__2::invoke_result<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>::type CallWithSEHWrapper<InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3>(InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*)::$_3) (interpexec.cpp:56)
    InterpExecMethod(InterpreterFrame*, InterpMethodContextFrame*, InterpThreadContext*, ExceptionClauseArgs*) (interpexec.cpp:2959)
    ::ExecuteInterpretedMethod(TransitionBlock *, TADDR, void *) (prestub.cpp:2013)
    ExecuteInterpretedMethodWithArgs(unsigned long, signed char*, unsigned long, void*, unsigned long) (prestub.cpp:2057)
    ::CallDescrWorkerInternal(CallDescrData *) (calldescrworkerwasm.cpp:29)
    CallDescrWorker(CallDescrData*) (callhelpers.cpp:106)
    CallDescrWorkerWithHandler(CallDescrData*, int) (callhelpers.cpp:59)
    MethodDescCallSite::CallTargetWorker(unsigned long long const*, unsigned long long*, int) (callhelpers.cpp:549)
    MethodDescCallSite::Call_RetOBJECTREF(unsigned long long const*) (callhelpers.h:446)
    RunMainInternal(Param*) (assembly.cpp:1246)
    RunMain(MethodDesc*, short, int*, REF<PtrArray>*)::$_0::operator()(Param*) const::'lambda'(Param*)::operator()(Param*) const (assembly.cpp:1322)
    RunMain(MethodDesc*, short, int*, REF<PtrArray>*)::$_0::operator()(Param*) const (assembly.cpp:1324)
    RunMain(MethodDesc*, short, int*, REF<PtrArray>*) (assembly.cpp:1324)
    Assembly::ExecuteMainMethod(REF<PtrArray>*, int) (assembly.cpp:1450)
    CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) (corhost.cpp:349)
    ::coreclr_execute_assembly(void *, unsigned int, int, const char **, const char *, unsigned int *) (exports.cpp:491)
    ::BrowserHost_ExecuteAssembly(const char *, int, const char **) (browserhost.cpp:142)
    (anonymous) (dotnet.native.unkemf7wt2.js:719)
    runMain (dotnet.native.unkemf7wt2.js:1318)
    callEntryPoint (blazor.webassembly.66stpp682q.js:1)
    qt (blazor.webassembly.66stpp682q.js:1)
    await in qt
    Yt (blazor.webassembly.66stpp682q.js:1)
    an (blazor.webassembly.66stpp682q.js:1)
    (anonymous) (blazor.webassembly.66stpp682q.js:1)
    (anonymous) (blazor.webassembly.66stpp682q.js:1)
    
  5. pavelsavara commented on Dec 15, 2025

    @pavelsavara
    MemberAuthor
  6. pavelsavara commented on Dec 15, 2025

    @pavelsavara
    MemberAuthor

    Roslyn+JSImport generated code

      .method public hidebysig static string
        InvokeJSJson(
          string identifier,
          int64 targetInstanceId,
          int32 resultType,
          string argsJson,
          int64 asyncHandle,
          int32 callType
        ) cil managed
      {
        .custom instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSImportAttribute::.ctor(string, string)
          = (
            01 00 1d 42 6c 61 7a 6f 72 2e 5f 69 6e 74 65 72 // ...Blazor._inter
            6e 61 6c 2e 69 6e 76 6f 6b 65 4a 53 4a 73 6f 6e // nal.invokeJSJson
            0f 62 6c 61 7a 6f 72 2d 69 6e 74 65 72 6e 61 6c // .blazor-internal
            00 00                                           // ..
          )
          // string('Blazor._internal.invokeJSJson')
          // string('blazor-internal')
        .custom instance void [System.Runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor()
          = (01 00 00 00 )
        .param [2]
          .custom instance void class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalAsAttribute`1<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSType/Number>::.ctor()
            = (01 00 00 00 )
        .param [5]
          .custom instance void class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalAsAttribute`1<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSType/Number>::.ctor()
            = (01 00 00 00 )
        .maxstack 8
        .locals init (
          [0] valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType> buffer,
          [1] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument ____arg_exception_native,
          [2] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument ____arg_return_native,
          [3] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __identifier_native,
          [4] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __targetInstanceId_native,
          [5] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __resultType_native,
          [6] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __argsJson_native,
          [7] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __asyncHandle_native,
          [8] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __callType_native,
          [9] string str,
          [10] valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument V_10
        )
    
        // [43 5 - 43 67]
        IL_0000: ldsfld       class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSFunctionBinding WebAssembly.JSInterop.InternalCalls::__signature_InvokeJSJson_1668708194
        IL_0005: brtrue       IL_0090
        IL_000a: ldstr        "Blazor._internal.invokeJSJson"
        IL_000f: ldstr        "blazor-internal"
        IL_0014: ldloca.s     buffer
        IL_0016: initobj      valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>
        IL_001c: ldloca.s     buffer
        IL_001e: ldc.i4.0
        IL_001f: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_0024: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_String()
        IL_0029: stind.ref
        IL_002a: ldloca.s     buffer
        IL_002c: ldc.i4.1
        IL_002d: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_0032: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_String()
        IL_0037: stind.ref
        IL_0038: ldloca.s     buffer
        IL_003a: ldc.i4.2
        IL_003b: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_0040: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_Int52()
        IL_0045: stind.ref
        IL_0046: ldloca.s     buffer
        IL_0048: ldc.i4.3
        IL_0049: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_004e: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_Int32()
        IL_0053: stind.ref
        IL_0054: ldloca.s     buffer
        IL_0056: ldc.i4.4
        IL_0057: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_005c: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_String()
        IL_0061: stind.ref
        IL_0062: ldloca.s     buffer
        IL_0064: ldc.i4.5
        IL_0065: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_006a: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_Int52()
        IL_006f: stind.ref
        IL_0070: ldloca.s     buffer
        IL_0072: ldc.i4.6
        IL_0073: call         !!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/& '<PrivateImplementationDetails>'::InlineArrayElementRef<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_0078: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType::get_Int32()
        IL_007d: stind.ref
        IL_007e: ldloca.s     buffer
        IL_0080: ldc.i4.7
        IL_0081: call         valuetype [System.Runtime]System.ReadOnlySpan`1<!!1/*class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType*/> '<PrivateImplementationDetails>'::InlineArrayAsReadOnlySpan<valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>, class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>(!!0/*valuetype '<>y__InlineArray7`1'<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>*/&, int32)
        IL_0086: call         class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSFunctionBinding [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSFunctionBinding::BindJSFunction(string, string, valuetype [System.Runtime]System.ReadOnlySpan`1<class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerType>)
        IL_008b: stsfld       class [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSFunctionBinding WebAssembly.JSInterop.InternalCalls::__signature_InvokeJSJson_1668708194
    
        // [64 5 - 64 68]
        IL_0090: ldloca.s     ____arg_return_native
        IL_0092: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [65 5 - 65 39]
        IL_0097: ldloca.s     ____arg_return_native
        IL_0099: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::Initialize()
    
        // [67 5 - 67 71]
        IL_009e: ldloca.s     ____arg_exception_native
        IL_00a0: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [68 5 - 68 42]
        IL_00a5: ldloca.s     ____arg_exception_native
        IL_00a7: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::Initialize()
    
        // [70 5 - 70 64]
        IL_00ac: ldloca.s     __callType_native
        IL_00ae: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [72 5 - 72 67]
        IL_00b3: ldloca.s     __asyncHandle_native
        IL_00b5: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [74 5 - 74 64]
        IL_00ba: ldloca.s     __argsJson_native
        IL_00bc: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [76 5 - 76 66]
        IL_00c1: ldloca.s     __resultType_native
        IL_00c3: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [78 5 - 78 72]
        IL_00c8: ldloca.s     __targetInstanceId_native
        IL_00ca: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [80 5 - 80 66]
        IL_00cf: ldloca.s     __identifier_native
        IL_00d1: call         void [System.Runtime]System.Runtime.CompilerServices.Unsafe::SkipInit<valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument>(!!0/*valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*/&)
    
        // [81 5 - 81 37]
        IL_00d6: ldloca.s     __callType_native
        IL_00d8: ldarg.s      callType
        IL_00da: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(int32)
    
        // [82 5 - 82 43]
        IL_00df: ldloca.s     __asyncHandle_native
        IL_00e1: ldarg.s      asyncHandle
        IL_00e3: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(int64)
    
        // [83 5 - 83 37]
        IL_00e8: ldloca.s     __argsJson_native
        IL_00ea: ldarg.3      // argsJson
        IL_00eb: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(string)
    
        // [84 5 - 84 41]
        IL_00f0: ldloca.s     __resultType_native
        IL_00f2: ldarg.2      // resultType
        IL_00f3: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(int32)
    
        // [85 5 - 85 53]
        IL_00f8: ldloca.s     __targetInstanceId_native
        IL_00fa: ldarg.1      // targetInstanceId
        IL_00fb: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(int64)
    
        // [86 5 - 86 41]
        IL_0100: ldloca.s     __identifier_native
        IL_0102: ldarg.0      // identifier
        IL_0103: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToJS(string)
    
        // [88 5 - 88 220]
        IL_0108: ldloc.1      // ____arg_exception_native
        IL_0109: ldloc.2      // ____arg_return_native
        IL_010a: ldloc.3      // __identifier_native
        IL_010b: ldloc.s      __targetInstanceId_native
        IL_010d: ldloc.s      __resultType_native
        IL_010f: ldloc.s      __argsJson_native
        IL_0111: ldloc.s      __asyncHandle_native
        IL_0113: ldloc.s      __callType_native
        IL_0115: call         valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument WebAssembly.JSInterop.InternalCalls::'<InvokeJSJson>g____InvokeJSFunction|1_0'(valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument, valuetype [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument)
        IL_011a: stloc.s      V_10
        IL_011c: ldloca.s     V_10
        IL_011e: ldloca.s     str
        IL_0120: call         instance void [System.Runtime.InteropServices.JavaScript]System.Runtime.InteropServices.JavaScript.JSMarshalerArgument::ToManaged(string&)
    
        // [89 5 - 89 16]
        IL_0125: ldloc.s      str
        IL_0127: ret
    
      } // end of method InternalCalls::InvokeJSJson
  7. dotnet-policy-service commented on Dec 15, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  8. radekdoulik commented on Jan 5, 2026

    @radekdoulik
    Member

    @pavelsavara please try to run it with these env variables to get log info from LOADER and CLASSLOADER

    COMPlus_LogEnable=1
    COMPlus_LogToConsole=1
    COMPlus_LogLevel=10
    COMPlus_LogFacility=410
    

    It can help to gather more context of what is failing.

  9. pavelsavara commented on Jan 6, 2026

    @pavelsavara
    MemberAuthor

    It can help to gather more context of what is failing.

    It creates megabytes of console noise that is able to kill chrome. I captured just few lines before the failure

    SD: MT::FindDispatchImpl: searching Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.
    SD: VCSM::Resolver: (start) looking up interface method in Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime
    SD: MT::FindDispatchImpl: searching Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.
    SD: VCSM::Resolver: (end) looked up overridden interface method Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime::Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS
    SD: MT::FindDispatchImpl: searching Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.
    In PreStubWorker for Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime::Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS
    DoPrestub: method 0x633b2a8
        In PrepareILBasedCode, calling JitCompileCode
    Looking up Microsoft.JSInterop.JSCallResultType by name.
    Looking up Microsoft.JSInterop.JSInProcessRuntime by name.
    ML::FM pMT:0x633a214 for InvokeJS sig:0x776454 sigLen:9
    MT::MethodIterator created for Microsoft.JSInterop.JSInProcessRuntime.
    ML::FM Considering Microsoft.JSInterop.JSInProcessRuntime::Invoke, pMD:0x633a048
    ML::FM Considering Microsoft.JSInterop.JSInProcessRuntime::.ctor, pMD:0x633a0e4
    ML::FM Considering Microsoft.JSInterop.JSInProcessRuntime::InvokeJS, pMD:0x633a0c0
    ML::FM Considering Microsoft.JSInterop.JSInProcessRuntime::InvokeJS, pMD:0x633a09c
    In PreStubWorker for Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime::InvokeJS
    DoPrestub: method 0x633a484
        In PrepareILBasedCode, calling JitCompileCode
    Looking up Microsoft.JSInterop.JSCallResultType by name.
    PHASEDLOAD: LoadTypeHandleForTypeKey for type WebAssembly.JSInterop.InternalCalls to level LOADED 31
    PHASEDLOAD: shard contains:
    LoadTypeHandle: Loading Class from Module 0x633871c token 2000006
    PHASEDLOAD: Creating loading entry for type WebAssembly.JSInterop.InternalCalls
    PHASEDLOAD: About to do incremental load of type WebAssembly.JSInterop.InternalCalls (0) from level BEGIN 2
    Looking up System.Object by name.
    Loading class "WebAssembly.JSInterop.InternalCalls" from module "Microsoft.JSInterop.WebAssembly.dll" in domain 0x0x2038ae0 
    
  10. pavelsavara commented on Jan 6, 2026

    @pavelsavara
    MemberAuthor

    Now I think this is not a real issue.

    The class WebAssembly.JSInterop.InternalCalls contained [MethodImpl(MethodImplOptions.InternalCall)] until dotnet/aspnetcore#62755

    I guess this problem would go away once we flow the binaries.

  11. locked and limited conversation to collaborators on Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasmarea-VM-coreclros-browser

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions