{"record":{"id":"04348923ffe724cf","repo":"XTLS/Xray-core","slug":"account-is-missing","errorCode":null,"errorMessage":"Account is missing","messagePattern":"Account is missing","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/protocol/user.go","lineNumber":10,"sourceCode":"package protocol\n\nimport (\n\t\"github.com/xtls/xray-core/common/errors\"\n\t\"github.com/xtls/xray-core/common/serial\"\n)\n\nfunc (u *User) GetTypedAccount() (Account, error) {\n\tif u.GetAccount() == nil {\n\t\treturn nil, errors.New(\"Account is missing\").AtWarning()\n\t}\n\n\trawAccount, err := u.Account.GetInstance()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif asAccount, ok := rawAccount.(AsAccount); ok {\n\t\treturn asAccount.AsAccount()\n\t}\n\tif account, ok := rawAccount.(Account); ok {\n\t\treturn account, nil\n\t}\n\treturn nil, errors.New(\"Unknown account type: \", u.Account.Type)\n}\n\nfunc (u *User) ToMemoryUser() (*MemoryUser, error) {\n\taccount, err := u.GetTypedAccount()\n\tif err != nil {","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/common/protocol/user.go#L1-L28","documentation":"Validation in User.GetTypedAccount: the user's protobuf Account field is nil, so there is no account payload to instantiate. The user entry in the config has no account object at all. Logged at Warning.","triggerScenarios":"Thrown at common/protocol/user.go:10 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid account (with correct typed payload) for each user"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","contentChangedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}