affaan-m/ECC · error · TimeoutError

Condition not met within

Error message

Condition not met within {timeout}s

What it means

Polling helper in the Windows desktop E2E pattern: wait_until repeatedly evaluates a condition function until the deadline, swallowing per-iteration exceptions; when time runs out without the condition holding, it raises this timeout error naming the waited seconds.

Solutions

  1. Increase the timeout within the allowed range or fix the underlying condition, then retry.
Defensive patterns

Strategy: retry

When it happens

Trigger: Triggered when SKILL.md rejects the current invocation: Condition not met within <value>s

Common situations: Occurs while running skills/windows-desktop-e2e/SKILL.md with invalid arguments, missing flags, or a failing external dependency; the guard at skills/windows-desktop-e2e/SKILL.md:175 aborts the command with this message.

Understand the failure class


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/cf0d53fcb47c8192. Report an issue: GitHub.

Appendix: source

Thrown at skills/windows-desktop-e2e/SKILL.md:175

        return spec

    def wait_window(self, title, timeout=ACTION_TIMEOUT):
        """Wait for a new top-level window (dialogs, child windows)."""
        dlg = Desktop(backend="uia").window(title=title)
        dlg.wait("visible", timeout=timeout)
        return dlg

    def wait_until(self, fn, timeout=ACTION_TIMEOUT, interval=0.3):
        """Poll an arbitrary condition — use when UIA events are unreliable."""
        deadline = time.time() + timeout
        while time.time() < deadline:
            try:
                if fn():
                    return True
            except Exception:
                pass
            time.sleep(interval)
        raise TimeoutError(f"Condition not met within {timeout}s")

    # --- Actions ---

    def click(self, spec):
        self.wait_visible(spec)
        spec.click_input()

    def type_text(self, spec, text):
        self.wait_visible(spec)
        ctrl = spec.wrapper_object()
        try:
            ctrl.set_edit_text(text)
        except Exception as e:
            # Qt 5.x fallback: UIA Value Pattern may be incomplete
            import sys, pywinauto.keyboard as kb
            print(f"[windows-desktop-e2e] set_edit_text failed ({e}), using keyboard fallback", file=sys.stderr)
            ctrl.click_input()
            kb.send_keys("^a")

View on GitHub (pinned to 06c5e118c4)