{"record":{"id":"99c9c96c4145efa6","repo":"ToolJet/ToolJet","slug":"service-descriptor-not-found-for-servicename","errorCode":null,"errorMessage":"Service descriptor not found for ${serviceName}","messagePattern":"Service descriptor not found for (.+?)","errorType":"exception","errorClass":"GrpcOperationError","httpStatus":null,"severity":"error","filePath":"plugins/packages/grpcv2/lib/operations.ts","lineNumber":74,"sourceCode":"\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) {\n      throw new GrpcOperationError(`Service ${serviceName} not found in proto descriptor`);\n    }\n\n    if (typeof service !== 'function') {\n      throw new GrpcOperationError(`Service ${serviceName} is not a valid constructor function`);\n    }","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/ToolJet/ToolJet/blob/20602a8e101f2e59686c9afde0d1402aac2c8871/plugins/packages/grpcv2/lib/operations.ts#L56-L92","documentation":"Thrown in buildReflectionClient when reflectionClient.getDescriptorBySymbol(serviceName) resolves to a falsy descriptor. The service was listed and has methods, but the reflection server could not return the FileDescriptorProto for that symbol. This is a reflection-protocol-level inconsistency: the symbol is enumerable but its descriptor is unavailable.","triggerScenarios":"Reflection server partial implementation that lists services but fails descriptor-by-symbol lookups; a corrupted or incomplete reflection response; descriptor cache miss on the server side; race between service registration and descriptor indexing.","commonSituations":"Incompatible reflection server implementation; server under load dropping descriptor responses; grpc-js-reflection-client version mismatch with server protocol; transient server state during hot reload.","solutions":["Retry the call — descriptor indexing can lag service listing during server startup.","Update/restart the reflection server to ensure descriptor-by-symbol works.","Fall back to import_proto_file or import_protos_from_filesystem discovery if reflection descriptors are unreliable."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function withDescriptorRetry(fn, attempts = 3) {\n  for (let i = 0; i < attempts; i++) {\n    try { return await fn(); }\n    catch (e) {\n      if (e instanceof GrpcOperationError && /descriptor not found/.test(e.message) && i < attempts - 1) continue;\n      throw e;\n    }\n  }\n}","preventionTips":["Retry reflection descriptor lookups — they can lag during server startup.","Ensure the reflection server fully indexes descriptors before serving.","Fall back to file-based discovery if descriptor-by-symbol is persistently broken."],"tags":["reflection","discovery","descriptor","transient"],"backgroundTag":null,"analyzedSha":"20602a8e101f2e59686c9afde0d1402aac2c8871","analyzedAt":"2026-08-13T05:58:54.221Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}