tinyhumansai/openhuman · error

[onboarding:api-keys] oauth start failed

Error message

[onboarding:api-keys] oauth start failed

What it means

Starting the OpenAI OAuth flow failed during onboarding API-key setup: the inference_openai_oauth_start RPC either rejected, returned no authUrl, or the subsequent openUrl of the auth page threw. The user is left on the step with oauthBusy cleared; setOauthAwaitingCallback stays false so the paste-callback UI is not shown.

Source

Thrown at app/src/pages/onboarding/steps/ApiKeysStep.tsx:76

    if (!isTauri()) {
      setError(t('onboarding.apiKeys.oauthDesktopOnly'));
      return;
    }
    setOauthBusy(true);
    setError(null);
    try {
      const res = await callCoreRpc<{ result: { authUrl: string } }>({
        method: 'openhuman.inference_openai_oauth_start',
        params: {},
      });
      const authUrl = res?.result?.authUrl?.trim();
      if (!authUrl) {
        throw new Error('missing authUrl');
      }
      setOauthAwaitingCallback(true);
      await openUrl(authUrl);
    } catch (err) {
      console.warn('[onboarding:api-keys] oauth start failed', err);
      setError(t('onboarding.apiKeys.oauthStartFailed'));
    } finally {
      setOauthBusy(false);
    }
  };

  const handleOpenAiOAuthComplete = async () => {
    const callback = oauthCallbackUrl.trim();
    if (!callback) {
      setError(t('onboarding.apiKeys.oauthPasteRedirect'));
      return;
    }
    setOauthBusy(true);
    setError(null);
    try {
      await callCoreRpc({
        method: 'openhuman.inference_openai_oauth_complete',
        params: { callback_url: callback },

View on GitHub (pinned to 7491200858)

Solutions

  1. Check the warned error — desktop-only guard: this path requires isTauri(), and non-Tauri shows a dedicated message before the RPC
  2. Retry the connect button; transient RPC/core failures clear on the next attempt
  3. If authUrl was missing in the response, inspect the core log for the OAuth start handler
  4. Manual fallback: paste an OpenAI API key instead of using OAuth
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at app/src/pages/onboarding/steps/ApiKeysStep.tsx:76 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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