{"record":{"id":"d4396841d3ea75ad","repo":"actualbudget/actual","slug":"file-not-found-at-the-provided-path-filepath-d43968","errorCode":null,"errorMessage":"File not found at the provided path: ${filePath}","messagePattern":"File not found at the provided path: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/loot-core/src/server/dashboard/app.ts","lineNumber":270,"sourceCode":"        dashboard_page_id: targetDashboardPageId,\n      };\n      await addDashboardWidget(newWidget);\n    } else {\n      throw new Error(`Unsupported widget type: ${widget.type}`);\n    }\n  });\n}\n\nasync function importDashboard({\n  filePath,\n  dashboardPageId,\n}: {\n  filePath: string;\n  dashboardPageId: string;\n}) {\n  try {\n    if (!(await fs.exists(filePath))) {\n      throw new Error(`File not found at the provided path: ${filePath}`);\n    }\n\n    const content = await fs.readFile(filePath);\n    const parsedContent: ExportImportDashboard = JSON.parse(content);\n\n    exportModel.validate(parsedContent);\n\n    const customReportIds = await db.all<Pick<db.DbCustomReport, 'id'>>(\n      'SELECT id from custom_reports',\n    );\n    const customReportIdSet = new Set(customReportIds.map(({ id }) => id));\n\n    const existingWidgets = await db.selectWithSchema(\n      'dashboard',\n      'SELECT id FROM dashboard WHERE dashboard_page_id = ? AND tombstone = 0',\n      [dashboardPageId],\n    );\n","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/loot-core/src/server/dashboard/app.ts#L252-L288","documentation":"importDashboard first checks fs.exists(filePath) and throws `File not found at the provided path: ${filePath}` if the path is missing or unreadable. Import of a dashboard JSON export cannot proceed without the file.","triggerScenarios":"Calling the dashboard-import handler with a filePath that doesn't exist, has a typo, points outside the allowed file system access, or was deleted between export and import (e.g. a temp file).","commonSituations":"Automation passing relative paths where absolute are expected; browser/desktop sandbox blocking access to the chosen file; exporting to /tmp and importing after reboot.","solutions":["Check the path exists and is readable before calling import (fs.existsSync / ls -l).","Pass an absolute path, since the server process may resolve relative paths differently than the caller.","Re-export the dashboard to a stable location and retry."],"exampleFix":"// before\nawait send('dashboard-import', { filePath: 'dash.json', dashboardPageId });\n// after\nconst filePath = path.resolve(__dirname, 'dash.json');\nif (!fs.existsSync(filePath)) throw new Error('Export file missing');\nawait send('dashboard-import', { filePath, dashboardPageId });","handlingStrategy":"validation","validationCode":"import * as fs from 'fs';\nconst p = path.resolve(filePath);\nif (!fs.existsSync(p) || !fs.statSync(p).isFile()) {\n  throw new Error(`Import file missing or not a file: ${p}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await send('dashboard-import', { filePath, dashboardPageId });\n} catch (e) {\n  if (e.message.startsWith('File not found at the provided path:')) {\n    console.error(`Check the path: ${filePath}`);\n  }\n}","preventionTips":["Always pass absolute, resolved paths to server handlers.","Verify the export file exists and is readable before invoking import.","Export to a persistent directory, not /tmp, when import happens later."],"tags":["filesystem","import","path"],"backgroundTag":"file-not-found","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}