{"record":{"id":"3d8e836ef110cb83","repo":"XTLS/Xray-core","slug":"failed-to-get-vless-user","errorCode":null,"errorMessage":"failed to get VLESS user","messagePattern":"failed to get VLESS user","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/vless/inbound/inbound.go","lineNumber":64,"sourceCode":")\n\nfunc init() {\n\tcommon.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {\n\t\tvar dc dns.Client\n\t\tif err := core.RequireFeatures(ctx, func(d dns.Client) error {\n\t\t\tdc = d\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tc := config.(*Config)\n\n\t\tvalidator := new(vless.MemoryValidator)\n\t\tfor _, user := range c.Users {\n\t\t\tu, err := user.ToMemoryUser()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.New(\"failed to get VLESS user\").Base(err).AtError()\n\t\t\t}\n\t\t\tif err := validator.Add(u); err != nil {\n\t\t\t\treturn nil, errors.New(\"failed to initiate user\").Base(err).AtError()\n\t\t\t}\n\t\t}\n\n\t\treturn New(ctx, c, dc, validator)\n\t}))\n}\n\n// Handler is an inbound connection handler that handles messages in VLess protocol.\ntype Handler struct {\n\tinboundHandlerManager  feature_inbound.Manager\n\tpolicyManager          policy.Manager\n\tstats                  stats.Manager\n\tvalidator              vless.Validator\n\tdecryption             *encryption.ServerInstance\n\toutboundHandlerManager outbound.Manager","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/vless/inbound/inbound.go#L46-L82","documentation":"Thrown while creating a VLESS inbound handler: the inbound config declares a list of users, and each one is converted via user.ToMemoryUser() before being added to the MemoryValidator. This error means at least one user entry failed conversion, most commonly because its UUID string cannot be parsed into a protocol UUID. The wrapped Base(err) carries the underlying parse failure.","triggerScenarios":"Registering a VLESS inbound whose clients[] entry has an invalid \"id\" (non-canonical UUID, typos, empty string), or an email/account field that fails conversion in ToMemoryUser(). Raised at handler-construction time (config load / inbound handler registration), before any traffic flows.","commonSituations":"Hand-edited config.json with a malformed UUID; UUIDs generated with non-standard separators or wrong length; copy-paste truncation of the id field; JSON config where id was left empty for a placeholder client.","solutions":["Check the wrapped error text to identify which field failed (it includes the UUID parse message)","Fix every clients[].id in the VLESS inbound to a canonical UUID (36 chars, 8-4-4-4-12) or a valid UUID-form input; regenerate with `xray uuid`","Remove placeholder/empty client entries from the inbound config","Validate the config with `xjson`/`xray run -test` before deploying"],"exampleFix":"// config.json (before)\n\"clients\": [{ \"id\": \"b831381d-6324-4d53-ad4f-8cda8b\", \"email\": \"a\" }]\n\n// after (canonical UUID, e.g. from `xray uuid`)\n\"clients\": [{ \"id\": \"b831381d-6324-4d53-ad4f-8cda8ba05a7\", \"email\": \"a\" }]","handlingStrategy":"validation","validationCode":"// before starting xray, validate every VLESS inbound client UUID\nimport \"github.com/google/uuid\"\n\nfunc validateVlessClients(inbounds []Inbound) error {\n    for _, in := range inbounds {\n        if in.Protocol != \"vless\" { continue }\n        for _, c := range in.Settings.Clients {\n            if _, err := uuid.Parse(c.ID); err != nil {\n                return fmt.Errorf(\"inbound %s client %q: bad UUID %q: %w\", in.Tag, c.Email, c.ID, err)\n            }\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate ids with `xray uuid` instead of hand-writing them","Run `xray run -test` in CI for every config change","Never deploy placeholder client entries"],"tags":["vless","config","uuid","inbound"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}