{"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/60108ba66eb7d1d12f595480091b4ad80a24b172/src/mono/browser/runtime/marshal-to-cs.ts#L425-L461","documentation":"Thrown by marshal_cs_object_to_cs() when a value has a C# gc_handle (it is a managed proxy) but is not recognized as a ManagedError, ManagedObject, or ArraySegment. This is the catch-all in the gc_handle-defined branch. It indicates the value is some kind of managed proxy object whose concrete JS type the marshaler does not know how to handle through the generic 'object' path. The js_type is included in the message for diagnosis.","triggerScenarios":"Passing a managed proxy object (something created by C# and handed to JS with a gc_handle) to a C# 'object' parameter, where the proxy is not a standard ManagedObject, ManagedError, or ArraySegment. This could be a custom managed proxy type or a corrupted/unexpected proxy state.","commonSituations":"Using custom interop types that the marshaler does not recognize. Version skew between the JS runtime and the C# assemblies where a new proxy type exists on one side but not the other. Passing an internal runtime object (like a TaskHolder) as a regular object.","solutions":["Check what type of object you are passing; use the correct C# parameter type (ManagedObject, specific class type) instead of 'object'.","If the value should be a ManagedObject, ensure it was properly created by the runtime's managed proxy system.","Update both the JS runtime and C# assemblies to matching versions to avoid unknown proxy types.","Extract the underlying data from the proxy and pass primitive values instead.","File an issue if the value is a standard managed object but still triggers this error, as it may be a marshaler bug."],"exampleFix":"// before (unknown managed proxy passed to object)\n// C#: [JSExport] public static void Handle(object proxy) { }\n// JS:  Handle(someUnknownManagedProxy); // throws\n\n// after (use the correct type or pass a known value)\n// C#: [JSExport] public static void Handle(ManagedObject proxy) { }\n// or extract and pass primitive data instead of the proxy","handlingStrategy":"type-guard","validationCode":"// Validate that managed proxy values are known types before passing to object\nfunction isKnownManagedProxy(value: any): boolean {\n  return value instanceof ManagedObject\n    || value instanceof ManagedError\n    || (value && value.constructor && value.constructor.name === 'ArraySegment');\n}\n\nif (!isKnownManagedProxy(myValue)) {\n  throw new Error('Unknown managed proxy type; check runtime and assembly versions');\n}","typeGuard":"function isManagedObject(value: unknown): value is ManagedObject {\n  return value !== null && typeof value === 'object' && js_owned_gc_handle_symbol in (value as any);\n}","tryCatchPattern":null,"preventionTips":["Ensure the JS runtime and C# assemblies are from the same version/build.","Use specific C# types (ManagedObject, ManagedError) instead of 'object' for managed proxies.","Extract primitive data from proxies before passing to generic APIs."],"tags":["marshaling","type-mismatch","managed-proxy","interop"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}