JosefNemec/Playnite · error · Exception
No emulator profile specified.
Error message
No emulator profile specified.
What it means
Thrown as a generic Exception during emulator-based ROM scanning when scanner.EmulatorProfileId is null or empty (checked via IsNullOrEmpty). The scanner requires both an emulator ID and a specific emulator profile ID to know how to launch and identify games. Without a profile, the scanner cannot determine executable paths, arguments, or ROM detection rules.
Source
Thrown at source/Playnite/Emulators/Scanner.cs:203
public List<ScannedGame> Scan(
CancellationToken cancelToken,
out List<Platform> newPlatforms,
out List<Region> newRegions,
Action<string> fileScanCallback = null)
{
List<ScannedGame> games;
newPlatforms = new List<Platform>();
newRegions = new List<Region>();
var emulator = database.Emulators[scanner.EmulatorId];
if (emulator == null)
{
throw new Exception("Emulator not found.");
}
if (scanner.EmulatorProfileId.IsNullOrEmpty())
{
throw new Exception("No emulator profile specified.");
}
importedFiles = database.GetImportedRomFiles(emulator.InstallDir);
var globalScanConfig = database.GetGameScannersSettings();
var crcExclusions = string.Join(";",
ListExtensions.Merge(globalScanConfig.CrcExcludeFileTypes, scanner.CrcExcludeFileTypes).
Select(a => a.ToLower().Trim()).ToHashSet());
var dirToScan = PlaynitePaths.ExpandVariables(scanner.Directory, emulator.InstallDir, true);
fileExclusions = ParseExclusions(dirToScan, scanner.ExcludedFiles);
directoryExclusions = ParseExclusions(dirToScan, scanner.ExcludedDirectories);
CustomEmulatorProfile customProfile = null;
BuiltInEmulatorProfile builtinProfile = null;
EmulatorDefinitionProfile builtinProfileDef = null;
if (scanner.EmulatorProfileId.StartsWith(CustomEmulatorProfile.ProfilePrefix, StringComparison.Ordinal))
{
customProfile = emulator.CustomProfiles?.FirstOrDefault(a => a.Id == scanner.EmulatorProfileId);
View on GitHub (pinned to 5911f4e964)
Solutions
- Open the scanner configuration and select an emulator profile from the dropdown.
- If the referenced profile was deleted, select a new one or recreate the deleted profile.
- If creating scanners programmatically, always set EmulatorProfileId before saving.
- Validate scanner configs on load and flag/skip incomplete ones.
Example fix
// before — scanner without profile ID
var scanner = new GameScanner { Name = "SNES Roms", EmulatorId = emu.Id }; // no EmulatorProfileId
RunScan(scanner);
// after — always set the profile
var scanner = new GameScanner
{
Name = "SNES Roms",
EmulatorId = emu.Id,
EmulatorProfileId = emu.CustomProfiles.First().Id // explicitly set
};
RunScan(scanner); Defensive patterns
Strategy: validation
Validate before calling
if (scanner.EmulatorProfileId.IsNullOrEmpty())
{
logger.Warn($"Scanner '{scanner.Name}' has no emulator profile specified.");
continue;
} Type guard
static bool HasValidProfileId(GameScanner scanner)
{
return !scanner.EmulatorProfileId.IsNullOrEmpty();
} Prevention
- Require EmulatorProfileId in the scanner editor UI before saving.
- Validate scanner configs programmatically before batch scan runs.
- Skip and log incomplete scanners rather than crashing the entire scan.
When it happens
Trigger: Running a GameScanner where EmulatorProfileId was never set, was cleared, or is empty. This is a configuration completeness check: the scanner form requires selecting an emulator profile before saving.
Common situations: The scanner was created programmatically or imported without a profile ID. The profile was deleted and the scanner config was not updated. The scanner config was edited manually or via API without setting EmulatorProfileId. A UI bug allowed saving an incomplete scanner configuration.
Related errors
- Assigned custom emulator profile not found.
- Assigned built-in emulator profile not found.
- Emulator not found.
- Emulator profile format not supported.
- No profile provided.
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/f251196db0456776.
Report an issue: GitHub.