{"record":{"id":"557e8873a307b376","repo":"different-ai/openwork","slug":"openwork-server-unavailable-connect-to-manage-imp-557e88","errorCode":null,"errorMessage":"OpenWork server unavailable. Connect to manage imported cloud plugins.","messagePattern":"OpenWork server unavailable\\. Connect to manage imported cloud plugins\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/app/src/react-app/domains/settings/state/extensions-store.ts","lineNumber":658,"sourceCode":"    const persisted = await writeWorkspaceOpenworkConfigRecord(nextConfig);\n    if (!persisted) {\n      throw new Error(\"OpenWork server unavailable. Connect to manage imported cloud marketplaces.\");\n    }\n    setStateField(\"importedCloudMarketplaces\", nextMarketplaces);\n    void refreshPendingCloudPluginChanges();\n  };\n\n  const persistImportedCloudPlugins = async (nextPlugins: Record<string, CloudImportedPlugin>) => {\n    const config = await readWorkspaceOpenworkConfigRecord();\n    const cloudImports = readWorkspaceCloudImports(config);\n    const nextCloudImports = {\n      ...cloudImports,\n      plugins: nextPlugins,\n    };\n    const nextConfig = withWorkspaceCloudImports(config, nextCloudImports);\n    const persisted = await writeWorkspaceOpenworkConfigRecord(nextConfig);\n    if (!persisted) {\n      throw new Error(\"OpenWork server unavailable. Connect to manage imported cloud plugins.\");\n    }\n    setStateField(\"importedCloudPlugins\", nextPlugins);\n    void refreshPendingCloudPluginChanges(nextPlugins);\n  };\n\n  const findCloudMarketplace = (marketplaceId: string) =>\n    snapshot.cloudOrgMarketplaces.find((entry) => entry.marketplace.id === marketplaceId)?.marketplace ?? null;\n\n  const buildCloudSkillContent = (name: string, description: string, body: string) => {\n    const safeDescription = description.replace(/\\s+/g, \" \").trim();\n    const normalizedBody = body.replace(/^\\s*\\n?/, \"\");\n    return [\n      \"---\",\n      `name: ${JSON.stringify(name)}`,\n      `description: ${JSON.stringify(safeDescription)}`,\n      \"---\",\n      \"\",\n      normalizedBody,","sourceCodeStart":640,"sourceCodeEnd":676,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/apps/app/src/react-app/domains/settings/state/extensions-store.ts#L640-L676","documentation":"Same persistence guard as error 106 but for imported cloud plugins: persistImportedCloudPlugins writes the merged workspace config and throws when writeWorkspaceOpenworkConfigRecord returns false, i.e. neither the desktop local-write path nor the OpenWork server path is available. In-memory plugin state is intentionally not updated so it doesn't mask the lost write.","triggerScenarios":"Importing or updating cloud plugins while no persistence target exists: server unreachable/not connected and (non-desktop runtime, or desktop with no local workspace root).","commonSituations":"Signed-out session; Den/openwork-server down; plugin import attempted from a remote workspace without server connection; desktop app running without a detected workspace root.","solutions":["Connect to the OpenWork server and retry the plugin import.","Check the server endpoint is reachable (network, VPN, correct URL).","On desktop, confirm a local workspace is open so the .opencode file write path can be used.","Re-authenticate if the session token expired."],"exampleFix":"// before\nconst persisted = await writeWorkspaceOpenworkConfigRecord(nextConfig);\nif (!persisted) {\n  throw new Error(\"OpenWork server unavailable. Connect to manage imported cloud plugins.\");\n}\n// after\nconst persisted = await writeWorkspaceOpenworkConfigRecord(nextConfig);\nif (!persisted) {\n  const connected = await ensureServerConnected();\n  if (!connected) throw new Error(\"OpenWork server unavailable. Connect to manage imported cloud plugins.\");\n  return persistImportedCloudPlugins(nextPlugins); // retry after connect\n}","handlingStrategy":"validation","validationCode":"if (!canUseOpenworkServer && !(isDesktopRuntime() && workspaceRoot)) {\n  // cannot persist cloud plugins; prompt for server connection first\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await importCloudPlugin(plugin);\n} catch (err) {\n  if (err.message.includes(\"server unavailable\")) openServerConnectDialog();\n  else throw err;\n}","preventionTips":["Gate cloud plugin imports on a verified server connection","Show connection status inline in the extensions settings panel","Retry persistence automatically once connectivity is restored"],"tags":["server-connection","cloud-plugins","persistence","network"],"backgroundTag":"server-unavailable","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}