jackwener/OpenCLI · error · Error

composer fill was not verified

Error message

composer fill was not verified

What it means

After typing the prompt into the composer, the CLI verifies the fill actually landed: page.fillText returns {filled, verified}; if either is falsy the code throws 'composer fill was not verified', which is immediately wrapped into the 'Could not submit the Midjourney prompt' CommandExecutionError (index 2618). This guard prevents submitting an empty or partially-typed prompt and silently charging GPU minutes for the wrong job.

Source

Thrown at clis/midjourney/generate.js:193

      await uploadReferencesToSlot(page, localImageRefs, 'image');
      await uploadReferencesToSlot(page, localStyleRefs, 'style');
      await uploadReferencesToSlot(page, localOmniRefs, 'omni');
    }
    await closeImagePanel(page);

    let captureReady = false;
    if (typeof page.installInterceptor === 'function' && typeof page.getInterceptedRequests === 'function') {
      try {
        await page.installInterceptor('/api/submit-jobs');
        await page.getInterceptedRequests();
        captureReady = true;
      } catch {}
    }

    const submittedAt = Date.now();
    try {
      const filled = await page.fillText(COMPOSER_SELECTOR, effectivePrompt);
      if (!filled?.filled || !filled?.verified) throw new Error('composer fill was not verified');
      await page.pressKey('Enter');
    } catch (error) {
      throw new CommandExecutionError(`Could not submit the Midjourney prompt: ${error instanceof Error ? error.message : String(error)}`);
    }

    const remainingForSubmission = Math.floor(timeout - (Date.now() - commandStartedAt) / 1000);
    if (remainingForSubmission < 1) throw new TimeoutError('Midjourney job submission', timeout);
    const submitTimeout = Math.min(remainingForSubmission, 75);
    let jobIds = [];
    if (captureReady && typeof page.waitForCapture === 'function') {
      try {
        await page.waitForCapture(Math.min(submitTimeout, 20));
        jobIds = submittedJobIdsFromCaptures(await page.getInterceptedRequests(), plan.repeat, baselineIds);
      } catch (error) {
        if (error instanceof CommandExecutionError) throw error;
      }
    }
    if (!jobIds.length) {

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Re-run the command; transient re-render races usually succeed on retry
  2. Dismiss any modals/overlays on the Imagine page and ensure the composer is idle before submitting
  3. Avoid editing the composer manually while the command runs in the background browser
  4. If it reproduces every time, check for a Midjourney UI change and update opencli
Defensive patterns

Strategy: retry

Validate before calling

// Cannot be pre-validated externally — it is a post-fill verification.
// Mitigation: ensure the composer is idle before submission:
await page.wait({ selector: COMPOSER_SELECTOR, timeout: 12 });
await clearImagePrompts(page);   // dispose of leftover staged content that may re-render

Type guard

function isVerifiedFill(result) {
  return Boolean(result && result.filled === true && result.verified === true);
}

Try / catch

try {
  await generate(prompt, opts);
} catch (e) {
  if (/composer fill was not verified|Could not submit the Midjourney prompt/.test(e.message)) {
    await sleep(2000);
    await generate(prompt, opts);  // transient re-render races usually clear
  } else throw e;
}

Prevention

When it happens

Trigger: page.fillText(COMPOSER_SELECTOR, effectivePrompt) returns null/undefined (element detached mid-fill), an object with filled:false (could not set the value), or verified:false (the DOM value did not match after write) — caused by the composer unmounting, a modal/overlay stealing focus, a React re-render wiping the textarea, or the selector matching a stale node.

Common situations: Midjourney page re-rendered (settings panel toggle, image uploads finishing) while filling; slow/rate-limited page where the composer was replaced; an announcement modal or onboarding overlay intercepting the textarea; very long prompts with parameters being truncated by client-side normalization.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/1d9d75d30c845335. Report an issue: GitHub.