stablyai/orca · error

The active Orca profile is not linked to a cloud account.

Error message

The active Orca profile is not linked to a cloud account.

What it means

Thrown by storedSessionAuthContext() when building an artifact cloud auth context for an Orca profile that has no `profile.cloud` object. Every artifact cloud operation (share/update/delete) routes through this helper, so it fires before any network call whenever the active profile is local-only. The check is a hard precondition: a cloud userId, cloudProfileId, and apiOrigin are all required to mint the session token.

Source

Thrown at src/main/artifacts/artifact-cloud-service.ts:102

        current.profile.id !== active.profile.id ||
        !cloudCurrent ||
        !isArtifactShareLifecycleCurrent(active.profile.id, userDataPath, lifecycleGeneration)
      ) {
        throw new Error(
          'The signed-in Orca account changed while the artifact request was running.'
        )
      }
    }
  }
}

function storedSessionAuthContext(
  active: ActiveOrcaProfileState,
  apiOrigin: string,
  userDataPath: string
): ArtifactAuthContext {
  if (!active.profile.cloud) {
    throw new Error('The active Orca profile is not linked to a cloud account.')
  }
  return authContext(
    active,
    {
      cloudUserId: active.profile.cloud.userId,
      cloudProfileId: active.profile.cloud.cloudProfileId,
      cloudOrganizationId: active.profile.cloud.activeOrgId ?? '',
      apiOrigin
    },
    userDataPath,
    {
      userId: active.profile.cloud.userId,
      profileId: active.profile.cloud.cloudProfileId,
      organizationId: active.profile.cloud.activeOrgId ?? ''
    }
  )
}

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Link the active Orca profile to a cloud account (sign in / re-link) so active.profile.cloud is populated, then retry the artifact operation.
  2. Verify the active profile is the one you expect: ensureActiveOrcaProfile may be returning a local fallback — check the profile selector / userDataPath.
  3. If this fires during automated tests, seed a cloud-linked profile (or inject a stubbed ActiveOrcaProfileState with a `.cloud` block) before invoking the service.

Example fix

// before
const auth = storedSessionAuthContext(active, apiOrigin, userDataPath) // active.profile.cloud === undefined -> throws

// after
if (!active.profile.cloud) {
  await promptUserToLinkCloudAccount()
  return
}
const auth = storedSessionAuthContext(active, apiOrigin, userDataPath)
Defensive patterns

Strategy: validation

Validate before calling

function hasCloudLink(active: ActiveOrcaProfileState): boolean {
  return Boolean(active.profile.cloud && active.profile.cloud.userId && active.profile.cloud.cloudProfileId)
}

// before any artifact cloud op:
if (!hasCloudLink(active)) {
  throw new UserError('Link this profile to Orca Cloud first.')
}

Type guard

import type { ActiveOrcaProfileState } from '...'

function isCloudLinkedProfile(active: ActiveOrcaProfileState): active is ActiveOrcaProfileState & {
  profile: { cloud: { userId: string; cloudProfileId: string; activeOrgId?: string | null } }
} {
  return Boolean(active.profile.cloud && active.profile.cloud.userId && active.profile.cloud.cloudProfileId)
}

Try / catch

null

Prevention

When it happens

Trigger: Calling ArtifactCloudService share/update/delete (or any path through withAuth -> storedSessionAuthContext) while the active Orca profile was created without linking to Orca Cloud. Also triggered if a profile's cloud link was removed but artifact operations were queued against it.

Common situations: A user signed in with a purely local profile and tries to share a file to the cloud; a profile-migration or sync glitch dropped the `.cloud` field; automation tests run against a default local profile without seeding a cloud link.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/a5da4689976e6761. Report an issue: GitHub.