{"record":{"id":"bc09f3228132b66d","repo":"lutzroeder/netron","slug":"undefined-node-type","errorCode":null,"errorMessage":"Undefined node type.","messagePattern":"Undefined node type\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"source/coreml.js","lineNumber":297,"sourceCode":"coreml.Value = class {\n\n    constructor(name, type, description = null, initializer = null) {\n        if (typeof name !== 'string') {\n            throw new coreml.Error(`Invalid value identifier '${JSON.stringify(name)}'.`);\n        }\n        this.name = name;\n        this.type = !type && initializer ? initializer.type : type;\n        this.description = description;\n        this.initializer = initializer;\n        this.quantization = initializer ? initializer.quantization : null;\n    }\n};\n\ncoreml.Node = class {\n\n    constructor(context, obj) {\n        if (!obj.type) {\n            throw new Error('Undefined node type.');\n        }\n        if (obj.group) {\n            this.group = obj.group || null;\n        }\n        const type = context.metadata.type(obj.type);\n        this.type = type ? { ...type } : { name: obj.type };\n        this.type.name = obj.type.split(':').pop();\n        this.name = obj.name || '';\n        this.description = obj.description || '';\n        this.inputs = (obj.inputs || []).map((argument) => {\n            const values = argument.value.map((value) => value.value);\n            return new coreml.Argument(argument.name, values, null, argument.visible);\n        });\n        this.outputs = (obj.outputs || []).map((argument) => {\n            const values = argument.value.map((value) => value.value);\n            return new coreml.Argument(argument.name, values, null, argument.visible);\n        });\n        this.attributes = Object.entries(obj.attributes || []).map(([name, value]) => {","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/lutzroeder/netron/blob/d8a543f5f847ef596aa58858d6adcf5d75545f7f/source/coreml.js#L279-L315","documentation":"coreml.Node's constructor requires obj.type to be truthy; a neural network layer dictionary without a 'type' key is considered invalid. Every CoreML layer must declare its layer type (e.g. 'convolution', 'pooling').","triggerScenarios":"Decoding a CoreML .mlmodel whose NeuralNetwork.layers array contains an entry with no/empty 'type' key; often when the FeatureType/protobuf mapping produced an unexpected object shape.","commonSituations":"Newer CoreML layer kinds not mapped by the installed netron version; corrupted or hand-constructed mlmodel; wrong protobuf branch decoded as layers.","solutions":["Update netron to a version supporting your CoreML spec version","Inspect the model with coremltools to confirm layers are valid","Re-save/convert the model with current coremltools","If the layer is genuinely type-less, report the model as a netron issue"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const layers = spec?.neuralNetwork?.layers ?? [];\nif (layers.some((l) => !l.type)) throw new Error('model has untyped layers');","typeGuard":"const hasType = (l) => Boolean(l && typeof l.type === 'string' && l.type.length);","tryCatchPattern":"try { model = new coreml.Model(...); } catch (e) { if (/Undefined node type/.test(e.message)) { /* skip or report the bad layer */ } }","preventionTips":["Validate layers with coremltools before inspection","Keep netron updated alongside CoreML spec versions"],"tags":["coreml","model-parsing","layer-type"],"backgroundTag":"missing-layer-type","analyzedSha":"d8a543f5f847ef596aa58858d6adcf5d75545f7f","analyzedAt":"2026-08-27T19:21:42.082Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}