langgenius/dify · error · Error
Missing required deployment binding.
Error message
Missing required deployment binding.
What it means
Thrown as a plain Error after the environment is resolved but before constructing the deployment request, when the requiredBindingsReadyAtom Jotai atom evaluates to false. This is a state-invariant violation: submission proceeded despite required service bindings (e.g. runtime credentials/binding slots) not being fully configured. It is intentionally a generic Error, not a typed sentinel, because it indicates a logic gap rather than a user action.
Source
Thrown at web/features/deployments/create-guide/state/submission.ts:170
if (!get(canDeployAtom)) return undefined
set(isCreatingDeploymentAtom, true)
try {
const selectedEnvironmentIdentifier = selectedEnvironmentId.trim()
const freshSelectedEnvironment =
selectedEnvironment ||
(selectedEnvironmentIdentifier
? (await deployableEnvironmentsQuery.refetch()).data?.environments.find((environment) =>
environmentMatchesIdentifier(environment, selectedEnvironmentIdentifier),
)
: undefined)
const targetEnvironmentId = freshSelectedEnvironment?.id
if (!targetEnvironmentId)
throw new CreateDeploymentGuideSubmissionBlockedError('deployFailed')
if (!get(requiredBindingsReadyAtom)) throw new Error('Missing required deployment binding.')
if (!get(requiredEnvVarsReadyAtom))
throw new Error('Missing required deployment environment variable.')
const envVars = envVarSlots.flatMap((slot) => envVarInput(slot, envVarValues[slot.key]))
const commonDeploymentRequest = {
newAppInstance: {
displayName: submittedInstanceName,
description: get(instanceDescriptionAtom).trim() || undefined,
},
environmentId: targetEnvironmentId,
releaseName: submittedReleaseName,
releaseDescription: submittedReleaseDescription || undefined,
credentials: selectedDeploymentRuntimeCredentials(bindingSlots, bindingSelections),
envVars,
idempotencyKey: createDeploymentIdempotencyKey(),
expectedDslDigest: deploymentOptions?.dslDigest,
} satisfies Omit<DeployRequest, 'dsl' | 'sourceAppId'>
const deploymentRequest =View on GitHub (pinned to ef8544b173)
Solutions
- Audit canDeployAtom derivation to ensure it ANDs in requiredBindingsReadyAtom so submit is not invokable when bindings are incomplete.
- Inspect bindingSlots and bindingSelections in DevTools to find which slot is reporting incomplete.
- Add a UI-level error indicator per binding slot so the user sees what is missing before submit.
- If the atom is genuinely stale, ensure atoms feeding requiredBindingsReadyAtom are reset on slot changes.
Example fix
// before
if (!get(requiredBindingsReadyAtom)) throw new Error('Missing required deployment binding.')
// after - block at the gate so submit cannot fire
// in canDeployAtom derivation:
// export const canDeployAtom = atom((get) =>
// get(environmentSelectedAtom) && get(requiredBindingsReadyAtom) && get(requiredEnvVarsReadyAtom)) Defensive patterns
Strategy: validation
Validate before calling
// Pre-check bindings readiness before allowing submit
const bindingsReady = useAtomValue(requiredBindingsReadyAtom)
const canSubmit = environmentSelected && bindingsReady
// <button disabled={!canSubmit} /> Type guard
function areBindingsReady(slots: BindingSlot[], selections: Record<string, unknown>): boolean {
return slots.every((slot) => slot.optional || !!selections[slot.key])
} Try / catch
try {
await submit()
} catch (e) {
if (e instanceof Error && e.message === 'Missing required deployment binding.') {
setBindingError('Please configure all required bindings.')
return
}
throw e
} Prevention
- Derive canDeployAtom as the conjunction of all readiness atoms so submission is structurally blocked upstream.
- Show per-binding-slot validation tied to the same derivation the gate uses.
- Reset binding readiness atoms whenever bindingSlots change.
- Add a unit test asserting canDeployAtom is false whenever requiredBindingsReadyAtom is false.
When it happens
Trigger: Fires when bindingSlots contain entries whose bindingSelections are incomplete or invalid, causing requiredBindingsReadyAtom to be false at submit time. Concretely: a binding slot has no selected credential, or selectedDeploymentRuntimeCredentials returns an incomplete shape.
Common situations: The submit button is enabled by a canDeployAtom gate that is out of sync with requiredBindingsReadyAtom (stale derived state), a binding was cleared asynchronously after the gate check, or a newly added required binding slot was not yet satisfied.
Related errors
- Missing required deployment environment variable.
- deployFailed
- unsupportedDslMode
- Knowledge creation failed during create
- Knowledge creation failed during policy
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/0eefd8313786d39a.
Report an issue: GitHub.