XTLS/Xray-core · error
empty profiles
Error message
empty profiles
What it means
profilesFromConfig requires at least one configured Profile for the xmc (Minecraft-protocol) transport; it is invoked from both client and server config builders (config.go:12 and config.go:25). With no profiles there is no login identity (username/UUID/textures) to present or accept, so the transport refuses to start.
Source
Thrown at transport/internet/finalmask/xmc/profile.go:14
package xmc
import "fmt"
type loginProfile struct {
Username string
UUID UUID
TexturesValue string
TexturesSignature string
}
func profilesFromConfig(configured []*Profile) ([]loginProfile, error) {
if len(configured) == 0 {
return nil, fmt.Errorf("empty profiles")
}
profiles := make([]loginProfile, 0, len(configured))
for _, configuredProfile := range configured {
if configuredProfile == nil || configuredProfile.Username == "" {
return nil, fmt.Errorf("invalid profile")
}
if len(configuredProfile.Uuid) != len(UUID{}) {
return nil, fmt.Errorf("bad profile UUID length: %d", len(configuredProfile.Uuid))
}
if configuredProfile.TexturesValue == "" || configuredProfile.TexturesSignature == "" {
return nil, fmt.Errorf("incomplete profile textures")
}
profile := loginProfile{
Username: configuredProfile.Username,
TexturesValue: configuredProfile.TexturesValue,
TexturesSignature: configuredProfile.TexturesSignature,View on GitHub (pinned to 7d214f8b09)
Solutions
- Add at least one profile object with username, uuid, texturesValue, and texturesSignature to the xmc settings.
- If profiles come from an external source, fail config generation early when the list is empty rather than passing it through.
- Verify the JSON key name matches the config struct (Profile fields) so unmarshalling actually populates the slice.
Example fix
// before
"profiles": []
// after
"profiles": [{"username": "steve", "uuid": "<16 raw bytes b64>", "texturesValue": "...", "texturesSignature": "..."}] Defensive patterns
Strategy: validation
Validate before calling
if len(cfg.Profiles) == 0 {
return errors.New("xmc: at least one profile is required")
} Prevention
- Fail config generation early when the profiles list is empty.
- Include a complete example profile in config templates.
- Check that the JSON key matches the Profile struct so unmarshal populates the field.
When it happens
Trigger: Creating an xmc inbound/outbound whose JSON config has an empty, missing, or null "profiles" array.
Common situations: Copying an xmc config template and deleting the profiles block; generating config programmatically and serializing an empty slice as absent; expecting the transport to work like a generic proxy without Minecraft login data.
Related errors
- invalid profile
- incomplete profile textures
- bad profile UUID length: %d
- metrics must have a tag or listen address
- Cannot get depended features
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/09e836494ac90000.
Report an issue: GitHub.