{"record":{"id":"37d7b3a61dbb2db2","repo":"gchq/CyberChef","slug":"unknown-frame-identifier-id","errorCode":null,"errorMessage":"Unknown Frame Identifier: ${id}","messagePattern":"Unknown Frame Identifier: (.+?)","errorType":"exception","errorClass":"OperationError","httpStatus":null,"severity":"error","filePath":"src/core/operations/ExtractID3.mjs","lineNumber":132,"sourceCode":"\n            // Frame Identifier of frame\n            let id = String.fromCharCode(input[0]) + String.fromCharCode(input[1]) + String.fromCharCode(input[2]);\n            input = input.slice(3);\n\n            // If the next character is non-zero it is an identifier\n            if (input[0] !== 0) {\n                id += String.fromCharCode(input[0]);\n            }\n            input = input.slice(1);\n\n            if (id in FRAME_DESCRIPTIONS) {\n                const [frame, size] = readFrame(id);\n                tags[id] = frame;\n                pos += 10 + size;\n            } else if (id === \"\\x00\\x00\\x00\") { // end of header\n                break;\n            } else {\n                throw new OperationError(\"Unknown Frame Identifier: \" + id);\n            }\n        }\n\n        result.Tags = tags;\n\n        return result;\n    }\n\n    /**\n     * Displays the extracted data in a more accessible format for web apps.\n     * @param {JSON} data\n     * @returns {html}\n     */\n    present(data) {\n        if (!data || !Object.prototype.hasOwnProperty.call(data, \"Tags\"))\n            return JSON.stringify(data, null, 4);\n\n        let output = `<table class=\"table table-hover table-sm table-bordered table-nonfluid\">","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/gchq/CyberChef/blob/4290ea753912378913b1f3f54e0fc5720afeda5d/src/core/operations/ExtractID3.mjs#L114-L150","documentation":"Thrown by the Extract ID3 operation when a frame identifier read from the ID3 tag is not found in the known FRAME_DESCRIPTIONS dictionary and is not the null-padding terminator. The parser walks frames sequentially; an unrecognized 3- or 4-byte ID indicates either tag corruption, an unsupported/proprietary frame type, or a parsing desync from a malformed earlier frame.","triggerScenarios":"run(input, args) inside the while loop (line 113) processing frames. A frame ID assembled from input bytes does not match any key in FRAME_DESCRIPTIONS and is not '\\x00\\x00\\x00' (end-of-header padding), reaching the else branch at line 131.","commonSituations":"Corrupted or truncated ID3 tags, custom/proprietary frame types not in the standard list, or a desync caused by incorrect size decoding of a preceding frame shifting the read position. Also with ID3v2.4 extended headers or unsynchronisation that the parser does not handle.","solutions":["Verify the MP3 file has a well-formed, standard ID3v2 tag (v2.2–v2.4).","Try re-tagging the file with a standard tag editor to remove custom/proprietary frames.","Use the Extract Audio Metadata operation which has more robust ID3 parsing.","Inspect the raw bytes around the reported frame offset to identify corruption."],"exampleFix":"// before: MP3 with corrupted/custom frame ID 'XXYZ' -> error\n\n// after: re-save MP3 with standard ID3v2.3 frames using a tag editor","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const result = chef.extractID3(input);\n} catch (e) {\n  if (e.message.startsWith('Unknown Frame Identifier')) {\n    // Tag may contain proprietary frames or be corrupt; use Extract Audio Metadata instead\n  } else throw e;\n}","preventionTips":["Use well-formed, standard ID3v2 tags (v2.2–v2.4).","Prefer Extract Audio Metadata for robustness against custom frames.","Re-tag files with standard editors if frames are non-standard."],"tags":["audio","id3","mp3","parse-error","data-corruption"],"backgroundTag":null,"analyzedSha":"4290ea753912378913b1f3f54e0fc5720afeda5d","analyzedAt":"2026-08-13T06:05:50.210Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}