Stirling-Tools/Stirling-PDF · error · Error

Unknown error occurred during signup

Error message

Unknown error occurred during signup

What it means

Thrown by AuthService.signUp() in the edge case where supabase.auth.signUp() returns no error AND no user object. This means data.user is falsy despite no error — an unusual Supabase response indicating the call neither succeeded nor failed in a recognized way. This is a defensive catch-all for an unrecognizable auth response.

Source

Thrown at frontend/editor/src/saas/routes/signup/AuthService.ts:31

        data: { full_name: name },
      },
    });

    if (error) {
      console.error("[Signup] Sign up error:", error);
      throw new Error(error.message);
    }

    if (data.user) {
      console.log("[Signup] Sign up successful:", data.user);
      return {
        user: data.user,
        session: data.session,
        requiresEmailConfirmation: data.user && !data.session,
      };
    }

    throw new Error("Unknown error occurred during signup");
  };

  const signInWithProvider = async (
    provider: "github" | "google" | "apple" | "azure",
  ) => {
    const { error } = await supabase.auth.signInWithOAuth({
      provider,
      options: { redirectTo: absoluteWithBasePath("/auth/callback") },
    });

    if (error) {
      throw new Error(error.message);
    }
  };

  return {
    signUp,
    signInWithProvider,

View on GitHub (pinned to 9ef20dcab8)

Solutions

  1. Check Supabase Dashboard > Authentication > Settings — verify email auth is enabled and SMTP is configured if email confirmation is on
  2. Check the Supabase status page for service degradation
  3. Log the full supabase.auth.signUp() response (data and error) to diagnose the missing user
  4. Retry after confirming the Supabase project configuration is correct

Example fix

// before
if (data.user) { return { ... }; }
throw new Error("Unknown error occurred during signup");

// after
if (data.user) { return { ... }; }
console.error("[Signup] No user and no error:", { data, error });
throw new Error(
  "Signup did not return a user. Check Supabase auth configuration.",
);
Defensive patterns

Strategy: try-catch

Validate before calling

// Check Supabase auth configuration is healthy
const { data, error } = await supabase.auth.getSession();
if (error && error.message.includes('not enabled')) {
  showConfigError('Email auth is not enabled in this Supabase project');
}

Try / catch

try {
  const result = await signUp(email, password, name);
} catch (e) {
  const msg = e instanceof Error ? e.message : '';
  if (msg.includes('Unknown error')) {
    // Log full response and suggest checking Supabase config
    console.error('[Signup] Unrecognized response — check Supabase auth settings');
    setFormError('Sign up is temporarily unavailable. Please try again later.');
  } else {
    setFormError(msg);
  }
}

Prevention

When it happens

Trigger: Supabase returns { data: { user: null, session: null }, error: null }. This can happen during Supabase service degradation, when email auth is misconfigured (e.g. email confirmations required but SMTP not set up, causing the user object to not be returned), or when the network response is truncated/corrupted.

Common situations: Supabase project has email confirmation enabled but no SMTP configured, leading to an inconsistent auth response; Supabase service is temporarily degraded; auth provider misconfiguration.

Related errors


AI-assisted analysis of Stirling-Tools/Stirling-PDF@9ef20dcab8 (2026-08-13). Data as JSON: /api/errors/97b6973efaab8840. Report an issue: GitHub.