{"record":{"id":"209296d3f1a10800","repo":"grpc-ecosystem/grpc-gateway","slug":"no-method-s-found","errorCode":null,"errorMessage":"no method %s found","messagePattern":"no method (.+?) found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/descriptor/registry.go","lineNumber":781,"sourceCode":"\t\tr.fileOptions[opt.File] = opt.Option\n\t}\n\n\t// build map of all registered methods\n\tmethods := make(map[string]struct{})\n\tservices := make(map[string]struct{})\n\tfor _, f := range r.files {\n\t\tfor _, s := range f.Services {\n\t\t\tservices[s.FQSN()] = struct{}{}\n\t\t\tfor _, m := range s.Methods {\n\t\t\t\tmethods[m.FQMN()] = struct{}{}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, opt := range opts.Method {\n\t\tqualifiedMethod := \".\" + opt.Method\n\t\tif _, ok := methods[qualifiedMethod]; !ok {\n\t\t\treturn fmt.Errorf(\"no method %s found\", opt.Method)\n\t\t}\n\t\tr.methodOptions[qualifiedMethod] = opt.Option\n\t}\n\n\tfor _, opt := range opts.Message {\n\t\tqualifiedMessage := \".\" + opt.Message\n\t\tif _, ok := r.msgs[qualifiedMessage]; !ok {\n\t\t\treturn fmt.Errorf(\"no message %s found\", opt.Message)\n\t\t}\n\t\tr.messageOptions[qualifiedMessage] = opt.Option\n\t}\n\n\tfor _, opt := range opts.Service {\n\t\tqualifiedService := \".\" + opt.Service\n\t\tif _, ok := services[qualifiedService]; !ok {\n\t\t\treturn fmt.Errorf(\"no service %s found\", opt.Service)\n\t\t}\n\t\tr.serviceOptions[qualifiedService] = opt.Option","sourceCodeStart":763,"sourceCodeEnd":799,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/internal/descriptor/registry.go#L763-L799","documentation":"Method-level options are matched against fully-qualified method names collected from registered files. If opts.Method names a method whose qualified name ('.' + name) is not among the registered RPC methods, the registry rejects the option entry.","triggerScenarios":"Registering options with opts.Method set to an RPC that does not exist, is misspelled, omits/misspecifies the package/service prefix, or belongs to a file not loaded into this registry.","commonSituations":"Renaming or deleting an RPC without updating the options config; missing leading package qualifier (e.g. 'mypkg.MyService.MyMethod'); copying options between projects with different package names.","solutions":["Use the fully-qualified method name including package and service: pkg.Service.Method","Verify the RPC still exists in the loaded proto files","Ensure the file containing the service was loaded before registering options","Fix casing/typos in the method name in your options file"],"exampleFix":"// before\nMethod: \"MyService.MyMethod\"\n// after\nMethod: \"mypackage.v1.MyService.MyMethod\"","handlingStrategy":"validation","validationCode":"want := \".\" + opt.Method\nexists := false\nfor _, f := range loadedFiles { if fileHasMethod(f, want) { exists = true } }\nif !exists { return fmt.Errorf(\"method %q not found; use pkg.Service.Method\", opt.Method) }\nerr = reg.RegisterOptions(opts)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always qualify options entries with the full proto package: pkg.Service.Method","Keep the options file in the same repo as the protos and update it in the same PR as renames","Diff options entries against a generated symbol list in CI"],"tags":["configuration","protobuf","options"],"backgroundTag":"unknown-symbol-reference","analyzedSha":"a58a4436a376a4bcc7d8f10c4d4f919a8438bba9","analyzedAt":"2026-09-02T10:28:31.537Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}