{"record":{"id":"0a3ae3fcfd823586","repo":"grafana/k6","slug":"invalid-grpc-stream-s-parameters-w","errorCode":null,"errorMessage":"invalid GRPC Stream's parameters: %w","messagePattern":"invalid GRPC Stream's parameters: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/grpc/grpc.go","lineNumber":128,"sourceCode":"\n// stream returns a new stream object\nfunc (mi *ModuleInstance) stream(c sobek.ConstructorCall) *sobek.Object {\n\trt := mi.vu.Runtime()\n\n\tclient, err := extractClient(c.Argument(0), rt)\n\tif err != nil {\n\t\tcommon.Throw(rt, fmt.Errorf(\"invalid GRPC Stream's client: %w\", err))\n\t}\n\n\tmethodName := sanitizeMethodName(c.Argument(1).String())\n\tmethodDescriptor, err := client.getMethodDescriptor(methodName)\n\tif err != nil {\n\t\tcommon.Throw(rt, fmt.Errorf(\"invalid GRPC Stream's method: %w\", err))\n\t}\n\n\tp, err := newCallParams(mi.vu, c.Argument(2))\n\tif err != nil {\n\t\tcommon.Throw(rt, fmt.Errorf(\"invalid GRPC Stream's parameters: %w\", err))\n\t}\n\n\tp.SetSystemTags(mi.vu.State(), client.addr, methodName)\n\n\tlogger := mi.vu.State().Logger.WithField(\"streamMethod\", methodName)\n\n\ts := &stream{\n\t\tvu:               mi.vu,\n\t\tclient:           client,\n\t\tmethodDescriptor: methodDescriptor,\n\t\tmethod:           methodName,\n\t\tlogger:           logger,\n\n\t\ttq: taskqueue.New(mi.vu.RegisterCallback),\n\n\t\tinstanceMetrics: mi.metrics,\n\t\tbuiltinMetrics:  mi.vu.State().BuiltinMetrics,\n\t\tdone:            make(chan struct{}),","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/grpc/grpc.go#L110-L146","documentation":"Raised in the grpc module's stream constructor when newCallParams rejects the third argument — invalid values for metadata, tags, timeout, or an unknown parameter key. Thrown via common.Throw with the underlying cause wrapped.","triggerScenarios":"Thrown at internal/js/modules/k6/grpc/grpc.go:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Follow the wrapped error to the offending stream option","Use only recognized keys: metadata, tags, timeout, discardResponseMessage","Use correct types (object for metadata/tags, duration for timeout)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}