{"record":{"id":"d2b1b3a367c8fe2a","repo":"grafana/k6","slug":"can-t-get-method-on-service-q-w","errorCode":null,"errorMessage":"can't get method on service %q: %w","messagePattern":"can't get method on service %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/netext/grpcext/reflect.go","lineNumber":37,"sourceCode":"// It is called in the connect function the first time the Client.Connect function is called.\nfunc (rc *reflectionClient) Reflect(ctx context.Context) (*descriptorpb.FileDescriptorSet, error) {\n\tclient := grpcreflect.NewClientAuto(ctx, rc.Conn)\n\tclient.AllowMissingFileDescriptors()\n\n\tservices, err := client.ListServices()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"can't list services: %w\", err)\n\t}\n\n\tseen := make(map[fileDescriptorLookupKey]bool, len(services))\n\tfdset := &descriptorpb.FileDescriptorSet{\n\t\tFile: make([]*descriptorpb.FileDescriptorProto, 0, len(services)),\n\t}\n\n\tfor _, srv := range services {\n\t\tsrvDescriptor, err := client.ResolveService(srv)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"can't get method on service %q: %w\", srv, err)\n\t\t}\n\n\t\tstack := []*desc.FileDescriptor{srvDescriptor.GetFile()}\n\n\t\tfor len(stack) > 0 {\n\t\t\tfdp := stack[len(stack)-1]\n\t\t\tstack = stack[:len(stack)-1]\n\n\t\t\tfdkey := fileDescriptorLookupKey{\n\t\t\t\tPackage: fdp.GetPackage(),\n\t\t\t\tName:    fdp.GetName(),\n\t\t\t}\n\n\t\t\tstack = append(stack, fdp.GetDependencies()...)\n\n\t\t\tif seen[fdkey] {\n\t\t\t\t// When a proto file contains declarations for multiple services\n\t\t\t\t// then the same proto file is returned multiple times,","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/netext/grpcext/reflect.go#L19-L55","documentation":"While walking the services returned by reflection, the client could not resolve the file descriptor for a method on the named service. The server listed the service but then failed to serve its descriptors (partial registration, missing dependencies, or a server-side reflection bug). The error names the offending service, and the descriptor set build aborts.","triggerScenarios":"Thrown at internal/lib/netext/grpcext/reflect.go:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the service's protobuf file and all its transitive imports are compiled into the server binary","Re-register the service and its reflection metadata on the server; restart it","If the server's reflection is unreliable, use a local proto bundle for the client instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}