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.

Solutions

  1. Open the scanner configuration and select an emulator profile from the dropdown.
  2. If the referenced profile was deleted, select a new one or recreate the deleted profile.
  3. If creating scanners programmatically, always set EmulatorProfileId before saving.
  4. 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

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


AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13). Data as JSON: /api/errors/f251196db0456776. Report an issue: GitHub.

Appendix: 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)