grafana/k6 · error
invalid maxReceiveSize value: '%#v', it needs to be an…
Error message
invalid maxReceiveSize value: '%#v', it needs to be an integer
What it means
Raised in newConnectParams when the 'maxReceiveSize' option of grpc.connect does not export as an int64 — a float with a fractional part, a string, or another non-integer type was given.
Solutions
- Pass an integer byte value, e.g. {maxReceiveSize: 1048576}
- Avoid strings or fractional numbers
- Use an integer literal in the script to avoid float representation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/js/modules/k6/grpc/params.go:188 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/e758aa1d1cff4b84.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/grpc/params.go:188
}
case "reflect":
var ok bool
result.UseReflectionProtocol, ok = v.(bool)
if !ok {
return result, fmt.Errorf("invalid reflect value: '%#v', it needs to be boolean", v)
}
case "reflectMetadata":
md, err := newMetadata(params.Get(k))
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":View on GitHub (pinned to 01ffac6f24)