grafana/k6 · error
Blob.[arrayBuffer] return is not a Promise
Error message
Blob.[arrayBuffer] return is not a Promise
What it means
Error "Blob.[arrayBuffer] return is not a Promise" thrown in grafana/k6.
Source
Thrown at internal/js/modules/k6/websockets/helpers.go:56
func isObject(val sobek.Value) bool {
return val != nil && val.ExportType() != nil && val.ExportType().Kind() == reflect.Map
}
func extractBytes(o *sobek.Object, rt *sobek.Runtime) []byte {
arrayBuffer, ok := sobek.AssertFunction(o.Get("arrayBuffer"))
if !ok {
common.Throw(rt, errors.New("Blob.[arrayBuffer] is not a function"))
}
buffer, err := arrayBuffer(sobek.Undefined())
if err != nil {
common.Throw(rt, fmt.Errorf("call to Blob.[arrayBuffer] failed: %w", err))
}
p, ok := buffer.Export().(*sobek.Promise)
if !ok {
common.Throw(rt, errors.New("Blob.[arrayBuffer] return is not a Promise"))
}
ab, ok := p.Result().Export().(sobek.ArrayBuffer)
if !ok {
common.Throw(rt, errors.New("Blob.[arrayBuffer] promise's return is not an ArrayBuffer"))
}
return ab.Bytes()
}
View on GitHub (pinned to 93accf6570)
When it happens
Trigger: Thrown at internal/js/modules/k6/websockets/helpers.go:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/2072b81526dd8283.
Report an issue: GitHub.