grafana/k6 · error
invalid maxSendSize value: '%#v', it needs to be an integer
Error message
invalid maxSendSize value: '%#v', it needs to be an integer
What it means
Raised in newConnectParams when the 'maxSendSize' option of grpc.connect does not export as an int64 — strings, fractional numbers, or other types are rejected here.
Solutions
- Pass an integer byte value, e.g. {maxSendSize: 1048576}
- Avoid strings or floats in the option
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/js/modules/k6/grpc/params.go:197 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/8a839afdd42d91a0.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/grpc/params.go:197
if err != nil {
return result, fmt.Errorf("invalid reflectMetadata param: %w", err)
}
result.ReflectionMetadata = md
case "maxReceiveSize":
var ok bool
result.MaxReceiveSize, ok = v.(int64)
if !ok {
return result, fmt.Errorf("invalid maxReceiveSize value: '%#v', it needs to be an integer", v)
}
if result.MaxReceiveSize < 0 {
return result, fmt.Errorf("invalid maxReceiveSize value: '%#v, it needs to be a positive integer", v)
}
case "maxSendSize":
var ok bool
result.MaxSendSize, ok = v.(int64)
if !ok {
return result, fmt.Errorf("invalid maxSendSize value: '%#v', it needs to be an integer", v)
}
if result.MaxSendSize < 0 {
return result, fmt.Errorf("invalid maxSendSize value: '%#v, it needs to be a positive integer", v)
}
case "tls":
if err := parseConnectTLSParam(result, v); err != nil {
return result, err
}
case "authority":
var ok bool
result.Authority, ok = v.(string)
if !ok {
return result, fmt.Errorf("invalid authority value: '%#v', it needs to be a string", v)
}
default:
return result, fmt.Errorf("unknown connect param: %q", k)
}
}View on GitHub (pinned to 01ffac6f24)