{"record":{"id":"1e0169bc5f1d5779","repo":"Perfare/Il2CppDumper","slug":"error-metadata-file-supplied-is-not-a-supported-v","errorCode":null,"errorMessage":"ERROR: Metadata file supplied is not a supported version[{version}].","messagePattern":"ERROR: Metadata file supplied is not a supported version\\[(.+?)\\]\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"Il2CppDumper/Il2Cpp/Metadata.cs","lineNumber":57,"sourceCode":"        public Il2CppRGCTXDefinition[] rgctxEntries;\n\n        private readonly Dictionary<uint, string> stringCache = new();\n\n        public Metadata(Stream stream) : base(stream)\n        {\n            var sanity = ReadUInt32();\n            if (sanity != 0xFAB11BAF)\n            {\n                throw new InvalidDataException(\"ERROR: Metadata file supplied is not valid metadata file.\");\n            }\n            var version = ReadInt32();\n            if (version < 0 || version > 1000)\n            {\n                throw new InvalidDataException(\"ERROR: Metadata file supplied is not valid metadata file.\");\n            }\n            if (version < 16 || version > 31)\n            {\n                throw new NotSupportedException($\"ERROR: Metadata file supplied is not a supported version[{version}].\");\n            }\n            Version = version;\n            header = ReadClass<Il2CppGlobalMetadataHeader>(0);\n            if (version == 24)\n            {\n                if (header.stringLiteralOffset == 264)\n                {\n                    Version = 24.2;\n                    header = ReadClass<Il2CppGlobalMetadataHeader>(0);\n                }\n                else\n                {\n                    imageDefs = ReadMetadataClassArray<Il2CppImageDefinition>(header.imagesOffset, header.imagesSize);\n                    if (imageDefs.Any(x => x.token != 1))\n                    {\n                        Version = 24.1;\n                    }\n                }","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/Perfare/Il2CppDumper/blob/4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a/Il2CppDumper/Il2Cpp/Metadata.cs#L39-L75","documentation":"Thrown as NotSupportedException when the metadata version is sane (0-1000) but outside the supported range 16-31. Il2CppDumper only implements metadata layouts for il2cpp versions 16 through 31 (roughly Unity 5.5 through recent 2021+).","triggerScenarios":"Calling new Metadata(stream) with a global-metadata.dat whose version field is <16 or >31 — very old Unity builds (version 15 and below) or very new Unity/il2cpp versions not yet supported by this dumper build.","commonSituations":"Dumping a game built on a newer Unity than the dumper supports, or an extremely old (pre-2017) il2cpp build; also modified metadata where the version field was tampered with.","solutions":["Check the metadata version (integer at file offset 4) and update Il2CppDumper to the latest release for new Unity versions.","For version <16, use an older Il2CppDumper release or legacy forks that support old il2cpp layouts.","Do not hand-edit the version field; the layout will not match and parsing will fail later.","Determine the Unity version from the game (e.g. unity default resources or globalgamemanagers) and pick a matching tool."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"int version = BitConverter.ToInt32(File.ReadAllBytes(metadataPath), 4);\nbool supported = version is >= 16 and <= 31;","typeGuard":null,"tryCatchPattern":"try { var md = new Metadata(stream); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"not a supported version\")) { /* update dumper or use legacy tool */ }","preventionTips":["Read the version at offset 4 and compare against the dumper's supported range first.","Keep Il2CppDumper updated for newer Unity versions.","For pre-16 metadata use a legacy fork; never fake the version field."],"tags":["metadata","version","unsupported-version"],"backgroundTag":"unsupported-enum-value","analyzedSha":"4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a","analyzedAt":"2026-09-11T16:52:42.117Z","contentChangedAt":"2026-09-11T16:52:42.117Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}