XTLS/Xray-core · error
Unknown account type:
Error message
Unknown account type:
What it means
Error "Unknown account type: " thrown in XTLS/Xray-core.
Source
Thrown at common/protocol/user.go:23
"github.com/xtls/xray-core/common/serial"
)
func (u *User) GetTypedAccount() (Account, error) {
if u.GetAccount() == nil {
return nil, errors.New("Account is missing").AtWarning()
}
rawAccount, err := u.Account.GetInstance()
if err != nil {
return nil, err
}
if asAccount, ok := rawAccount.(AsAccount); ok {
return asAccount.AsAccount()
}
if account, ok := rawAccount.(Account); ok {
return account, nil
}
return nil, errors.New("Unknown account type: ", u.Account.Type)
}
func (u *User) ToMemoryUser() (*MemoryUser, error) {
account, err := u.GetTypedAccount()
if err != nil {
return nil, err
}
return &MemoryUser{
Account: account,
Email: u.Email,
Level: u.Level,
}, nil
}
func ToProtoUser(mu *MemoryUser) *User {
if mu == nil {
return nil
}View on GitHub (pinned to 7d214f8b09)
When it happens
Trigger: Thrown at common/protocol/user.go:23 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/07cbf80e2d594fc1.
Report an issue: GitHub.