{"record":{"id":"6e0e8d354d9a63ec","repo":"XTLS/Xray-core","slug":"minecraft-profiles-are-required","errorCode":null,"errorMessage":"minecraft profiles are required","messagePattern":"minecraft profiles are required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_finalmask.go","lineNumber":763,"sourceCode":"\tprofileUUID, err := googleuuid.Parse(c.UUID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid minecraft profile UUID: %w\", err)\n\t}\n\tif c.TexturesValue == \"\" || c.TexturesSignature == \"\" {\n\t\treturn nil, fmt.Errorf(\"incomplete minecraft profile textures\")\n\t}\n\n\treturn &xmc.Profile{\n\t\tUsername:          c.Username,\n\t\tUuid:              append([]byte(nil), profileUUID[:]...),\n\t\tTexturesValue:     c.TexturesValue,\n\t\tTexturesSignature: c.TexturesSignature,\n\t}, nil\n}\n\nfunc (c *XMC) Build() (proto.Message, error) {\n\tif len(c.Profiles) == 0 {\n\t\treturn nil, fmt.Errorf(\"minecraft profiles are required\")\n\t}\n\n\tif c.Password == \"\" {\n\t\treturn nil, fmt.Errorf(\"empty password\")\n\t}\n\n\trsaPrivateKey, err := xmc.DeriveRSAKey(c.Password)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"derive minecraft rsa key: %w\", err)\n\t}\n\n\trsaPublicKey, err := x509.MarshalPKIXPublicKey(&rsaPrivateKey.PublicKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"marshal minecraft rsa public key: %w\", err)\n\t}\n\n\tprofiles := make([]*xmc.Profile, 0, len(c.Profiles))\n\tfor i := range c.Profiles {","sourceCodeStart":745,"sourceCodeEnd":781,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_finalmask.go#L745-L781","documentation":"XMC.Build refuses to construct the Minecraft-masking transport config when the profiles list is empty — at least one fully-specified profile is mandatory for the protocol to present a client identity.","triggerScenarios":"Adding an \"xmc\" settings block (finalmask transport) with no \"profiles\" array, or an empty profiles array [].","commonSituations":"Enabling xmc to see what it does without filling in profiles; profiles omitted because the JSON key was misspelled (profile/profileList) and unmarshalled to nil.","solutions":["Add at least one complete profile (username, uuid, texturesValue, texturesSignature) under profiles","Check the exact key spelling \"profiles\" in the xmc settings block","Remove the xmc block entirely if the transport is not actually needed"],"exampleFix":"// before\n\"xmc\": { \"password\": \"hunter2\", \"profiles\": [] }\n\n// after\n\"xmc\": {\n  \"password\": \"hunter2\",\n  \"profiles\": [{ \"username\": \"Steve\", \"uuid\": \"...\", \"texturesValue\": \"...\", \"texturesSignature\": \"...\" }]\n}","handlingStrategy":"validation","validationCode":"func hasXmcProfiles(x *XMC) bool {\n    return x != nil && len(x.Profiles) > 0\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["If the xmc block exists, at least one full profile must too","Check exact key spelling \"profiles\""],"tags":["xmc","minecraft","config","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}