XTLS/Xray-core · error

invalid UUID:

Error message

invalid UUID: 

What it means

Error "invalid UUID: " thrown in XTLS/Xray-core.

Source

Thrown at common/uuid/uuid.go:60

		return false
	}
	return bytes.Equal(u.Bytes(), another.Bytes())
}

// New creates a UUID with random value.
func New() UUID {
	var uuid UUID
	common.Must2(rand.Read(uuid.Bytes()))
	uuid[6] = (uuid[6] & 0x0f) | (4 << 4)
	uuid[8] = (uuid[8]&(0xff>>2) | (0x02 << 6))
	return uuid
}

// ParseBytes converts a UUID in byte form to object.
func ParseBytes(b []byte) (UUID, error) {
	var uuid UUID
	if len(b) != 16 {
		return uuid, errors.New("invalid UUID: ", b)
	}
	copy(uuid[:], b)
	return uuid, nil
}

// ParseString converts a UUID in string form to object.
func ParseString(str string) (UUID, error) {
	var uuid UUID

	text := []byte(str)
	if l := len(text); l < 32 || l > 36 {
		if l == 0 || l > 30 {
			return uuid, errors.New("invalid UUID: ", str)
		}
		h := sha1.New()
		h.Write(uuid[:])
		h.Write(text)
		u := h.Sum(nil)[:16]

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at common/uuid/uuid.go:60 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/faacf871172a30f9. Report an issue: GitHub.