JosefNemec/Playnite · error · Exception

Assigned built-in emulator profile not found.

Error message

Assigned built-in emulator profile not found.

What it means

Thrown as a generic Exception during emulator-based ROM scanning when EmulatorProfileId starts with BuiltInEmulatorProfile.ProfilePrefix (indicating it should be a built-in profile) but no matching profile is found in emulator.BuiltinProfiles. The scanner expects a built-in emulator profile (e.g., a standard config like 'Snes9x Default') that does not exist in the current emulator's BuiltinProfiles collection.

Source

Thrown at source/Playnite/Emulators/Scanner.cs:243

                }

                games = ScanDirectory(
                    dirToScan,
                    emulator,
                    customProfile,
                    cancelToken,
                    crcExclusions,
                    scanner.ScanSubfolders,
                    scanner.ScanInsideArchives,
                    scanner.MergeRelatedFiles,
                    fileScanCallback);
            }
            else if (scanner.EmulatorProfileId.StartsWith(BuiltInEmulatorProfile.ProfilePrefix, StringComparison.Ordinal))
            {
                builtinProfile = emulator.BuiltinProfiles?.FirstOrDefault(a => a.Id == scanner.EmulatorProfileId);
                if (builtinProfile == null)
                {
                    throw new Exception("Assigned built-in emulator profile not found.");
                }

                builtinProfileDef = Emulation.GetProfile(emulator.BuiltInConfigId, builtinProfile.BuiltInProfileName);
                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);

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Open the scanner configuration and re-select the built-in emulator profile from the dropdown.
  2. Update Playnite and the emulator definitions pack: a stale definition may have renamed or removed the profile.
  3. Check the emulator's BuiltinProfiles in Playnite settings to see which built-in profiles are available.
  4. Delete the stale scanner and recreate it with a currently valid built-in profile.

Example fix

// before — scanner references a built-in profile that no longer exists
scanner.EmulatorProfileId = "builtin_snes9x_default_v1"; // renamed in new definition
RunScan(scanner); // throws

// after — validate profile existence and guide reconfiguration
var builtinProfile = emulator.BuiltinProfiles?.FirstOrDefault(p => p.Id == scanner.EmulatorProfileId);
if (builtinProfile == null)
{
    logger.Warn($"Built-in profile {scanner.EmulatorProfileId} not found on emulator {emulator.Name}. " +
                "Available: {string.Join(", ", emulator.BuiltinProfiles?.Select(p => p.Id) ?? new List<string>())}");
    return;
}
RunScan(scanner);
Defensive patterns

Strategy: validation

Validate before calling

var builtinProfile = emulator.BuiltinProfiles?.FirstOrDefault(p => p.Id == scanner.EmulatorProfileId);
if (builtinProfile == null)
{
    logger.Warn($"Built-in profile {scanner.EmulatorProfileId} not found on emulator {emulator.Name}. " +
                $"Available: {string.Join(", ", emulator.BuiltinProfiles?.Select(p => p.Id) ?? Enumerable.Empty<string>())}");
    continue;
}

Type guard

static bool BuiltinProfileExists(Emulator emulator, string profileId)
{
    return emulator.BuiltinProfiles?.Any(p => p.Id == profileId) == true;
}

Prevention

When it happens

Trigger: scanner.EmulatorProfileId starts with BuiltInEmulatorProfile.ProfilePrefix and FirstOrDefault against emulator.BuiltinProfiles returns null. This means the built-in profile ID is correctly prefixed but the corresponding profile record is not attached to this emulator instance.

Common situations: The emulator definition was updated and the built-in profile ID or name changed. The emulator was reconfigured and the built-in profiles were regenerated with new IDs. The scanner was exported from a different Playnite version with different built-in definitions. A database migration changed profile IDs. The built-in profile was removed from the emulator definition pack.

Related errors


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