stablyai/orca · error · Error
Orca Relay upgrade state requires a native secret store
Error message
Orca Relay upgrade state requires a native secret store
What it means
Thrown by `requireNativeSecretStore` in the direct-upgrade journal module when `Platform.OS === 'web'`. Same rationale as the credential-bundle variant (error 449): the direct-upgrade journal — which holds a pending resume token and reqId — must live in the native keychain, and web has no secure equivalent, so read/write/delete of the journal is refused on web.
Source
Thrown at mobile/src/transport/mobile-relay-direct-upgrade-journal.ts:85
export async function deleteMobileRelayDirectUpgradeJournal(hostId: string): Promise<void> {
if (Platform.OS === 'web') {
return
}
await deletePairingKeychainItem(journalKey(hostId))
}
function encodeBase64Url(value: Uint8Array): string {
let binary = ''
for (const byte of value) {
binary += String.fromCharCode(byte)
}
return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '')
}
function requireNativeSecretStore(): void {
if (Platform.OS === 'web') {
throw new Error('Orca Relay upgrade state requires a native secret store')
}
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Gate direct-upgrade journal access on `Platform.OS !== 'web'`.
- On web, never invoke `upgradeDirectMobileRelay` — skip direct upgrade entirely.
- In tests, set `Platform.OS` to a native value before exercising these functions.
Example fix
// before
import { readMobileRelayDirectUpgradeJournal } from './mobile-relay-direct-upgrade-journal'
const j = await readMobileRelayDirectUpgradeJournal(hostId) // throws on web
// after
const j = Platform.OS === 'web' ? null : await readMobileRelayDirectUpgradeJournal(hostId) Defensive patterns
Strategy: type-guard
Validate before calling
import { Platform } from 'react-native'
if (Platform.OS === 'web') { /* skip direct upgrade entirely */ return null } Type guard
function hasNativeSecretStore(): boolean { return Platform.OS !== 'web' } Prevention
- Never invoke upgradeDirectMobileRelay on web.
- Gate journal read/write on Platform.OS !== 'web'.
- Exclude the direct-upgrade module from web bundles.
When it happens
Trigger: Calling `readMobileRelayDirectUpgradeJournal` or `writeMobileRelayDirectUpgradeJournal` while `Platform.OS === 'web'`; web build pulling in the direct-upgrade module.
Common situations: Web target of the RN app; Storybook/Jest under web platform mock; shared import that reaches the upgrade journal from web code.
Related errors
- Orca Relay credentials require a native secret store
- Orca Relay pairing requires a native secret store
- relay endpoint unavailable for direct pairing upgrade
- relay endpoint reconciliation became unavailable
- direct pairing upgrade was not authoritatively committed
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/414a2b1feeaaf9fb.
Report an issue: GitHub.