siyuan-note/siyuan · error

created notebook is not mounted

Error message

created notebook is not mounted

What it means

After importing, the kernel looks up the newly created notebook (Conf.Box(boxID)) to push a 'createnotebook' event and continue indexing. If the box is nil the notebook exists on disk but is not mounted/open in the workspace, so the import is marked incomplete and this internal error fails the task.

Source

Thrown at kernel/model/import_obsidian.go:1782

			removeObsidianTemp(taskID)
			return
		}
	}

	updateObsidianTask(taskID, ObsidianTaskStateIndexing, 95, "Indexing notebook")
	existed, err := Mount(boxID)
	if err != nil {
		result.Incomplete = true
		markObsidianNotebookIncomplete(boxID, notebookName)
		failObsidianTask(taskID, "indexing", err, result)
		removeObsidianTemp(taskID)
		return
	}
	box := Conf.Box(boxID)
	if box == nil {
		result.Incomplete = true
		markObsidianNotebookIncomplete(boxID, notebookName)
		failObsidianTask(taskID, "indexing", errors.New("created notebook is not mounted"), result)
		removeObsidianTemp(taskID)
		return
	}
	event := util.NewCmdResult("createnotebook", 0, util.PushModeBroadcast)
	event.Data = map[string]any{"box": box, "existed": existed}
	util.PushEvent(event)
	IncSync()
	removeObsidianTemp(taskID)

	obsidianTasksMu.Lock()
	if current := obsidianTasks[taskID]; current != nil && !isObsidianTerminalState(current.State) {
		current.Result = result
		finishObsidianTaskLocked(current, ObsidianTaskStateCompleted, "Import completed", "")
	}
	obsidianTasksMu.Unlock()
}

func revalidateObsidianVault(ctx context.Context, vault *obsidianVaultContext) error {

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Re-run the import; transient mounting races usually resolve on retry
  2. Check the created notebook folder under data/ for a valid .siyuanconf; restore or delete the broken notebook folder and re-import
  3. Open SiYuan settings - 笔记本 (Notebooks) and confirm the new notebook is mounted; re-mount it and re-index before retrying
Defensive patterns

Strategy: retry

Validate before calling

null

Try / catch

try { await apiImportObsidian(vaultPath); }
catch (e) {
  if (e.msg === 'created notebook is not mounted') {
    await sleep(1000); await apiImportObsidian(vaultPath); // transient mount race; retry once
  }
}

Prevention

When it happens

Trigger: Conf.Box(boxID) returns nil right after creating the notebook during the indexing phase — the notebook was created but not registered in the open-workspace configuration, e.g. its conf was not loaded or the notebook was closed/removed concurrently.

Common situations: Race with closing notebooks or switching workspaces during import; a corrupted or missing <boxID>/.siyuan/conf.json preventing the box from mounting; too many notebooks open such that the new one is not auto-mounted.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/0aabd8719e38e700. Report an issue: GitHub.