JosefNemec/Playnite · error · Exception
Emulator profile format not supported.
Error message
Emulator profile format not supported.
What it means
Thrown as the terminal else-branch when a ScanConfig.EmulatorProfileId matches neither the custom profile prefix (CustomEmulatorProfile.ProfilePrefix) nor the built-in profile prefix (BuiltInEmulatorProfile.ProfilePrefix). It signals an unrecognizable profile-id format that the scanner cannot dispatch on. This is effectively an exhaustiveness guard over the two supported profile-id shapes.
Source
Thrown at source/Playnite/Emulators/Scanner.cs:265
if (builtinProfileDef == null)
{
throw new Exception("Assigned built-in emulator profile definition not found.");
}
games = ScanDirectory(
dirToScan,
emulator,
builtinProfile,
cancelToken,
crcExclusions,
scanner.ScanSubfolders,
scanner.ScanInsideArchives,
scanner.MergeRelatedFiles,
fileScanCallback);
}
else
{
throw new Exception("Emulator profile format not supported.");
}
foreach (var game in games)
{
game.SourceEmulator = emulator;
game.SourceConfig = scanner;
var assignedRegions = new List<EmulatedRegion>();
var assignedPlatforms = new List<EmulatedPlatform>();
foreach (var rom in game.Roms)
{
// REGIONS
if (rom.DbData?.Region.IsNullOrEmpty() == false)
{
var region = Emulation.GetRegionByCode(rom.DbData.Region);
if (region != null)
{
assignedRegions.AddMissing(region);
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Validate that scanner.EmulatorProfileId starts with one of the two known prefixes before calling ScanDirectory.
- Re-save the scan configuration through the UI to regenerate a well-formed profile id.
- If migrating between Playnite versions, run the config migration so profile ids are normalized to the current prefix scheme.
Example fix
// before
else {
throw new Exception("Emulator profile format not supported.");
}
// after — explicit prefix dispatch with logging
if (scanner.EmulatorProfileId.IsNullOrEmpty()) {
logger.Error("ScanConfig has no EmulatorProfileId; cannot scan.");
return new List<ScannedGame>();
}
if (!scanner.EmulatorProfileId.StartsWith(CustomEmulatorProfile.ProfilePrefix, StringComparison.Ordinal) &&
!scanner.EmulatorProfileId.StartsWith(BuiltInEmulatorProfile.ProfilePrefix, StringComparison.Ordinal)) {
logger.Error($"Unrecognized profile id format: {scanner.EmulatorProfileId}");
return new List<ScannedGame>();
} Defensive patterns
Strategy: validation
Validate before calling
// Ensure the profile id uses a recognized prefix before dispatching.
if (scanner.EmulatorProfileId.IsNullOrEmpty()
|| (!scanner.EmulatorProfileId.StartsWith(CustomEmulatorProfile.ProfilePrefix, StringComparison.Ordinal)
&& !scanner.EmulatorProfileId.StartsWith(BuiltInEmulatorProfile.ProfilePrefix, StringComparison.Ordinal))) {
logger.Error($"Unrecognized profile id: {scanner.EmulatorProfileId}");
return;
} Type guard
static bool IsValidProfileIdFormat(string id) =>
!id.IsNullOrEmpty() &&
(id.StartsWith(CustomEmulatorProfile.ProfilePrefix, StringComparison.Ordinal) ||
id.StartsWith(BuiltInEmulatorProfile.ProfilePrefix, StringComparison.Ordinal)); Prevention
- Always create scan configs through the UI so profile ids carry the correct prefix.
- On DB load, validate every ScanConfig.EmulatorProfileId prefix and quarantine invalid ones.
- Never hand-edit profile ids in the database.
When it happens
Trigger: ScanDirectory is invoked with a scanner.EmulatorProfileId that does not start with CustomEmulatorProfile.ProfilePrefix or BuiltInEmulatorProfile.ProfilePrefix — e.g. a null, empty, corrupted, or hand-edited id with an unknown prefix.
Common situations: Database corruption or manual DB edits producing a malformed EmulatorProfileId; an older/newer Playnite version wrote a profile id format the current build doesn't recognize; serialization glitch leaving the id blank.
Related errors
- No emulator profile specified.
- No profile provided.
- Emulator not found.
- Uknown play action configuration.
- Can't find built-in {builtIn.BuiltInProfileName} emulator pr
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/73ed363005a6ec80.
Report an issue: GitHub.