{"record":{"id":"4edefc3508d71683","repo":"grafana/k6","slug":"invalid-grpc-stream-s-method-w","errorCode":null,"errorMessage":"invalid GRPC Stream's method: %w","messagePattern":"invalid GRPC Stream's method: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/grpc/grpc.go","lineNumber":123,"sourceCode":"func (mi *ModuleInstance) Exports() modules.Exports {\n\treturn modules.Exports{\n\t\tNamed: mi.exports,\n\t}\n}\n\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","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/grpc/grpc.go#L105-L141","documentation":"Raised in the grpc module's stream constructor when getMethodDescriptor fails for the sanitized method name given as the second argument — the method is not present in the loaded descriptors. Thrown via common.Throw; wraps the lookup error.","triggerScenarios":"Thrown at internal/js/modules/k6/grpc/grpc.go:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the fully-qualified method name 'package.Service/Method'","Verify the proto defining the method was loaded on the client","Check package, service, and method spelling against the proto source"],"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"}