jackwener/OpenCLI · error · CommandExecutionError
Visible Midjourney Settings control was not found
Error message
Visible Midjourney Settings control was not found
What it means
CommandExecutionError from toggleSettingsPanel. The helper scans the page for a visible Midjourney 'Settings' control and computes its coordinates; when no visible matching button is found it throws instead of clicking blindly.
Source
Thrown at clis/midjourney/utils.js:1303
));
if (labeled) {
const rect = labeled.getBoundingClientRect();
return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
}
const input = document.querySelector('#desktop_input_bar');
let root = input?.parentElement;
for (let depth = 0; depth < 4 && root; depth += 1, root = root.parentElement) {
const buttons = [...root.querySelectorAll('button')].filter(visible);
const nonImage = buttons.filter((button) => button.getAttribute('aria-label') !== 'Add Images');
if (buttons.some((button) => button.getAttribute('aria-label') === 'Add Images') && nonImage.length) {
const button = nonImage.at(-1);
const rect = button.getBoundingClientRect();
return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
}
}
return null;
}));
if (!target) throw new CommandExecutionError('Visible Midjourney Settings control was not found');
if (typeof page.nativeClick !== 'function') throw new CommandExecutionError('Browser Bridge native click support is required');
await page.nativeClick(target.x, target.y);
await page.wait(0.4);
}
export async function isSettingsPanelVisible(page) {
return Boolean(unwrapEvaluateResult(await page.evaluate(() => {
const visible = (element) => {
const rect = element.getBoundingClientRect();
return rect.width > 0 && rect.height > 0 && getComputedStyle(element).display !== 'none';
};
const label = document.querySelector('a[href*="GPU-Speed"]');
const fast = [...document.querySelectorAll('button')].find((node) => node.textContent?.trim() === 'Fast' && visible(node));
return Boolean((label && visible(label)) || fast);
})));
}
export async function ensureImageComposer(page) {View on GitHub (pinned to 49907e53dc)
Solutions
- Ensure no modal/panel is open and the main Midjourney UI is fully loaded before toggling
- Close any already-open settings panel first (check isSettingsPanelVisible)
- Wait longer for page render (page.wait) and retry
- Update the CLI to match current Midjourney markup
Example fix
// before
await toggleSettingsPanel(page);
// after
if (await isSettingsPanelVisible(page)) {
// panel already open; skip opening
} else {
await page.wait(1.0);
await toggleSettingsPanel(page);
} Defensive patterns
Strategy: try-catch
Validate before calling
const visible = await isSettingsPanelVisible(page);
if (!visible && !(await page.$('button, [role=button]'))) throw new Error('Page UI not loaded'); Try / catch
try {
await toggleSettingsPanel(page);
} catch (e) {
if (String(e.message).includes('Settings control')) {
await page.wait(2);
await toggleSettingsPanel(page);
} else throw e;
} Prevention
- Ensure no overlay/modal is open before toggling
- Wait for full page render before interacting
- Check isSettingsPanelVisible first to avoid redundant toggles
- Update CLI when Midjourney ships UI redesigns
When it happens
Trigger: Calling toggleSettingsPanel(page) when the Settings button is absent, hidden behind another panel/overlay, scrolled out with different visibility rules, or the UI text/structure no longer matches the lookup heuristic.
Common situations: A settings panel or modal is already open covering the button; page not fully loaded; Midjourney redesign renaming the control; running on a page variant (e.g. video tab) without the Settings control.
Related errors
- Midjourney composer submit control was not found
- Midjourney settings panel returned an unexpected shape
- Midjourney settings panel is missing required field(s): ${mi
- Could not set Midjourney ${anchorText}: ${target?.reason ||
- Waiting for 12306 tk auth cookie
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/18b4f9686d8c2ffe.
Report an issue: GitHub.