toeverything/AFFiNE · error · Error

Failed to load server config

Error message

Failed to load server config

What it means

Emitted through the Server entity's config$ LiveData stream when watchServerConfig has no stored config for the server metadata id — the server's configuration could not be loaded from local storage, so server-dependent features lack their config.

Source

Thrown at packages/frontend/core/src/modules/cloud/entities/server.ts:51

  });

  readonly serverConfigStore = this.scope.framework.get(ServerConfigStore);
  readonly fetch = this.scope.framework.get(FetchService).fetch;
  readonly gql = this.scope.framework.get(GraphQLService).gql;
  get account$() {
    return this.scope.framework.get(AuthService).session.account$;
  }
  readonly serverMetadata = this.props.serverMetadata;

  constructor(private readonly serverListStore: ServerListStore) {
    super();
  }

  readonly config$ = LiveData.from<ServerConfig>(
    this.serverListStore.watchServerConfig(this.serverMetadata.id).pipe(
      map(config => {
        if (!config) {
          throw new Error('Failed to load server config');
        }
        return config;
      })
    ),
    null as any
  );

  readonly isConfigRevalidating$ = new LiveData(false);

  readonly features$ = this.config$.map(config => {
    return Array.from(new Set(config.features)).reduce((acc, cur) => {
      acc[cur.toLowerCase() as LowercaseServerFeature] = true;
      return acc;
    }, {} as ServerFeatureRecord);
  });

  readonly credentialsRequirement$ = this.config$.map(config => {
    return config ? config.credentialsRequirement : null;

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Check the server base URL and network connectivity, then retry.
  2. Verify the server is running a compatible AFFiNE backend.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown in the Server entity's config$ LiveData when watchServerConfig yields no config for the server id, so server configuration is unavailable.

Common situations: Seen when a configured self-hosted server cannot be reached or its config fetch fails. Verify the server URL and connectivity, or re-add the server.


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