different-ai/openwork · error

The install link response was incomplete.

Error message

The install link response was incomplete.

What it means

In JoinOrgSuccess's handleGetApp, after createOrganizationInstallLink returns an install page URL, the code extracts the install token with installTokenFromPageUrl. If the URL does not contain a recognizable token, it throws "The install link response was incomplete." — the server returned a link but it lacks the token the install-config endpoint needs.

Source

Thrown at ee/apps/den-web/app/(den)/_components/join-org-success.tsx:154

    const link = document.createElement("a");
    link.href = href;
    link.rel = "noopener noreferrer";
    link.target = "_blank";
    link.setAttribute("data-testid", "join-org-download-link");
    document.body.append(link);
    link.click();
    link.remove();
  }

  async function handleGetApp() {
    setInstallBusy(true);
    setActionError(null);

    try {
      const installPageUrl = await createOrganizationInstallLink(organizationId, false);
      const token = installTokenFromPageUrl(installPageUrl);
      if (!token) {
        throw new Error("The install link response was incomplete.");
      }

      const { response, payload } = await requestJson(
        `/v1/install-config?token=${encodeURIComponent(token)}`,
        { method: "GET" },
        12000,
      );
      if (!response.ok) {
        throw new Error(getInstallConfigErrorMessage(payload, response.status));
      }

      const apiUrl = installerApiUrlFromConfig(payload);
      if (!apiUrl) {
        throw new Error("This install link returned incomplete setup details.");
      }

      const platform = detectedInstallPlatform(detected) ?? "mac-arm64";
      const href = buildInstallDownloadHref(apiUrl, platform, token);

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Log the returned installPageUrl and check whether it carries the expected token query parameter.
  2. Retry createOrganizationInstallLink; if the URL is persistently tokenless, verify the org allows install links (seats/billing) and the Den API version matches the web client.
  3. Fall back to the admin Members page to generate a working install link manually.

Example fix

// before
const url = await createOrganizationInstallLink(orgId, false); // "/install" (no token)
// after: server includes token
const url = await createOrganizationInstallLink(orgId, false); // "/install?token=..."
Defensive patterns

Strategy: type-guard

Validate before calling

const installPageUrl = await createOrganizationInstallLink(orgId, false);
try { new URL(installPageUrl); } catch { throw new Error("Install link is not a valid URL"); }
const token = installTokenFromPageUrl(installPageUrl);
if (!token) throw new Error("Install link has no token");

Type guard

function hasInstallToken(t) {
  return typeof t === "string" && t.trim().length > 0;
}

Try / catch

try {
  await handleGetApp(orgId);
} catch (err) {
  if (err.message === "The install link response was incomplete.") {
    // retry link creation once, then surface an admin-contact state
  } else throw err;
}

Prevention

When it happens

Trigger: createOrganizationInstallLink(organizationId, false) resolves to a URL from which installTokenFromPageUrl cannot parse a token (missing/empty token query param, unexpected URL shape).

Common situations: Den API returning a changed/legacy install page URL format; empty response on server error paths still shaped as a URL string; org in a state that cannot mint install links (e.g. billing/seats).

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/d59e60df811f4d66. Report an issue: GitHub.