tinyhumansai/openhuman · error

[transport:manager] cloud profile missing rpcUrl

Error message

[transport:manager] cloud profile missing rpcUrl

What it means

TransportManager.getTransport() switches on profile.kind; for kind === 'cloud' it destructures rpcUrl and sessionToken from the ConnectionProfile and refuses to build a CloudHttpTransport when rpcUrl is empty. ConnectionProfile is defined in app/src/services/transport/profileStore.ts with kind: 'local' | 'lan' | 'tunnel' | 'cloud' — this error means a cloud-typed profile was persisted or handed in without its endpoint.

Solutions

  1. Re-select the cloud connection in Settings → Core connection so a complete profile is persisted
  2. Clear/reset the persisted coreMode slice (or use the reset action) and re-onboard
  3. If you construct profiles in code, assert rpcUrl is a non-empty absolute URL before calling createTransportManager
  4. Add a persist-migration bump in the coreMode slice for the renamed field

Example fix

// before
const profile: ConnectionProfile = { kind: 'cloud' } as ConnectionProfile;
// after
const profile: ConnectionProfile = { kind: 'cloud', rpcUrl: 'https://api.example.com/rpc', sessionToken: tok };
Defensive patterns

Strategy: validation

Validate before calling

function assertCloudProfileReady(p: ConnectionProfile): void {
  if (p.kind === 'cloud' && !p.rpcUrl) {
    throw new Error('cloud profile incomplete — set rpcUrl before connecting');
  }
}

Type guard

function isCompleteCloudProfile(p: ConnectionProfile): boolean {
  return p.kind !== 'cloud' || (typeof p.rpcUrl === 'string' && p.rpcUrl.length > 0);
}

Prevention

When it happens

Trigger: A Redux coreMode-slice profile (persisted via userScopedStorage) saved by an older build whose cloud shape differed; manually constructing { kind: 'cloud' } without rpcUrl; a settings migration that renamed the field (e.g. url → rpcUrl).

Common situations: App upgrade where the persisted coreMode payload was written before the cloud profile schema changed; corrupted persisted state after crash mid-save; test fixtures missing rpcUrl.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/cd7422c003449e06. Report an issue: GitHub.

Appendix: source

Thrown at app/src/services/transport/TransportManager.ts:80

    }
  }

  // -- selection logic -------------------------------------------------------

  private async selectTransport(): Promise<CoreTransport> {
    const { kind } = this.profile;
    log('[transport:manager] selecting kind=%s id=%s', kind, this.profile.id);

    if (kind === 'local') {
      const t = new LocalTransport(this.localRpcUrl, this.localToken);
      log('[transport:manager] → LocalTransport');
      return t;
    }

    if (kind === 'cloud') {
      const { rpcUrl, sessionToken } = this.profile;
      if (!rpcUrl) {
        throw new Error('[transport:manager] cloud profile missing rpcUrl');
      }
      const t = new CloudHttpTransport(rpcUrl, sessionToken ?? null);
      log('[transport:manager] → CloudHttpTransport rpcUrl=%s', rpcUrl);
      return t;
    }

    if (kind === 'lan') {
      const { rpcUrl } = this.profile;
      if (!rpcUrl) {
        throw new Error('[transport:manager] lan profile missing rpcUrl');
      }
      const t = new LanHttpTransport(rpcUrl);
      log('[transport:manager] → LanHttpTransport rpcUrl=%s', rpcUrl);
      return t;
    }

    if (kind === 'tunnel') {
      return this.raceLanAndTunnel();

View on GitHub (pinned to 7491200858)