dagger/dagger · error

invalid %s registry protocol %v

Error message

invalid %s registry protocol %v

What it means

parseOCILockInputs: the 'protocol' lock option's value is not a string, so it cannot be interpreted as a registry protocol. The options map carries a wrongly-typed value.

Source

Thrown at core/lockfile_update.go:229

	if err != nil {
		return parsed, fmt.Errorf("invalid %s ref %q: %w", operation, ref, err)
	}
	if latest && !reference.IsNameOnly(refName) {
		return parsed, fmt.Errorf("invalid %s tagged ref %q", operation, ref)
	}
	if !latest {
		if _, ok := refName.(reference.NamedTagged); !ok {
			return parsed, fmt.Errorf("invalid %s untagged ref %q", operation, ref)
		}
	}
	parsed.ref = ref

	for name, value := range options {
		switch name {
		case "protocol":
			protocol, ok := value.(string)
			if !ok {
				return parsed, fmt.Errorf("invalid %s registry protocol %v", operation, value)
			}
			switch serverresolver.RegistryProtocol(protocol) {
			case serverresolver.RegistryProtocolHTTP, serverresolver.RegistryProtocolHTTPS:
				parsed.registryTransport.Protocol = serverresolver.RegistryProtocol(protocol)
			default:
				return parsed, fmt.Errorf("invalid %s registry protocol %q", operation, protocol)
			}
		case "insecureSkipTLSVerify":
			insecure, ok := value.(bool)
			if !ok {
				return parsed, fmt.Errorf("invalid %s insecureSkipTLSVerify %v", operation, value)
			}
			parsed.registryTransport.InsecureSkipTLSVerify = insecure
		default:
			return parsed, unsupportedLockOptionError(operation, name)
		}
	}
	if parsed.registryTransport.InsecureSkipTLSVerify {

View on GitHub (pinned to 82ba2681db)

Solutions

  1. Set the protocol option to the string "http" or "https"
  2. Regenerate the lock entry so options are well-typed
  3. Validate option types when the lock is written
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/lockfile_update.go:229 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05). Data as JSON: /api/errors/e12fad644d7c7527. Report an issue: GitHub.