siyuan-note/siyuan · error
created notebook is not mounted
Error message
created notebook is not mounted
What it means
After creating the target notebook during an Obsidian import, the code looks it up with Conf.Box(boxID). If the freshly created notebook is not found in the in-memory configuration, the importer marks the result Incomplete, marks the notebook incomplete, fails the indexing task with this error, and removes temp files — the import cannot proceed into a notebook the config does not know about.
Solutions
- Open SiYuan settings - Notebook list and confirm the notebook exists and is enabled (mounted)
- Restart SiYuan so the configuration reloads from disk, then retry the import
- If a closed notebook with the same name exists, open it or choose a different notebook name for the import
- Check conf.json for corruption or duplicate box entries and repair before retrying
Defensive patterns
Strategy: validation
Validate before calling
// before import, confirm the target notebook name is not taken by a closed notebook
const boxes = await fetchPost('/api/notebook/lsNotebooks');
// ensure no disabled/closed notebook uses the same name Try / catch
if err != nil && err.Error() == "created notebook is not mounted" {
// restart SiYuan to reload conf, open the closed notebook, then retry the import
} Prevention
- Do not keep a closed notebook with the same name as the import target
- Avoid editing conf.json manually while the kernel runs
- Restart SiYuan after any manual config changes before importing
When it happens
Trigger: Conf.Box(boxID) returns nil right after notebook creation — the created notebook was not mounted into the configuration, e.g. because creation succeeded on disk but the config refresh failed or the box ID collided.
Common situations: A notebook with the same name/ID exists but is closed (not mounted); configuration save/reload raced with creation; corrupted conf.json preventing the new box from being registered.
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@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/0aabd8719e38e700.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/import_obsidian.go:1804
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 9f775e8a12)