musistudio/claude-code-router · error

Render size is out of range.

Error message

Render size is out of range.

What it means

Error "Render size is out of range." thrown in musistudio/claude-code-router.

Source

Thrown at packages/electron/src/main/ipc.ts:627

  const y = finiteNumber(rect?.y, "capture y");
  const width = finiteNumber(rect?.width, "capture width");
  const height = finiteNumber(rect?.height, "capture height");
  if (width <= 0 || height <= 0) {
    throw new Error("Capture area must not be empty.");
  }
  return {
    height: Math.ceil(height),
    width: Math.ceil(width),
    x: Math.max(0, Math.floor(x)),
    y: Math.max(0, Math.floor(y))
  };
}

function sanitizeRenderSize(size: AppRenderHtmlPngRequest["size"]): { height: number; width: number } {
  const width = finiteNumber(size?.width, "render width");
  const height = finiteNumber(size?.height, "render height");
  if (width <= 0 || height <= 0 || width > 4096 || height > 4096) {
    throw new Error("Render size is out of range.");
  }
  return {
    height: Math.ceil(height),
    width: Math.ceil(width)
  };
}

async function waitForExportWindowPaint(window: BrowserWindow): Promise<void> {
  await window.webContents.executeJavaScript(`
    new Promise((resolve) => {
      const fontsReady = document.fonts && document.fonts.ready ? document.fonts.ready.catch(() => undefined) : Promise.resolve();
      fontsReady.then(() => {
        requestAnimationFrame(() => requestAnimationFrame(() => resolve(true)));
      });
    });
  `);
}

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/electron/src/main/ipc.ts:627 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/0b3bdeca523910ea. Report an issue: GitHub.