XTLS/Xray-core · error

invalid size

Error message

invalid size

What it means

Error "invalid size" thrown in XTLS/Xray-core.

Source

Thrown at common/units/bytesize.go:11

package units

import (
	"errors"
	"strconv"
	"strings"
	"unicode"
)

var (
	errInvalidSize = errors.New("invalid size")
	errInvalidUnit = errors.New("invalid or unsupported unit")
)

// ByteSize is the size of bytes
type ByteSize uint64

const (
	_ = iota
	// KB = 1KB
	KB ByteSize = 1 << (10 * iota)
	// MB = 1MB
	MB
	// GB = 1GB
	GB
	// TB = 1TB
	TB
	// PB = 1PB
	PB

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at common/units/bytesize.go:11 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/95a4b89fa7fa823a. Report an issue: GitHub.