caddyserver/caddy · error

failed to get argon2id time parameter: %w

Error message

failed to get argon2id time parameter: %w

What it means

Error "failed to get argon2id time parameter: %w" thrown in caddyserver/caddy.

Source

Thrown at modules/caddyhttp/caddyauth/command.go:151

			plaintext = plaintext[:len(plaintext)-1] // Trailing newline
		}

		if len(plaintext) == 0 {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("plaintext is required")
		}
	}

	var hash []byte
	var hashString string
	switch algorithm {
	case bcryptName:
		hash, err = BcryptHash{cost: bcryptCost}.Hash(plaintext)
		hashString = string(hash)
	case argon2idName:
		time, err := fs.GetUint32("argon2id-time")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id time parameter: %w", err)
		}
		memory, err := fs.GetUint32("argon2id-memory")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id memory parameter: %w", err)
		}
		threads, err := fs.GetUint8("argon2id-threads")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id threads parameter: %w", err)
		}
		keyLen, err := fs.GetUint32("argon2id-keylen")
		if err != nil {
			return caddy.ExitCodeFailedStartup, fmt.Errorf("failed to get argon2id keylen parameter: %w", err)
		}

		hash, _ = Argon2idHash{
			time:    time,
			memory:  memory,
			threads: threads,

View on GitHub (pinned to 50e54ee279)

Solutions

  1. Pass a valid integer for the argon2id time parameter, or omit the flag to use the default.

When it happens

Trigger: Thrown at modules/caddyhttp/caddyauth/command.go:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15). Data as JSON: /api/errors/9dca7ecddba60f07. Report an issue: GitHub.