{"record":{"id":"20fce6534f07aa57","repo":"XTLS/Xray-core","slug":"invalid-minecraft-profile-uuid-w","errorCode":null,"errorMessage":"invalid minecraft profile UUID: %w","messagePattern":"invalid minecraft profile UUID: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_finalmask.go","lineNumber":747,"sourceCode":"type XMCProfile struct {\n\t// Resolve the UUID by username, then request the session profile with\n\t// unsigned=false. Client and server must use the same signed profile.\n\tUsername          string `json:\"username\"`\n\tUUID              string `json:\"uuid\"`\n\tTexturesValue     string `json:\"texturesValue\"`\n\tTexturesSignature string `json:\"texturesSignature\"`\n}\n\nvar xmcUsernamePattern = regexp.MustCompile(`^[A-Za-z0-9_]{3,16}$`)\n\nfunc (c *XMCProfile) Build() (*xmc.Profile, error) {\n\tif !xmcUsernamePattern.MatchString(c.Username) {\n\t\treturn nil, fmt.Errorf(\"invalid minecraft profile username: %q\", c.Username)\n\t}\n\n\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","sourceCodeStart":729,"sourceCodeEnd":765,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_finalmask.go#L729-L765","documentation":"XMCProfile.Build parses the profile's UUID with googleuuid.Parse; any parse failure is wrapped as this error. Both the dashed 36-char form and the raw 32-hex-digit form are accepted by that parser.","triggerScenarios":"Setting the xmc profile \"uuid\" to a non-UUID string (wrong length, non-hex characters, mangled dashes) or leaving it empty.","commonSituations":"Copying a Mojang profile URL id that is actually the trimmed undashed UUID with a character missing; using the username in the uuid field; trailing whitespace/newlines from copy-paste.","solutions":["Paste the full UUID from the official session/profile lookup for that username","If using the undashed form, ensure exactly 32 hex characters","Strip whitespace and smart quotes around the value","Verify with an online UUID parser or `uuid.Parse` in a scratch program"],"exampleFix":"// before\n\"uuid\": \"069a79f44c9b4d5f8f5f9f5f5f5f5f5f5f5f\" // 34 chars, invalid\n\n// after\n\"uuid\": \"069a79f4-4c9b-4d5f-8f5f-9f5f5f5f5f5f\"","handlingStrategy":"validation","validationCode":"import \"github.com/google/uuid\"\n\nfunc validProfileUUID(s string) bool {\n    _, err := uuid.Parse(strings.TrimSpace(s))\n    return err == nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy UUIDs from the official session-server profile response","Trim whitespace before embedding in config","Reject undashed strings whose length is not exactly 32 hex chars"],"tags":["xmc","minecraft","uuid","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}