{"record":{"id":"cb37fad807ba1e14","repo":"ToolJet/ToolJet","slug":"service-servicename-has-no-methods","errorCode":null,"errorMessage":"Service ${serviceName} has no methods","messagePattern":"Service (.+?) has no methods","errorType":"exception","errorClass":"GrpcOperationError","httpStatus":null,"severity":"error","filePath":"plugins/packages/grpcv2/lib/operations.ts","lineNumber":68,"sourceCode":"  try {\n    const reflectionClient = await createReflectionClient(sourceOptions);\n    const callOptions = buildCallOptionsForStreaming(sourceOptions);\n\n    // list all available services to verify the service exists\n    const serviceNames: string[] = await reflectionClient.listServices('*', callOptions);\n\n    if (!serviceNames || serviceNames.length === 0) {\n      throw new GrpcOperationError('No services found via reflection');\n    }\n\n    if (!serviceNames.includes(serviceName)) {\n      throw new GrpcOperationError(`Service ${serviceName} not found. Available services: ${serviceNames.join(', ')}`);\n    }\n\n    const methods: ListMethodsType[] = await reflectionClient.listMethods(serviceName, callOptions);\n\n    if (!methods || methods.length === 0) {\n      throw new GrpcOperationError(`Service ${serviceName} has no methods`);\n    }\n\n    const descriptor = await reflectionClient.getDescriptorBySymbol(serviceName, callOptions);\n\n    if (!descriptor) {\n      throw new GrpcOperationError(`Service descriptor not found for ${serviceName}`);\n    }\n\n    const packageObject = descriptor.getPackageObject({\n      keepCase: true,\n      enums: String,\n      longs: String,\n      defaults: true,\n      oneofs: true\n    });\n\n    const service = findServiceInPackage(packageObject, serviceName);\n    if (!service) {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/ToolJet/ToolJet/blob/20602a8e101f2e59686c9afde0d1402aac2c8871/plugins/packages/grpcv2/lib/operations.ts#L50-L86","documentation":"Thrown in buildReflectionClient when reflectionClient.listMethods(serviceName, callOptions) returns an empty or null array. The service was found in the list, but the reflection server reported it has zero RPC methods. A well-formed gRPC service must have at least one rpc, so this signals a malformed, empty, or generated stub service definition on the server.","triggerScenarios":"A service block declared in proto with no rpc entries; a placeholder/empty service registered for testing; reflection returning partial descriptor data for a service still being deployed; tooling-generated service with methods stripped.","commonSituations":"Connecting mid-deploy before methods are registered; proto file declares service Foo {} with no RPCs; reflection caching a stale descriptor after the server was updated to add methods (try restarting reflection).","solutions":["Confirm the service proto actually defines rpc methods; an empty service is not callable.","Restart the server / reflection cache in case the descriptor is stale.","Pick a different service that has methods, or re-run discoverMethods after the server is fully loaded."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await plugin.run(queryOptions, sourceOptions);\n} catch (e) {\n  if (e instanceof GrpcOperationError && /has no methods/.test(e.message)) {\n    // inform user the service is empty/placeholder; pick another\n  } else throw e;\n}","preventionTips":["Avoid calling empty/placeholder services; check discoverMethods() output first.","Treat a zero-method service as a server-side defect to report.","Refresh discovery after server deploys that add methods."],"tags":["reflection","discovery","proto","validation"],"backgroundTag":null,"analyzedSha":"20602a8e101f2e59686c9afde0d1402aac2c8871","analyzedAt":"2026-08-13T05:58:54.221Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}