{"record":{"id":"8e07305c712b733d","repo":"windmill-labs/windmill","slug":"failed-to-pull-shared-ui-folder-e","errorCode":null,"errorMessage":"Failed to pull shared UI folder: ${e}","messagePattern":"Failed to pull shared UI folder: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/sync/sync.ts","lineNumber":4212,"sourceCode":"        e instanceof MalformedLockfileError\n      ) {\n        throw e;\n      }\n      log.warn(\n        colors.yellow(\n          `Could not auto-fill missing lockfile entries: ${e instanceof Error ? e.message : e}`,\n        ),\n      );\n    }\n  }\n\n  // Skipped under --dry-run since pullSharedUi writes to the local ui/ folder.\n  // An empty changeset falls through the return above and reaches here.\n  if (!opts.dryRun) {\n    try {\n      await pullSharedUi(workspace.workspaceId, opts.keepDeleted);\n    } catch (e) {\n      log.warn(`Failed to pull shared UI folder: ${e}`);\n    }\n  }\n\n  // Datatable migrations are part of the workspace export now, so they flow\n  // through the normal diff/apply above as `datatable_migration` items.\n\n  // Git-sync deployment-callback mode stops here: branch checkout + pull have\n  // happened, but commit + push are the caller's job. The hub script does\n  // them in-process with `set_gpg_signing_secret` so the agent's pre-warmed\n  // passphrase cache is still warm at sign time (WIN-1974). `gitSyncDeployPush`\n  // stays exported for callers that want the same commit/push behavior.\n}\n\n/**\n * Fold the lockfile that the scripts of a language share back into the one\n * shared file (`dedupeLockfiles`), and give the scripts that ended up with a\n * lock of their own theirs back.\n *","sourceCodeStart":4194,"sourceCodeEnd":4230,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/sync/sync.ts#L4194-L4230","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check and fix write permissions on the local ui/ directory.","Ensure the CLI token has the scopes needed to read workspace UI files; regenerate the token if necessary.","Retry the pull — if the server had a transient error, a rerun usually succeeds.","If the workspace has no shared UI, treat the warning as expected or upgrade/verify the instance setup."],"exampleFix":"// before\n$ wmill sync pull\n⚠️  Failed to pull shared UI folder: Error: permission denied, open 'ui/index.html'\n// after\n$ chmod -R u+w ui/\n$ wmill sync pull   # shared UI folder pulled","handlingStrategy":"try-catch","validationCode":"import { accessSync, constants } from \"fs\";\ntry { accessSync(\"ui\", constants.W_OK); } catch {\n  console.error(\"ui/ not writable; fix permissions before wmill sync pull\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await wmill.sync.pull(...);\n} catch (e) {\n  if (String(e).includes(\"Failed to pull shared UI folder\")) {\n    console.error(\"Main sync OK; fix ui/ permissions or token scopes and re-run:\", e);\n  } else throw e;\n}","preventionTips":["Grant the sync token the scopes needed to read workspace UI files.","Keep the local ui/ directory writable by the CI user.","Verify shared-UI support is enabled on the instance.","Re-run pulls after transient server errors to complete the UI folder."],"tags":["cli","ui","sync","pull","permissions"],"backgroundTag":"shared-ui-pull-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}