tinyhumansai/openhuman · warning

provider_surfaces_list_queue: unexpected empty response

Error message

provider_surfaces_list_queue: unexpected empty response

What it means

Thrown by parseQueueEnvelope() in providerSurfacesApi when the raw value returned by callCoreRpc('openhuman.provider_surfaces_list_queue') is null/undefined or not an object. At this point the RPC already resolved — the core answered with nothing (a void/None result) instead of a queue envelope. The strict non-object check distinguishes 'core returned empty' from the softer case of a well-formed envelope with a malformed payload, which returns EMPTY_QUEUE instead.

Solutions

  1. Restart/update the core so provider_surfaces_list_queue returns its result envelope.
  2. Confirm the provider-surfaces domain is enabled in the running core (check GET /schema for the method and its return type).
  3. Inspect the core log for the handler's execution — an early-return path will show why nothing was produced.
  4. If running an external core for debugging, build it from the same commit as the UI.

Example fix

// before
if (!raw || typeof raw !== 'object') {
  throw new Error('provider_surfaces_list_queue: unexpected empty response');
}

// after — degrade to empty queue for read-only list UIs instead of throwing
if (!raw || typeof raw !== 'object') {
  console.warn('provider_surfaces_list_queue: empty response, assuming no queue');
  return EMPTY_QUEUE;
}
Defensive patterns

Strategy: fallback

Type guard

function isQueueResponseShape(raw: unknown): boolean {
  return Boolean(raw) && typeof raw === 'object';
}

Try / catch

let queue: RespondQueueList;
try {
  queue = await providerSurfacesApi.listQueue();
} catch (e) {
  if (e instanceof Error && e.message === 'provider_surfaces_list_queue: unexpected empty response') {
    queue = { items: [], count: 0 }; // read-only surface: degrade to empty
  } else throw e;
}

Prevention

When it happens

Trigger: Core's provider_surfaces controller returns Ok(()) on some path (queue disabled, feature not compiled via DomainSet); version skew where the method exists but returns a bare list the transport wraps as undefined; JSON-RPC success with no result field reaching the client.

Common situations: Desktop surfaces/queue feature turned off in the running core's domain set; an older standalone core (OPENHUMAN_CORE_REUSE_EXISTING=1); a core bug where the handler returns before populating the envelope.

Related errors


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

Appendix: source

Thrown at app/src/services/api/providerSurfacesApi.ts:13

import type { RespondQueueList } from '../../types/providerSurfaces';
import { callCoreRpc } from '../coreRpcClient';

interface ProviderSurfacesQueueEnvelope {
  data?: RespondQueueList;
  result?: { data?: RespondQueueList };
}

const EMPTY_QUEUE: RespondQueueList = { items: [], count: 0 };

function parseQueueEnvelope(raw: unknown): RespondQueueList {
  if (!raw || typeof raw !== 'object') {
    throw new Error('provider_surfaces_list_queue: unexpected empty response');
  }

  const envelope = raw as ProviderSurfacesQueueEnvelope & { error?: { message?: string } };
  if (envelope.error) {
    throw new Error(envelope.error.message ?? 'Core RPC returned an error');
  }
  const candidate = envelope.result?.data ?? envelope.data;
  if (!candidate || !Array.isArray(candidate.items) || typeof candidate.count !== 'number') {
    return EMPTY_QUEUE;
  }
  return candidate;
}

export const providerSurfacesApi = {
  async listQueue(): Promise<RespondQueueList> {
    const raw = await callCoreRpc<unknown>({ method: 'openhuman.provider_surfaces_list_queue' });
    return parseQueueEnvelope(raw);
  },

View on GitHub (pinned to 7491200858)