windmill-labs/windmill · warning

Failed to pull shared UI folder: ${e}

Error message

Failed to pull shared UI folder: ${e}

What it means

A warning from `wmill sync pull` when pulling the shared UI folder (workspace-level ui/ assets) throws. The main sync changeset has already been applied; only the shared UI sub-step failed, so it is logged and the pull continues.

Source

Thrown at cli/src/commands/sync/sync.ts:4212

        e instanceof MalformedLockfileError
      ) {
        throw e;
      }
      log.warn(
        colors.yellow(
          `Could not auto-fill missing lockfile entries: ${e instanceof Error ? e.message : e}`,
        ),
      );
    }
  }

  // Skipped under --dry-run since pullSharedUi writes to the local ui/ folder.
  // An empty changeset falls through the return above and reaches here.
  if (!opts.dryRun) {
    try {
      await pullSharedUi(workspace.workspaceId, opts.keepDeleted);
    } catch (e) {
      log.warn(`Failed to pull shared UI folder: ${e}`);
    }
  }

  // Datatable migrations are part of the workspace export now, so they flow
  // through the normal diff/apply above as `datatable_migration` items.

  // Git-sync deployment-callback mode stops here: branch checkout + pull have
  // happened, but commit + push are the caller's job. The hub script does
  // them in-process with `set_gpg_signing_secret` so the agent's pre-warmed
  // passphrase cache is still warm at sign time (WIN-1974). `gitSyncDeployPush`
  // stays exported for callers that want the same commit/push behavior.
}

/**
 * Fold the lockfile that the scripts of a language share back into the one
 * shared file (`dedupeLockfiles`), and give the scripts that ended up with a
 * lock of their own theirs back.
 *

View on GitHub (pinned to e474e8803c)

Solutions

  1. Check and fix write permissions on the local ui/ directory.
  2. Ensure the CLI token has the scopes needed to read workspace UI files; regenerate the token if necessary.
  3. Retry the pull — if the server had a transient error, a rerun usually succeeds.
  4. If the workspace has no shared UI, treat the warning as expected or upgrade/verify the instance setup.

Example fix

// before
$ wmill sync pull
⚠️  Failed to pull shared UI folder: Error: permission denied, open 'ui/index.html'
// after
$ chmod -R u+w ui/
$ wmill sync pull   # shared UI folder pulled
Defensive patterns

Strategy: try-catch

Validate before calling

import { accessSync, constants } from "fs";
try { accessSync("ui", constants.W_OK); } catch {
  console.error("ui/ not writable; fix permissions before wmill sync pull");
}

Try / catch

try {
  await wmill.sync.pull(...);
} catch (e) {
  if (String(e).includes("Failed to pull shared UI folder")) {
    console.error("Main sync OK; fix ui/ permissions or token scopes and re-run:", e);
  } else throw e;
}

Prevention

When it happens

Trigger: Running `wmill sync pull` without --dry-run; pullSharedUi(workspaceId, keepDeleted) makes an API call or local write to ui/ that fails — API error, permission denied writing the local ui/ folder, or the workspace has no shared UI access with the current token.

Common situations: Read-only local checkout or filesystem permissions blocking writes to ui/; token lacking app/workspace-file read scope; server error on the shared UI endpoint; running on a workspace where shared UI is disabled.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/8e07305c712b733d. Report an issue: GitHub.