wekan/wekan · error · Error

No default swimlane found for board

Error message

No default swimlane found for board

What it means

Immediately after the board lookup, convertBoard fetches the board's default swimlane via board.getDefaultSwimline() and throws Error('No default swimlane found for board') at line 94 if it is falsy. Every WeKan board is expected to have an initial/default swimlane that lists convert into; a board without one cannot be converted.

Source

Thrown at client/lib/boardConverter.js:94

    if (this.conversionCache.has(boardId)) {
      return true; // Already converted
    }

    isConverting.set(true);
    conversionProgress.set(0);
    conversionStatus.set('Starting board conversion...');

    try {
      const board = ReactiveCache.getBoard(boardId);
      if (!board) {
        throw new Error('Board not found');
      }

      // Get the default swimlane for this board
      const defaultSwimlane = board.getDefaultSwimline();
      if (!defaultSwimlane) {
        throw new Error('No default swimlane found for board');
      }

      // Get all lists that need conversion
      const listsToConvert = ReactiveCache.getLists({
        boardId: boardId,
        $or: [
          { swimlaneId: { $exists: false } },
          { swimlaneId: '' },
          { swimlaneId: null }
        ]
      });

      if (listsToConvert.length === 0) {
        this.conversionCache.set(boardId, true);
        globalConvertedBoards.add(boardId); // Mark board as converted
        isConverting.set(false);
        console.log(`Board ${boardId} has no lists to convert, marked as converted`);
        return true;

View on GitHub (pinned to eb1433158b)

Solutions

  1. Recreate a swimlane on the board in the UI (Add Swimlane) — the first/default one satisfies getDefaultSwimline — then retry conversion.
  2. Check the swimlanes collection for the boardId; if rows exist but are archived, unarchive the default swimlane.
  3. Refresh so the client cache includes the board's swimlanes.
  4. If the board has zero swimlanes in the database, insert a default swimlane server-side or re-import the board.

Example fix

// before
const defaultSwimlane = board.getDefaultSwimline();
if (!defaultSwimlane) throw new Error('No default swimlane found for board');

// after — fall back to the board's first swimlane before failing
let defaultSwimlane = board.getDefaultSwimline();
if (!defaultSwimlane) defaultSwimlane = ReactiveCache.getSwimlane({ boardId, archived: false });
if (!defaultSwimlane) throw new Error('No default swimlane found for board');
Defensive patterns

Strategy: fallback

Validate before calling

function boardHasDefaultSwimlane(boardId) {
  const board = ReactiveCache.getBoard(boardId);
  return !!(board && board.getDefaultSwimline());
}

Type guard

function hasSwimlane(board) {
  return Boolean(board && typeof board.getDefaultSwimline === 'function' && board.getDefaultSwimline());
}

Try / catch

try {
  await convertBoard(boardId);
} catch (e) {
  if (e.message === 'No default swimlane found for board') {
    showToast('This board has no active swimlane. Add a swimlane and retry.');
  } else throw e;
}

Prevention

When it happens

Trigger: The board's default swimlane was deleted (manually or by an import that replaced swimlanes), the board predates swimlanes and was never migrated, getDefaultSwimline filters by archived/deleted state and the only swimlane is archived, or the swimlane document exists server-side but is missing from the client cache.

Common situations: Boards imported from very old WeKan versions or external formats lacking swimlanes; swimlane deleted by an admin script; data corruption after failed import leaving a board with zero swimlanes.

Related errors


AI-assisted analysis of wekan/wekan@eb1433158b (2026-09-01). Data as JSON: /api/errors/8dd30faaef9a0ef6. Report an issue: GitHub.