Bug
The Rownd Hub script (hub.rownd.io/static/scripts/rph.mjs) throws an unhandled
"Missing app id" error during initialization when mainReducer dispatches a state
update before app_id has been loaded from the API.
Stack trace
Error: Missing app id
at getPassphrase (src/scripts/storage/crypto/utils.ts:9)
at deriveKey (src/scripts/storage/crypto/utils.ts:46)
at encrypt (src/scripts/storage/crypto/crypto.ts:9)
at setItem (src/scripts/storage/crypto/index.ts:18)
at updateStorage (src/scripts/Context.tsx:60)
at mainReducer (src/scripts/Context.tsx:742)
at <anonymous> (src/scripts/DefaultContext.tsx:126)
Reproduction
Navigate to any page with @rownd/react RowndProvider mounted. The error occurs
intermittently on initial page load — it's a race between the hub script dispatching
its first state update and the API response that provides app_id.
We see ~85 occurrences across ~77 users over the past 24 days (web only, via
@rownd/react-native@4.0.2 which delegates to @rownd/react@1.5.3 on web).
Impact
- Functional: None — in-memory state works fine; only encrypted storage
persistence fails for that cycle
- Observability: Unhandled promise rejection pollutes error tracking (PostHog,
Sentry, etc.)
Suggested fix
Guard updateStorage in mainReducer to no-op when app_id is not yet available,
rather than letting getPassphrase() throw. The state will be persisted on the next
dispatch after app_id is loaded.
Workaround
We're filtering this error in our PostHog before_send pipeline to suppress the noise.
Versions
@rownd/react: 1.5.3
@rownd/react-native: 4.0.2
- Browsers: Chrome, Safari (desktop + mobile)
Bug
The Rownd Hub script (
hub.rownd.io/static/scripts/rph.mjs) throws an unhandled"Missing app id" error during initialization when
mainReducerdispatches a stateupdate before
app_idhas been loaded from the API.Stack trace
Reproduction
Navigate to any page with
@rownd/reactRowndProvider mounted. The error occursintermittently on initial page load — it's a race between the hub script dispatching
its first state update and the API response that provides
app_id.We see ~85 occurrences across ~77 users over the past 24 days (web only, via
@rownd/react-native@4.0.2which delegates to@rownd/react@1.5.3on web).Impact
persistence fails for that cycle
Sentry, etc.)
Suggested fix
Guard
updateStorageinmainReducerto no-op whenapp_idis not yet available,rather than letting
getPassphrase()throw. The state will be persisted on the nextdispatch after
app_idis loaded.Workaround
We're filtering this error in our PostHog
before_sendpipeline to suppress the noise.Versions
@rownd/react: 1.5.3@rownd/react-native: 4.0.2