XTLS/Xray-core · error

User %s not found.

Error message

User %s not found.

What it means

Error "User %s not found." thrown in XTLS/Xray-core.

Source

Thrown at proxy/shadowsocks_2022/inbound_multi.go:136

// RemoveUser implements proxy.UserManager.RemoveUser().
func (i *MultiUserInbound) RemoveUser(ctx context.Context, email string) error {
	if email == "" {
		return errors.New("Email must not be empty.")
	}

	i.Lock()
	defer i.Unlock()

	idx := -1
	for ii, u := range i.users {
		if strings.EqualFold(u.Email, email) {
			idx = ii
			break
		}
	}

	if idx == -1 {
		return errors.New("User ", email, " not found.")
	}

	ulen := len(i.users)

	i.users[idx] = i.users[ulen-1]
	i.users[ulen-1] = nil
	i.users = i.users[:ulen-1]

	// sync to multi service
	// Considering implements shadowsocks2022 in xray-core may have better performance.
	i.service.UpdateUsersWithPasswords(
		C.MapIndexed(i.users, func(index int, it *protocol.MemoryUser) int { return index }),
		C.Map(i.users, func(it *protocol.MemoryUser) string { return it.Account.(*MemoryAccount).Key }),
	)

	return nil
}

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at proxy/shadowsocks_2022/inbound_multi.go:136 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/204eddf76bead64d. Report an issue: GitHub.