usebruno/bruno · warning · Error
File path is required
Error message
File path is required
What it means
renderer:show-in-folder requires a truthy filePath before delegating to Electron's shell.showItemInFolder. Thrown on empty string, null, or undefined so the native call is never invoked with an invalid path.
Source
Thrown at packages/bruno-electron/src/ipc/collection.js:2410
const content = await stringifyRequestViaWorker(request, { format });
await writeFile(targetPathname, content);
if (request.examples) {
syncExampleUidsCache(collectionPath, request.examples);
}
return { newPathname: targetPathname };
} catch (error) {
console.error('Error saving scratch request:', error);
return Promise.reject(error);
}
});
ipcMain.handle('renderer:show-in-folder', async (event, filePath) => {
try {
if (!filePath) {
throw new Error('File path is required');
}
shell.showItemInFolder(filePath);
} catch (error) {
console.error('Error in show-in-folder: ', error);
throw error;
}
});
// Implement the Postman to Bruno conversion handler
ipcMain.handle('renderer:convert-postman-to-bruno', async (event, postmanCollection, options = {}) => {
try {
// Convert Postman collection to Bruno format
// Returns { collection, issues } where issues tracks items that were skipped or degraded
const result = await postmanToBruno(postmanCollection, {
useWorkers: true,
// preserve scripts without any pm.* -> bru.* translation
preserveScripts: !!options.preserveScripts
});View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Pass a non-empty absolute file path.
- Disable the 'Show in folder' UI action when the selected item has no pathname.
Defensive patterns
Strategy: validation
Validate before calling
if (!filePath || typeof filePath !== 'string') {
throw new Error('filePath is required to reveal in folder');
} Type guard
/** @param {unknown} p @returns {p is string} */
function isNonEmptyString(p) {
return typeof p === 'string' && p.length > 0;
} Try / catch
try {
await ipcRenderer.invoke('renderer:show-in-folder', filePath);
} catch (err) {
if (/File path is required/.test(err.message)) {
// disable the UI action; no file to reveal
} else {
throw err;
}
} Prevention
- Disable the 'Show in folder' UI action for virtual/unsaved items with no pathname.
- Pass only absolute, non-empty paths.
When it happens
Trigger: Calling renderer:show-in-folder with no filePath argument (empty/null/undefined).
Common situations: Renderer offers 'Reveal in Finder' on a virtual or unsaved request that has no on-disk file; event fired before a path was assigned.
Related errors
- Mock server id is required.
- Workspace path is required.
- ${request.filename} is not a valid filename
- A file with the name "${finalFilename}" already exists in th
- Invalid scope type: ${scopeType}
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/5282e82c81e39e72.
Report an issue: GitHub.