different-ai/openwork · error
Cloud provider sync returned no result.
Error message
Cloud provider sync returned no result.
What it means
In createProviderAuthStore's cloud provider sync flow, the code awaits a wrapper (withSessionRoute / similar) that resolves to the result of openworkClient.runCloudProviderSyncNow(reason). If the session route wrapper or the client call resolves to a falsy value (null/undefined), the store throws 'Cloud provider sync returned no result.' This is a defensive check against a server/client path that silently returned nothing instead of a sync result object.
Source
Thrown at apps/app/src/react-app/domains/connections/provider-auth/store.ts:2111
return { outcome: "handled_server_side" };
}
if (serverHandlesProviderSync()) {
try {
const result = await enqueueGlobalCloudProviderSync(
`server:${getCloudProviderSyncContextKey()}`,
async () => {
const openworkClient = options.openworkServer.getSnapshot().openworkServerClient;
if (!openworkClient) throw new Error("OpenWork server unavailable.");
let result = await openworkClient.runCloudProviderSyncNow(reason);
if (result.status === "no_session") {
await pushDenSession(true);
result = await openworkClient.runCloudProviderSyncNow(reason);
}
return result;
},
);
if (!result) throw new Error("Cloud provider sync returned no result.");
// Re-derive the imported records (and reloadPending/skips) from the
// server's status after EVERY server-handled pass. Without this the
// Cloud Providers rows kept whatever the one-shot start() read found
// (usually nothing) and sat on "Syncing" forever even though the
// server had long since applied the sync (#3671, UI layer).
await refreshImportedCloudProviders();
if (result.status === "failed" || result.status === "no_session") {
const message = logCloudProviderSyncError(
reason,
new Error(result.message ?? "Cloud provider sync failed."),
);
publishSettingsCloudProviderSyncError(reason, message);
return;
}
// The server may already be synchronized while this route still holds
// a removed managed-model default. Always reread the live catalog and
// reconcile that preference so Settings diagnostics recover in place,
// including after a noop server sync.View on GitHub (pinned to 2b7df46e8a)
Solutions
- Verify the OpenWork Cloud session is signed in and pushDenSession succeeded before triggering the sync
- Inspect the openworkClient.runCloudProviderSyncNow server response; fix the server/client so a completed sync always returns a result object
- Retry the sync after re-establishing the session; check network/Den connectivity
- Check logs for a session-route teardown that disposed the wrapper before the promise resolved
Example fix
// before
const result = await syncFn();
if (!result) throw new Error("Cloud provider sync returned no result.");
// after
const result = await syncFn();
if (!result) {
await pushDenSession(true); // re-establish session
const retried = await syncFn();
if (!retried) throw new Error("Cloud provider sync returned no result.");
} Defensive patterns
Strategy: try-catch
Validate before calling
const sessionReady = await isDenSessionActive(); // verify sign-in before syncing if (!sessionReady) await pushDenSession(true);
Type guard
function isSyncResult(r: unknown): r is CloudSyncResult {
return typeof r === "object" && r !== null && "status" in r;
} Try / catch
try {
await providerAuthStore.syncCloudProviders(reason);
} catch (err) {
if (err.message === "Cloud provider sync returned no result.") {
await pushDenSession(true);
await providerAuthStore.syncCloudProviders(reason); // one retry after re-auth
} else throw err;
} Prevention
- Always establish/renew the Den session before invoking cloud sync
- Treat null sync results as retryable session failures, not hard errors
- Log the raw runCloudProviderSyncNow response to distinguish empty results from transport errors
- Avoid disposing session routes while a sync is in flight
When it happens
Trigger: Calling the store's cloud provider sync action when runCloudProviderSyncNow returns null/undefined, or when the surrounding withSessionRoute wrapper short-circuits and returns undefined (e.g. session push failed or the route was disposed before the sync ran).
Common situations: OpenWork Cloud session not established or expired so the sync RPC never actually executes; server returns an empty body that the client deserializes to null; a race where the workspace/session route closed mid-sync; calling sync from a context (web/CI) without a Den connection.
Related errors
- failures.join("\n")
- invalid_session_payload
- Unknown error
- Unknown error
- Invalid cloud provider sync response.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/3cf721700d8eefbc.
Report an issue: GitHub.