actualbudget/actual · error
File not found at the provided path: ${filePath}
Error message
File not found at the provided path: ${filePath} What it means
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.
Source
Thrown at packages/loot-core/src/server/dashboard/app.ts:270
dashboard_page_id: targetDashboardPageId,
};
await addDashboardWidget(newWidget);
} else {
throw new Error(`Unsupported widget type: ${widget.type}`);
}
});
}
async function importDashboard({
filePath,
dashboardPageId,
}: {
filePath: string;
dashboardPageId: string;
}) {
try {
if (!(await fs.exists(filePath))) {
throw new Error(`File not found at the provided path: ${filePath}`);
}
const content = await fs.readFile(filePath);
const parsedContent: ExportImportDashboard = JSON.parse(content);
exportModel.validate(parsedContent);
const customReportIds = await db.all<Pick<db.DbCustomReport, 'id'>>(
'SELECT id from custom_reports',
);
const customReportIdSet = new Set(customReportIds.map(({ id }) => id));
const existingWidgets = await db.selectWithSchema(
'dashboard',
'SELECT id FROM dashboard WHERE dashboard_page_id = ? AND tombstone = 0',
[dashboardPageId],
);
View on GitHub (pinned to d4334cb6e6)
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.
Example fix
// before
await send('dashboard-import', { filePath: 'dash.json', dashboardPageId });
// after
const filePath = path.resolve(__dirname, 'dash.json');
if (!fs.existsSync(filePath)) throw new Error('Export file missing');
await send('dashboard-import', { filePath, dashboardPageId }); Defensive patterns
Strategy: validation
Validate before calling
import * as fs from 'fs';
const p = path.resolve(filePath);
if (!fs.existsSync(p) || !fs.statSync(p).isFile()) {
throw new Error(`Import file missing or not a file: ${p}`);
} Try / catch
try {
await send('dashboard-import', { filePath, dashboardPageId });
} catch (e) {
if (e.message.startsWith('File not found at the provided path:')) {
console.error(`Check the path: ${filePath}`);
}
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: Automation passing relative paths where absolute are expected; browser/desktop sandbox blocking access to the chosen file; exporting to /tmp and importing after reboot.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- File not found at the provided path: ${filepath}
- Error importing budget: ${result.error}
- Error importing budget: no budget was loaded
- zipMeta ? getUnsafeZipError(zipMeta) : error
- Document directory is not set
AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29).
Data as JSON: /api/errors/d4396841d3ea75ad.
Report an issue: GitHub.