toeverything/AFFiNE · error · Error

No logged in

Error message

No logged in

What it means

A GraphQL response-shape guard in the subscription store: after running subscriptionQuery, data.currentUser is absent, meaning the request executed but no authenticated user was returned (session expired or never established). It fires when fetchSubscriptions runs while the client has no valid login; the fault is the auth/session state, not the query itself.

Source

Thrown at packages/frontend/core/src/modules/cloud/stores/subscription.ts:62

  constructor(
    private readonly gqlService: GraphQLService,
    private readonly globalCache: GlobalCache,
    private readonly urlService: UrlService,
    private readonly serverService: ServerService
  ) {
    super();
  }

  async fetchSubscriptions(abortSignal?: AbortSignal) {
    const data = await this.gqlService.gql({
      query: subscriptionQuery,
      context: {
        signal: abortSignal,
      },
    });

    if (!data.currentUser) {
      throw new Error('No logged in');
    }

    return {
      userId: data.currentUser?.id,
      subscriptions: data.currentUser?.subscriptions,
    };
  }

  async fetchWorkspaceSubscriptions(
    workspaceId: string,
    abortSignal?: AbortSignal
  ) {
    const data = await this.gqlService.gql({
      query: getWorkspaceSubscriptionQuery,
      variables: {
        workspaceId,
      },
      context: {

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Sign in before accessing subscription information.
  2. Re-authenticate and retry.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown in SubscriptionStore.fetchSubscriptions when the GraphQL response has no currentUser, i.e. no authenticated session exists.

Common situations: Seen when opening subscription/plan settings while signed out or with an expired token. Sign in again to view subscription info.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/aa89cd228c42c661. Report an issue: GitHub.