openclaw/openclaw · warning
No dialog is pending.
Error message
No dialog is pending.
What it means
Thrown by resolvePendingDialogForResponse (extensions/browser/src/browser/pw-session-dialogs.ts:166) when state.pendingDialogs is empty. The caller attempted to respond to a dialog that does not exist on the page.
Source
Thrown at extensions/browser/src/browser/pw-session-dialogs.ts:166
export function resolvePendingDialogForResponse(params: {
state: PageState;
dialogId?: string;
}): PendingObservedDialog {
const dialogId = normalizeOptionalString(params.dialogId);
if (dialogId) {
const found = params.state.pendingDialogs.find((dialog) => dialog.id === dialogId);
if (found) {
return found;
}
throw new Error(`Dialog "${dialogId}" is not pending.`);
}
if (params.state.pendingDialogs.length === 1) {
return expectDefined(params.state.pendingDialogs.at(0), "single pending browser dialog");
}
if (params.state.pendingDialogs.length > 1) {
throw new Error("Multiple dialogs are pending; pass dialogId.");
}
throw new Error("No dialog is pending.");
}
/** Respond to a pending observed dialog on a page. */
View on GitHub (pinned to 01804a7531)
Solutions
- Trigger the action that produces the dialog (click the button that opens it) before responding.
- Re-snapshot state and only respond when pendingDialogs.length > 0.
- Verify you are operating on the same targetId where the dialog is actually pending.
Example fix
// before: respond with no dialog present
await respondDialog({ accept: true });
// after: guard on live state
const { pendingDialogs } = await snapshot(state);
if (pendingDialogs.length === 0) {
// trigger the dialog-producing action first, then respond
await act({ kind: "click", ref: openDialogRef });
}
await respondDialog({ accept: true }); Defensive patterns
Strategy: validation
Validate before calling
const { pendingDialogs } = await snapshotPageState(page);
if (pendingDialogs.length === 0) {
// nothing to do; either the dialog already completed or never fired
return { ok: true, noDialog: true };
}
await respondDialog({ accept }); Type guard
function hasPendingDialog(state): boolean {
return state.pendingDialogs.length > 0;
} Try / catch
try {
await respondDialog({ accept: true });
} catch (err) {
if (err.message === "No dialog is pending.") return;
throw err;
} Prevention
- Trigger the dialog-producing action before issuing a respond.
- Verify you are operating on the targetId where the dialog is actually pending.
- Treat 'no dialog pending' as a benign no-op in idempotent flows.
When it happens
Trigger: Calling respond when no JS dialog is open; the dialog already completed before the respond arrived; responding to a dialog that was observed on a different page/target than the one being acted on.
Common situations: Operator/agent assumed a dialog would be triggered but the triggering action did not produce one; the dialog was auto-dismissed by an armed response; cross-target confusion (dialog is pending on tab A, respond targeted tab B).
Related errors
- Dialog "${dialogId}" is not pending.
- Multiple dialogs are pending; pass dialogId.
- url is required
- Invalid URL: ${diagnostic}
- output path is required
AI-assisted analysis of openclaw/openclaw@01804a7531 (2026-08-12).
Data as JSON: /api/errors/972578cfa3530385.
Report an issue: GitHub.