XTLS/Xray-core · error
empty password
Error message
empty password
What it means
XMC.Build requires a non-empty password because the RSA key pair used by the Minecraft masking layer is deterministically derived from it (xmc.DeriveRSAKey). An empty password would yield a known, public key pair and is rejected outright.
Source
Thrown at infra/conf/transport_finalmask.go:767
if c.TexturesValue == "" || c.TexturesSignature == "" {
return nil, fmt.Errorf("incomplete minecraft profile textures")
}
return &xmc.Profile{
Username: c.Username,
Uuid: append([]byte(nil), profileUUID[:]...),
TexturesValue: c.TexturesValue,
TexturesSignature: c.TexturesSignature,
}, nil
}
func (c *XMC) Build() (proto.Message, error) {
if len(c.Profiles) == 0 {
return nil, fmt.Errorf("minecraft profiles are required")
}
if c.Password == "" {
return nil, fmt.Errorf("empty password")
}
rsaPrivateKey, err := xmc.DeriveRSAKey(c.Password)
if err != nil {
return nil, fmt.Errorf("derive minecraft rsa key: %w", err)
}
rsaPublicKey, err := x509.MarshalPKIXPublicKey(&rsaPrivateKey.PublicKey)
if err != nil {
return nil, fmt.Errorf("marshal minecraft rsa public key: %w", err)
}
profiles := make([]*xmc.Profile, 0, len(c.Profiles))
for i := range c.Profiles {
profile, err := c.Profiles[i].Build()
if err != nil {
return nil, fmt.Errorf("build minecraft profile %d: %w", i, err)
}View on GitHub (pinned to 7d214f8b09)
Solutions
- Set a strong non-empty password shared by both client and server xmc configs
- Verify the exact JSON key "password" is used
- Keep the password identical on both ends — the derived RSA keys must match
Example fix
// before
"xmc": { "password": "", "profiles": [ ... ] }
// after
"xmc": { "password": "a-long-shared-secret", "profiles": [ ... ] } Defensive patterns
Strategy: validation
Validate before calling
func validXmcPassword(pw string) bool { return pw != "" } Prevention
- Treat xmc password as required metadata in config templates
- Use the same strong password on both peers
When it happens
Trigger: Omitting "password" in the xmc settings block or setting it to "".
Common situations: Placeholder configs with an empty password meant to be filled later; password key typo (pass/pwd) leaving the field zero-valued.
Related errors
- invalid minecraft profile username: %q
- minecraft profiles are required
- build minecraft profile %d: %w
- not a Service.
- Dispatcher: Invalid destination.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/1bb6eec15f3c6259.
Report an issue: GitHub.