{"record":{"id":"17ec63e194eb2e80","repo":"dotnet/runtime","slug":"notimplementedexception-js-type-for-more-infor","errorCode":null,"errorMessage":"NotImplementedException ${js_type}. For more information see https://aka.ms/dotnet-wasm-jsinterop","messagePattern":"NotImplementedException (.+?)\\. For more information see https://aka\\.ms/dotnet-wasm-jsinterop","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/mono/browser/runtime/marshal-to-cs.ts","lineNumber":443,"sourceCode":"                if (BuildConfiguration === \"Debug\" && Object.isExtensible(value)) {\n                    value[proxy_debug_symbol] = `JS Object with JSHandle ${js_handle}`;\n                }\n                set_js_handle(arg, js_handle);\n            } else {\n                throw new Error(`JSObject proxy is not supported for ${js_type} ${value}`);\n            }\n        } else {\n            assert_not_disposed(value);\n            if (value instanceof ArraySegment) {\n                throw new Error(\"NotImplementedException: ArraySegment. \" + jsinteropDoc);\n            } else if (value instanceof ManagedError) {\n                set_arg_type(arg, MarshalerType.Exception);\n                set_gc_handle(arg, gc_handle);\n            } else if (value instanceof ManagedObject) {\n                set_arg_type(arg, MarshalerType.Object);\n                set_gc_handle(arg, gc_handle);\n            } else {\n                throw new Error(\"NotImplementedException \" + js_type + \". \" + jsinteropDoc);\n            }\n        }\n    }\n}\n\nexport function marshal_array_to_cs (arg: JSMarshalerArgument, value: Array<any> | TypedArray | undefined | null, element_type?: MarshalerType): void {\n    mono_assert(!!element_type, \"Expected valid element_type parameter\");\n    marshal_array_to_cs_impl(arg, value, element_type);\n}\n\nexport function marshal_array_to_cs_impl (arg: JSMarshalerArgument, value: Array<any> | TypedArray | undefined | null, element_type: MarshalerType): void {\n    if (value === null || value === undefined) {\n        set_arg_type(arg, MarshalerType.None);\n    } else {\n        const element_size = array_element_size(element_type);\n        mono_assert(element_size != -1, () => `Element type ${element_type} not supported`);\n        const length = value.length;\n        const buffer_length = element_size * length;","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/mono/browser/runtime/marshal-to-cs.ts#L425-L461","documentation":"The final else of the managed-proxy branch in marshal_cs_object_to_cs: the value carries a js_owned_gc_handle_symbol (so it is some kind of managed object proxy) but it is neither a ManagedError nor a ManagedObject, so the object marshaler does not know how to map it back. Typically indicates a version/runtime mismatch or a custom wrapper masquerading as a managed proxy.","triggerScenarios":"Passing an object that has the managed-proxy symbol but is not a recognized ManagedObject/ManagedError instance to an object-typed C# parameter.","commonSituations":"Mixing runtime versions where proxy class identity changed; a third-party wrapper that copies internal proxy symbols onto unrelated objects; stale references from a previous runtime instance.","solutions":["Ensure the JS and C# runtime versions match exactly (rebuild/redeploy both sides).","Do not attach or copy internal proxy symbols onto custom objects.","If holding a stale proxy from a previous runtime init, discard it and obtain a fresh reference."],"exampleFix":"// before\n// reusing a managed proxy object captured before a runtime restart\ndotnet.jsExports.Take(staleManagedObjectProxy); // throws\n// after\n// re-fetch the managed object from the current runtime instance","handlingStrategy":"validation","validationCode":"// Treat any object carrying the internal managed-proxy symbol as runtime-bound; do not reuse across inits.\nif (value && typeof value === 'object' && Object.getOwnPropertySymbols(value).some(s => String(s).includes('gc_handle'))) {\n  console.warn('Passing a possible stale managed proxy; ensure runtime versions match and references are fresh.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep JS and C# runtime builds in lockstep.","Never copy internal proxy symbols onto unrelated objects.","Discard managed proxies obtained before a runtime restart and fetch fresh references."],"tags":["marshaling","interop","versioning"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}