{"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":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/import_obsidian.go","lineNumber":1782,"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":1764,"sourceCodeEnd":1800,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/import_obsidian.go#L1764-L1800","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-run the import; transient mounting races usually resolve on retry","Check the created notebook folder under data/ for a valid .siyuanconf; restore or delete the broken notebook folder and re-import","Open SiYuan settings - 笔记本 (Notebooks) and confirm the new notebook is mounted; re-mount it and re-index before retrying"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"null","typeGuard":null,"tryCatchPattern":"try { await apiImportObsidian(vaultPath); }\ncatch (e) {\n  if (e.msg === 'created notebook is not mounted') {\n    await sleep(1000); await apiImportObsidian(vaultPath); // transient mount race; retry once\n  }\n}","preventionTips":["Do not close notebooks or switch workspaces while importing","Keep the data/<boxID>/.siyuanconf intact and valid","Re-index after any manual changes to the data directory","Retry the import once before deeper debugging"],"tags":["notebook","obsidian-import","internal-state"],"backgroundTag":"internal-invariant-violation","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}