toeverything/AFFiNE · error

Schema not found for block ${this.model.id}, flavour ${this.

Error message

Schema not found for block ${this.model.id}, flavour ${this.model.flavour}

What it means

Warning logged by the `isVersionMismatch` getter when the block's flavour is missing from `flavourSchemaMap` — the block's schema was never registered (unknown/removed flavour or a doc saved with a flavour this editor does not know). Returns true so the component can render a mismatch/unavailable placeholder instead of crashing.

Source

Thrown at blocksuite/framework/std/src/view/element/block-component.ts:91

    return childModels
      .map(child => {
        return this.std.view.getBlock(child.id);
      })
      .filter((x): x is BlockComponent => !!x);
  }

  get flavour(): string {
    return this.model.flavour;
  }

  get host() {
    return this.std.host;
  }

  get isVersionMismatch() {
    const schema = this.store.schema.flavourSchemaMap.get(this.model.flavour);
    if (!schema) {
      console.warn(
        `Schema not found for block ${this.model.id}, flavour ${this.model.flavour}`
      );
      return true;
    }
    const expectedVersion = schema.version;
    const actualVersion = this.model.version;
    if (expectedVersion !== actualVersion) {
      console.warn(
        `Version mismatch for block ${this.model.id}, expected ${expectedVersion}, actual ${actualVersion}`
      );
      return true;
    }

    return false;
  }

  get model() {
    if (this._model) {

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Register the block schema for the flavour before rendering.
  2. Check the block flavour spelling.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Triggered when a block's flavour has no registered schema in the store's flavourSchemaMap, marking the block component as version-mismatched.

Common situations: Occurs when opening a doc containing a block type whose extension is not registered, e.g. content from a newer version or a missing plugin. Register the block flavour or update the app.


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