grafana/k6 · error

insecureSkipTLSVerify value must be true or false, not %q

Error message

insecureSkipTLSVerify value must be true or false, not %q

What it means

For the insecureSkipTLSVerify option, parseArg delegates to UnmarshalText on a nullable bool; anything other than a valid boolean literal fails and this error reports the offending value. The remote-write config string contains a non-boolean for that key.

Source

Thrown at internal/output/prometheusrw/remotewrite/config.go:345

}

// parseArg parses the supplied string of arguments into a Config.
func parseArg(text string) (Config, error) {
	var c Config
	opts := strings.SplitSeq(text, ",")

	for opt := range opts {
		r := strings.SplitN(opt, "=", 2)
		if len(r) != 2 {
			return c, fmt.Errorf("couldn't parse argument %q as option", opt)
		}
		key, v := r[0], r[1]
		switch key {
		case "url":
			c.ServerURL = null.StringFrom(v)
		case "insecureSkipTLSVerify":
			if err := c.InsecureSkipTLSVerify.UnmarshalText([]byte(v)); err != nil {
				return c, fmt.Errorf("insecureSkipTLSVerify value must be true or false, not %q", v)
			}
		case "tlsMinVersion":
			c.TLSMinVersion = null.StringFrom(v)
		case "username":
			c.Username = null.StringFrom(v)
		case "password":
			c.Password = null.StringFrom(v)
		case "pushInterval":
			if err := c.PushInterval.UnmarshalText([]byte(v)); err != nil {
				return c, err
			}
		case "trendAsNativeHistogram":
			if err := c.TrendAsNativeHistogram.UnmarshalText([]byte(v)); err != nil {
				return c, fmt.Errorf("trendAsNativeHistogram value must be true or false, not %q", v)
			}

		// TODO: add the support for trendStats
		// strvals doesn't support the same format used by --summary-trend-stats

View on GitHub (pinned to 01ffac6f24)

Solutions

  1. Use insecureSkipTLSVerify=true or insecureSkipTLSVerify=false in the argument string
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/output/prometheusrw/remotewrite/config.go:345 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18). Data as JSON: /api/errors/a426833a8da13d13. Report an issue: GitHub.