beekeeper-studio/beekeeper-studio · error
Bundled config file not found: ${src}. This should not happe
Error message
Bundled config file not found: ${src}. This should not happen. Please report an issue. What it means
copyBundledConfig copies a config file shipped with the packaged app from process.resourcesPath into the user config location. It throws when the expected bundled file does not exist next to the executable. In a correct package build these files are always present, so the message asks for a bug report.
Source
Thrown at apps/studio/src/common/bksConfig/mainBksConfig.ts:150
path,
value
});
}
}
}
traverse(deprecations);
return results;
}
const bundledConfigPath = path.join(process.resourcesPath);
function copyBundledConfig(file: ConfigFileName, dest: string) {
log.info(`Copying bundled config ${file} to ${dest}.`);
const src = path.join(bundledConfigPath, file);
if (!existsSync(src)) {
throw new Error(
`Bundled config file not found: ${src}. This should not happen. Please report an issue.`
);
}
try {
accessSync(dest, constants.W_OK);
copyFileSync(src, dest);
} catch (err) {
log.warn(`Skipping copy of ${file}. Permission denied or dest not writable:`, err.message);
}
}
function readConfig(filePath: string) {
try {
const config = parseIni(readFileSync(filePath, "utf-8"));
log.debug(`Successfully read config ${filePath}.`);
return processRawConfig(config);
} catch (error) {
log.error(`Failed reading config ${filePath}.`, error);View on GitHub (pinned to 4e3e03e322)
Solutions
- Rebuild the packaged app with the full build (yarn bks:build) so bundled config files are emitted into resources
- Verify electron-builder extraResources/files config includes the bundled config files
- Reinstall or re-extract the app to repair a corrupted install
- If reproducible in a correct build, report the issue to Beekeeper Studio maintainers
Example fix
// electron-builder-config.js
// before
extraResources: []
// after
extraResources: [{ from: 'config/', to: 'config/' }] Defensive patterns
Strategy: try-catch
Validate before calling
import { existsSync } from 'fs'
import path from 'path'
const src = path.join(process.resourcesPath, file)
if (!existsSync(src)) {
console.warn(`Bundled config missing: ${src}; falling back to defaults`)
} Type guard
function hasBundledConfig(base: string, file: string): boolean {
return existsSync(path.join(base, file))
} Try / catch
try {
const config = loadConfig(file, filePath)
} catch (e) {
if (e.message.startsWith('Bundled config file not found')) {
log.warn('Bundled config missing; using defaults', e.message)
config = defaultConfigValues
} else throw e
} Prevention
- Keep the electron-builder extraResources/files entries for config files intact
- Run the full packaging build before testing packaged builds
- Verify process.resourcesPath contents in a smoke test after packaging
- Reinstall cleanly if upgrading in place
When it happens
Trigger: Running a packaged (non-dev) build where loadConfig resolved a config file (e.g. config.ini) that was never included in process.resourcesPath by electron-builder; running the app from a partially extracted/corrupted install; launching via a wrapper that changes the resources path so bundledConfigPath points at an empty directory.
Common situations: Custom electron-builder configs that drop the extraResources entry for config files; testing a packaged build without running the full 'yarn bks:build' packaging step; portable/Scoop installs with missing files.
Related errors
- Failed loading config. File not found: ${filePath}
- No username provided
- Authentication is required.
- No server found
- ENUM LOADING ERROR: ${e}
AI-assisted analysis of beekeeper-studio/beekeeper-studio@4e3e03e322 (2026-08-31).
Data as JSON: /api/errors/af964ee4d32a14c7.
Report an issue: GitHub.