{"record":{"id":"23b2214ed7cebc55","repo":"lutzroeder/netron","slug":"undefined-node-type-23b221","errorCode":null,"errorMessage":"Undefined node type.","messagePattern":"Undefined node type\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"source/espresso.js","lineNumber":149,"sourceCode":"espresso.Value = class {\n\n    constructor(name, type, description = null, initializer = null) {\n        if (typeof name !== 'string') {\n            throw new espresso.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\nespresso.Node = class {\n\n    constructor(metadata, obj) {\n        if (!obj.type) {\n            throw new Error('Undefined node type.');\n        }\n        const type = 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 espresso.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 espresso.Argument(argument.name, values, null, argument.visible);\n        });\n        this.attributes = Object.entries(obj.attributes || []).map(([name, value]) => {\n            const schema = metadata.attribute(obj.type, name);\n            let type = null;\n            let visible = true;","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/lutzroeder/netron/blob/d8a543f5f847ef596aa58858d6adcf5d75545f7f/source/espresso.js#L131-L167","documentation":"espresso.Node's constructor throws when the deserialized espresso layer object has no 'type'. Espresso (Apple's ANE graph format) layers always carry a type string; absence means the blob was misparsed.","triggerScenarios":"Opening an .espresso.json or compiled espresso model where a layers array entry lacks the 'type' key, or where the JSON structure shifted so obj is not a layer dict.","commonSituations":"espresso JSON produced by a newer macOS/Xcode version with a changed schema; truncated file; netron version predating new layer encodings.","solutions":["Update netron (espresso schema support changes frequently with macOS releases)","Validate the JSON: every entry in layers should have a 'type' string","Re-export the espresso model from the original pipeline","File a netron issue with the (sanitized) JSON if schema changed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const json = JSON.parse(await file.text());\nconst bad = (json.network?.layers ?? json.layers ?? []).filter((l) => !l.type);\nif (bad.length) console.warn('untyped layers:', bad.length);","typeGuard":"const isEspressoLayer = (l) => l && typeof l === 'object' && typeof l.type === 'string';","tryCatchPattern":"try { new espresso.Model(...); } catch (e) { if (/Undefined node type/.test(e.message)) { /* schema mismatch — update viewer */ } }","preventionTips":["Pin macOS/Xcode and netron versions together","Re-serialize espresso JSON with JSON.parse/stringify round-trip to catch structural damage"],"tags":["espresso","apple-ane","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"}