{"record":{"id":"0aabd8719e38e700","repo":"siyuan-note/siyuan","slug":"created-notebook-is-not-mounted","errorCode":null,"errorMessage":"created notebook is not mounted","messagePattern":"created notebook is not mounted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/import_obsidian.go","lineNumber":1804,"sourceCode":"\t\t\tremoveObsidianTemp(taskID)\n\t\t\treturn\n\t\t}\n\t}\n\n\tupdateObsidianTask(taskID, ObsidianTaskStateIndexing, 95, \"Indexing notebook\")\n\texisted, err := Mount(boxID)\n\tif err != nil {\n\t\tresult.Incomplete = true\n\t\tmarkObsidianNotebookIncomplete(boxID, notebookName)\n\t\tfailObsidianTask(taskID, \"indexing\", err, result)\n\t\tremoveObsidianTemp(taskID)\n\t\treturn\n\t}\n\tbox := Conf.Box(boxID)\n\tif box == nil {\n\t\tresult.Incomplete = true\n\t\tmarkObsidianNotebookIncomplete(boxID, notebookName)\n\t\tfailObsidianTask(taskID, \"indexing\", errors.New(\"created notebook is not mounted\"), result)\n\t\tremoveObsidianTemp(taskID)\n\t\treturn\n\t}\n\tevent := util.NewCmdResult(\"createnotebook\", 0, util.PushModeBroadcast)\n\tevent.Data = map[string]any{\"box\": box, \"existed\": existed}\n\tutil.PushEvent(event)\n\tIncSync()\n\tremoveObsidianTemp(taskID)\n\n\tobsidianTasksMu.Lock()\n\tif current := obsidianTasks[taskID]; current != nil && !isObsidianTerminalState(current.State) {\n\t\tcurrent.Result = result\n\t\tfinishObsidianTaskLocked(current, ObsidianTaskStateCompleted, \"Import completed\", \"\")\n\t}\n\tobsidianTasksMu.Unlock()\n}\n\nfunc revalidateObsidianVault(ctx context.Context, vault *obsidianVaultContext) error {","sourceCodeStart":1786,"sourceCodeEnd":1822,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/import_obsidian.go#L1786-L1822","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before import, confirm the target notebook name is not taken by a closed notebook\nconst boxes = await fetchPost('/api/notebook/lsNotebooks');\n// ensure no disabled/closed notebook uses the same name","typeGuard":null,"tryCatchPattern":"if err != nil && err.Error() == \"created notebook is not mounted\" {\n    // restart SiYuan to reload conf, open the closed notebook, then retry the import\n}","preventionTips":["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"],"tags":["go","obsidian-import","notebook-mount"],"backgroundTag":"internal-invariant-violation","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}