{"record":{"id":"11e15e59bb01d770","repo":"pulumi/pulumi","slug":"configurerequest-missing-args","errorCode":null,"errorMessage":"ConfigureRequest missing args","messagePattern":"ConfigureRequest missing args","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdk/nodejs/cmd/dynamic-provider/index.ts","lineNumber":117,"sourceCode":"\n    // Ideally we'd type the config as `Record<string, any>`, but since we\n    // implement `IResourceProviderServer`, we require the `[method: string`]\n    // index signature to satisfy the interface. This is a bit unfortunate and\n    // means we can't have a strongly typed `config` property. We'll just use\n    // `any` here.\n    private config: any;\n\n    cancel(call: any, callback: any): void {\n        callback(undefined, new emptyproto.Empty());\n    }\n\n    async configure(\n        call: grpc.ServerUnaryCall<provproto.ConfigureRequest, provproto.ConfigureResponse>,\n        callback: any,\n    ): Promise<void> {\n        const protoArgs = call.request.getArgs();\n        if (!protoArgs) {\n            throw new Error(\"ConfigureRequest missing args\");\n        }\n        const args = protoArgs.toJavaScript();\n        const config: Record<string, any> = {};\n        for (const [k, v] of Object.entries(args)) {\n            if (k === providerKey) {\n                continue;\n            }\n            config[k] = rpc.unwrapRpcSecret(v);\n        }\n        this.config = config;\n        const resp = new provproto.ConfigureResponse();\n        resp.setAcceptsecrets(false);\n        callback(undefined, resp);\n    }\n\n    async invoke(call: any, callback: any): Promise<void> {\n        const req: any = call.request;\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/nodejs/cmd/dynamic-provider/index.ts#L99-L135","documentation":"The dynamic provider's gRPC Configure handler in sdk/nodejs/cmd/dynamic-provider/index.ts reads the args from an incoming provproto.ConfigureRequest via getArgs(). If the request carries no args (null/undefined protobuf field), it throws 'ConfigureRequest missing args'. The provider cannot build its config map (excluding the provider key) without args, so it fails fast. This indicates a malformed or engine-incompatible Configure RPC rather than user configuration being wrong.","triggerScenarios":"A provproto.ConfigureRequest is delivered to the dynamic provider's configure() handler with getArgs() returning null/undefined, e.g. the engine sends a Configure RPC without args set (old/mismatched engine version or hand-crafted gRPC client).","commonSituations":"Running a dynamic provider plugin against a mismatched pulumi CLI version whose provider proto/Configure path omits args; custom tooling or tests invoking the dynamic provider's gRPC server directly without populating args.","solutions":["Upgrade the Pulumi CLI and the dynamic provider plugin so engine and provider use the same provider proto version","If invoking the gRPC server directly (tests/tools), always set args on the ConfigureRequest before calling configure","Clear stale plugin binaries (pulumi plugin rm --all) and reinstall so the correct dynamic provider implementation is used","Report a bug if a stock `pulumi up` hits this, since the engine normally always sends args"],"exampleFix":"// before (direct gRPC test call)\nconst req = new provproto.ConfigureRequest();\nawait provider.configure({ request: req }, cb); // throws: ConfigureRequest missing args\n// after\nconst req = new provproto.ConfigureRequest();\nreq.setArgs(new proto.Struct()); // args must be present (may be empty)\nawait provider.configure({ request: req }, cb);","handlingStrategy":"validation","validationCode":"// In a direct gRPC client/test of the dynamic provider:\nconst req = new provproto.ConfigureRequest();\nif (!req.getArgs()) {\n  req.setArgs(new proto.Struct()); // ensure args is always set before calling configure\n}","typeGuard":"function hasArgs(req: provproto.ConfigureRequest): boolean {\n  return req.getArgs() != null;\n}","tryCatchPattern":"try {\n  await provider.configure(call, callback);\n} catch (e) {\n  if (e.message === 'ConfigureRequest missing args') {\n    // fail the RPC with an InvalidArgument status instead of crashing\n    callback({ code: grpc.status.INVALID_ARGUMENT, message: e.message });\n  } else throw e;\n}","preventionTips":["Keep the Pulumi CLI and plugins on matching versions","When testing the provider server directly, always populate ConfigureRequest.args","Prefer `pulumi up` over hand-crafted Configure RPCs"],"tags":["grpc","dynamic-provider","nodejs","protocol-mismatch"],"backgroundTag":"grpc-request-missing-field","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}