JosefNemec/Playnite · error · Exception
Uknown play action configuration.
Error message
Uknown play action configuration.
What it means
Thrown by GenericGameController.StartEmulator when action.SelectedEmulatorProfile is neither a CustomEmulatorProfile nor a BuiltInEmulatorProfile (the two recognized types). It is a bare Exception ('Uknown' is a typo for 'Unknown') indicating an unrecognized profile kind on the play action.
Source
Thrown at source/Playnite/Controllers/GenericGameController.cs:91
{
var emulator = database.Emulators[action.EmulatorId];
if (emulator == null)
{
throw new Exception("Emulator not found.");
}
currentEmuProfile = null;
if (action.SelectedEmulatorProfile is CustomEmulatorProfile customProfile)
{
currentEmuProfile = customProfile;
}
else if (action.SelectedEmulatorProfile is BuiltInEmulatorProfile builtinProfile)
{
currentEmuProfile = builtinProfile;
}
else
{
throw new Exception("Uknown play action configuration.");
}
emulator = emulator.GetClone();
if (!emulator.InstallDir.IsNullOrEmpty())
{
emulator.InstallDir = Paths.FixSeparators(emulator.InstallDir.Replace(ExpandableVariables.PlayniteDirectory, PlaynitePaths.ProgramPath));
emulator.InstallDir = CheckPath(emulator.InstallDir, nameof(emulator.InstallDir), FileSystemItem.Directory);
emulator.InstallDir = emulator.InstallDir.TrimEnd(Path.DirectorySeparatorChar);
}
StartingArgs = startingArgs;
var startupPath = "";
var startupArgs = "";
var startupDir = "";
var romPath = Game.ExpandVariables(action.SelectedRomPath, true, emulator.InstallDir, null);
// This is later passed to an emulator so it's up to it how it processes long paths.
romPath = Paths.TrimLongPathPrefix(CheckPath(romPath, "ROM", FileSystemItem.File));
View on GitHub (pinned to 5911f4e964)
Solutions
- Check action.SelectedEmulatorProfile is one of the two supported types before launching.
- Re-select or recreate the emulator profile on the game's play action.
- Update Playnite/plugins so profile types align with the installed version.
- Repair the game database if the profile field is corrupted.
Example fix
// before
controller.StartEmulator(action, asyncExec, args);
// after — type-check the profile before launching
var p = action.SelectedEmulatorProfile;
if (!(p is CustomEmulatorProfile) && !(p is BuiltInEmulatorProfile))
{
dialogs.ShowMessage("The emulator profile for this game is invalid. Please reconfigure it.");
return;
}
controller.StartEmulator(action, asyncExec, args); Defensive patterns
Strategy: type-guard
Validate before calling
var p = action.SelectedEmulatorProfile;
if (!(p is CustomEmulatorProfile) && !(p is BuiltInEmulatorProfile)) throw new InvalidOperationException("Unsupported profile type"); Type guard
static bool IsKnownProfile(EmulatorProfile p) => p is CustomEmulatorProfile || p is BuiltInEmulatorProfile;
Try / catch
try { controller.StartEmulator(action, asyncExec, args); }
catch (Exception ex) when (!(action.SelectedEmulatorProfile is CustomEmulatorProfile || action.SelectedEmulatorProfile is BuiltInEmulatorProfile)) { dialogs.ShowMessage("Invalid emulator profile. Reconfigure it."); } Prevention
- Type-check the profile before launching.
- Re-select profiles after Playnite/plugin version changes.
- Repair the database when profile fields are corrupted.
When it happens
Trigger: A play action whose SelectedEmulatorProfile is null or an unexpected subtype (schema change, plugin-supplied profile type, or deserialization into a base/incompatible type).
Common situations: Database schema/plugin version mismatch producing a profile of an unexpected type; action authored by an older/newer version; null profile after a partial DB edit.
Related errors
- Emulator not found.
- Can't find built-in {builtIn.BuiltInProfileName} emulator pr
- Emulator startup script not found.
- Specified emulator config does't exists.
- Backup output path not specified!
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/5d197e1a442fdfeb.
Report an issue: GitHub.