{"record":{"id":"c020a61814c2b197","repo":"dapr/dapr","slug":"failed-to-load-components-s","errorCode":null,"errorMessage":"failed to load components: %s","messagePattern":"failed to load components: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/runtime/runtime.go","lineNumber":740,"sourceCode":"\terr = a.initNameResolution(ctx)\n\tif err != nil {\n\t\tlog.Error(err.Error())\n\t}\n\n\t// Start proxy\n\ta.initProxy()\n\n\ta.initDirectMessaging(a.nameResolver)\n\n\ta.initPluggableComponents(ctx)\n\n\tif err = a.appendBuiltinSecretStore(ctx); err != nil {\n\t\treturn fmt.Errorf(\"failed to init built-in secret store: %s\", err)\n\t}\n\n\terr = a.loadComponents(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to load components: %s\", err)\n\t}\n\n\tif err = a.flushOutstandingComponents(ctx); err != nil {\n\t\treturn err\n\t}\n\n\terr = a.loadHTTPEndpoints(ctx)\n\tif err != nil {\n\t\tlog.Warnf(\"failed to load HTTP endpoints: %s\", err)\n\t}\n\n\tif err = a.flushOutstandingHTTPEndpoints(ctx); err != nil {\n\t\treturn err\n\t}\n\n\terr = a.loadDeclarativeSubscriptions(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to load declarative subscriptions: %s\", err)","sourceCodeStart":722,"sourceCodeEnd":758,"githubUrl":"https://github.com/dapr/dapr/blob/74ad41702745709bb15fe2114ff693b8c59bc3cc/pkg/runtime/runtime.go#L722-L758","documentation":"loadComponents failed: either the loader errored while reading manifests (disk: unreadable/invalid YAML in the resources path; kubernetes: operator component stream error) or a component's blocking init failed without spec.ignoreErrors (surfaced as the nested 'process component ... error' from initComponentBlocking). Non-nil here terminates daprd via the runner manager.","triggerScenarios":"Standalone: malformed YAML, wrong apiVersion/kind, or a directory in --resources-path containing a broken file. Kubernetes: operator watch/stream failures or a component whose Init fails (bad credentials, unreachable backing service) with ignoreErrors unset.","commonSituations":"Invalid component manifests pushed in CI; secrets referenced but absent; backing services unreachable at pod start; typo'd metadata crashing Init; resource quota or RBAC issues breaking the operator client.","solutions":["Check the nested error text: 'process component X error' points to Init, otherwise suspect manifest loading","Run `dapr components` / `kubectl get components -o yaml` and lint every manifest (kind: Component, apiVersion dapr.io/v1alpha1, valid type/version)","Fix the underlying Init cause (credentials, host, metadata) or set spec.ignoreErrors: true on optional components","Confirm the resources path contains only component YAMLs and is readable by the daprd user"],"exampleFix":"# before\napiVersion: dapr.io/v1alpha1\nkind: Component\nmetadata:\n  name: statestore\nspec:\n  type: state.redis\n  metadata:\n    - name: redisHost\n# after\nspec:\n  type: state.redis\n  version: v1\n  metadata:\n    - name: redisHost\n      value: redis:6379","handlingStrategy":"validation","validationCode":"func validateComponentManifest(c compapi.Component) error {\n    if c.APIVersion != \"dapr.io/v1alpha1\" || c.Kind != \"Component\" { return fmt.Errorf(\"not a Component manifest\") }\n    if !strings.Contains(c.Spec.Type, \".\") { return fmt.Errorf(\"type must be <category>.<impl>\") }\n    if c.Spec.Version == \"\" { return fmt.Errorf(\"version is required\") }\n    return nil\n}","typeGuard":"func isComponentManifest(obj runtime.Object) bool {\n    _, ok := obj.(*compapi.Component)\n    return ok\n}","tryCatchPattern":"Let startup fail fast (the runner manager shuts daprd down); in the deploy pipeline, catch the exit, parse the nested 'process component X error' to identify the component, fix its metadata/credentials, and redeploy. Do not blanket-ignore - a missing state store breaks the app anyway.","preventionTips":["Lint all manifests in resources-path/ with schema validation before deploy","Ensure backing services and secrets exist before rolling the app","Reserve spec.ignoreErrors: true for components the app can run without"],"tags":["components","startup","manifest","init"],"backgroundTag":null,"analyzedSha":"74ad41702745709bb15fe2114ff693b8c59bc3cc","analyzedAt":"2026-08-16T04:22:26.543Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}