{"record":{"id":"72a2a5fd1f853129","repo":"lima-vm/lima","slug":"unsupported-plist-type-s","errorCode":null,"errorMessage":"unsupported plist type: %s","messagePattern":"unsupported plist type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/plist/plist.go","lineNumber":149,"sourceCode":"\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid real value: %w\", err)\n\t\t}\n\t\tv.Real = &f\n\t\treturn nil\n\tcase \"integer\":\n\t\tvar txt string\n\t\tif err := dec.DecodeElement(&txt, &start); err != nil {\n\t\t\treturn err\n\t\t}\n\t\ti, err := strconv.ParseInt(strings.TrimSpace(txt), 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid integer value: %w\", err)\n\t\t}\n\t\tv.Integer = &i\n\t\treturn nil\n\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported plist type: %s\", start.Name.Local)\n\t}\n}\n\nfunc (a *Array) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error {\n\tvar vals []Value\n\tfor {\n\t\ttok, err := dec.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t*a = vals\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tswitch t := tok.(type) {\n\t\tcase xml.StartElement:\n\t\t\tvar v Value\n\t\t\tif err := dec.DecodeElement(&v, &t); err != nil {","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/plist/plist.go#L131-L167","documentation":"The plist Value parser only understands the standard element names: array, dict, string, data, date, true, false, real, integer. Any other start element encountered where a plist value is expected causes Value.UnmarshalXML (pkg/plist/plist.go:149) to return \"unsupported plist type: %s\" with the unknown local name.","triggerScenarios":"Decoding a plist that contains a non-standard element where a value must appear, e.g. a top-level <plist> child that is misspelled (<str>, <bool>), nested unknown tags, or a <key> appearing directly inside a <dict>'s value position handled incorrectly.","commonSituations":"Hand-written plists using invented element names; XML from other config formats (e.g. Android/Apple property-list variants) fed to this parser; documents where the root <plist> wrapper is missing so a stray element is decoded as a value.","solutions":["Rename the element to a supported plist type (string, integer, real, boolean as <true/>/<false/>, date, data, array, dict)","Check the %s in the error for the offending tag name and fix that location in the document","Ensure the document has the proper <plist version=\"1.0\"> root wrapping a single value element","Validate the plist against the Apple property-list XML DTD before feeding it to the parser"],"exampleFix":"// before (fails)\n<str>hello</str>\n// after\n<string>hello</string>","handlingStrategy":"validation","validationCode":"var allowed = map[string]bool{\n\t\"array\": true, \"dict\": true, \"string\": true, \"data\": true,\n\t\"date\": true, \"true\": true, \"false\": true, \"real\": true, \"integer\": true,\n}\nfunc validatePlistTags(dec *xml.Decoder) error {\n\tfor {\n\t\ttok, err := dec.Token()\n\t\tif err == io.EOF { return nil }\n\t\tif err != nil { return err }\n\t\tif se, ok := tok.(xml.StartElement); ok && !allowed[se.Name.Local] {\n\t\t\treturn fmt.Errorf(\"unsupported plist type: %s\", se.Name.Local)\n\t\t}\n\t}\n}","typeGuard":null,"tryCatchPattern":"var v plist.Value\nif err := xml.Unmarshal(data, &v); err != nil {\n\tif strings.HasPrefix(err.Error(), \"unsupported plist type: \") {\n\t\ttag := strings.TrimPrefix(err.Error(), \"unsupported plist type: \")\n\t\t// log/fix the offending element name\n\t}\n\treturn err\n}","preventionTips":["Use only the 9 standard plist value element names in documents","Always wrap values in a <plist version=\"1.0\"> root element","Validate against the Apple plist XML DTD or plutil -lint before parsing","Do not feed non-plist XML config formats to this parser"],"tags":["plist","xml","schema","unsupported-element"],"backgroundTag":"unsupported-plist-element","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}