tinyhumansai/openhuman · error · Error

[transport:manager] cloud profile missing rpcUrl

Error message

[transport:manager] cloud profile missing rpcUrl

What it means

TransportManager.buildTransport requires profile.rpcUrl for kind 'cloud'; the selected ConnectionProfile has kind 'cloud' but an empty/undefined rpcUrl, so a CloudHttpTransport cannot even be constructed. It is a profile-data error, not a network error — nothing was dialed yet.

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 a221052e0d)

Solutions

  1. Populate rpcUrl (the cloud backend RPC endpoint) on the profile before creating the manager
  2. If the profile comes from persisted state, re-run the connection save/pairing flow so the current schema fills it
  3. Add a load-time completeness assertion naming the profile id so the failure is actionable
  4. Delete the broken profile entry and recreate it via the UI flow

Example fix

// before
const tm = createTransportManager(profile, opts);

// after
if (profile.kind === 'cloud' && !profile.rpcUrl) {
  throw new Error(`profile ${profile.id}: cloud rpcUrl missing — re-pair this connection`);
}
const tm = createTransportManager(profile, opts);
Defensive patterns

Strategy: validation

Validate before calling

function assertProfileComplete(p: ConnectionProfile): void {
  if ((p.kind === 'cloud' || p.kind === 'lan') && !p.rpcUrl) {
    throw new Error(`profile ${p.id} (${p.kind}) is missing rpcUrl — re-pair the connection`);
  }
}

Prevention

When it happens

Trigger: manager.getTransport() with a profile like { kind: 'cloud', rpcUrl: undefined, sessionToken } — a persisted profile saved before the field existed, one built from empty backend-URL config, or a hand-built test profile.

Common situations: Old persisted profile schema missing the cloud URL; migration that dropped the field; tests constructing profiles inline; backend URL env var unset when the profile was created.

Related errors


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