{"record":{"id":"679052364d4e791f","repo":"larksuite/cli","slug":"exec-provider-timed-out-after-dms","errorCode":null,"errorMessage":"exec provider timed out after %dms","messagePattern":"exec provider timed out after (.+?)ms","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/binding/secret_resolve_exec.go","lineNumber":181,"sourceCode":"//   - non-zero exit → wrapped *exec.ExitError\n//   - stdout exceeds prep.MaxOut → typed error (size enforced post-Run)\n//   - empty trimmed stdout → typed error\nfunc runExecCommand(prep *execRun) ([]byte, error) {\n\tctx, cancel := context.WithTimeout(context.Background(), prep.Timeout)\n\tdefer cancel()\n\n\tcmd := exec.CommandContext(ctx, prep.Path, prep.Args...)\n\tcmd.Dir = filepath.Dir(prep.Path)\n\tcmd.Env = prep.Env // always set — leaving nil would inherit the parent env\n\tcmd.Stdin = bytes.NewReader(prep.Request)\n\n\tvar stdout, stderr bytes.Buffer\n\tcmd.Stdout = &stdout\n\tcmd.Stderr = &stderr\n\n\tif err := cmd.Run(); err != nil {\n\t\tif ctx.Err() == context.DeadlineExceeded {\n\t\t\treturn nil, fmt.Errorf(\"exec provider timed out after %dms\", int(prep.Timeout/time.Millisecond))\n\t\t}\n\t\treturn nil, fmt.Errorf(\"exec provider exited with error: %w\", err)\n\t}\n\n\tif stdout.Len() > prep.MaxOut {\n\t\treturn nil, fmt.Errorf(\"exec provider output exceeded maxOutputBytes (%d)\", prep.MaxOut)\n\t}\n\n\ttrimmed := bytes.TrimSpace(stdout.Bytes())\n\tif len(trimmed) == 0 {\n\t\treturn nil, fmt.Errorf(\"exec provider returned empty stdout\")\n\t}\n\treturn trimmed, nil\n}\n\n// extractExecSecret parses stdout as a JSON execResponse and returns the\n// string value at refID. When jsonOnly is false and the response is not valid\n// JSON (or the value is not a string), it falls back to the raw stdout or the","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/binding/secret_resolve_exec.go#L163-L199","documentation":"runExecCommand launched the external secret-provider command and cmd.Run failed while the context deadline (prep.Timeout) had expired - the provider process did not finish within its allotted budget. Terminal for that resolution attempt; distinct from a provider exit error.","triggerScenarios":"Thrown at internal/binding/secret_resolve_exec.go:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the provider exit faster (cache secrets, avoid interactive prompts)","Raise the exec provider timeout configuration if a longer budget is acceptable"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}