JosefNemec/Playnite · error · Exception

Specified emulator config does't exists.

Error message

Specified emulator config does't exists.

What it means

Thrown (via ?? throw) when an emulator-type GameAction's EmulatorProfileId does not match any profile in emulator.AllProfiles. The emulator itself exists (error 69 passed), but the specific profile referenced by the action is missing — deleted or replaced since the action was configured.

Source

Thrown at source/Playnite/GamesEditor.cs:449

                        ProcessStarter.StartUrl(action.Path);
                        break;
                    case GameActionType.File:
                    case GameActionType.Emulator:
                    case GameActionType.Script:
                        using (var scriptRuntime = new PowerShellRuntime("Custom action runtime"))
                        using (var controller = new GenericPlayController(Database, game, scriptRuntime, Application.PlayniteApiGlobal))
                        {
                            if (action.Type == GameActionType.Emulator)
                            {
                                var emulator = Database.Emulators[action.EmulatorId];
                                if (emulator == null)
                                {
                                    throw new Exception($"Emulator not found.");
                                }

                                var prof = emulator.AllProfiles.FirstOrDefault(a => a.Id == action.EmulatorProfileId);
                                var newAction = action.GetClone<GameAction, EmulationPlayAction>();
                                newAction.SelectedEmulatorProfile = prof ?? throw new Exception("Specified emulator config does't exists.");
                                newAction.SelectedRomPath = game.Roms.HasItems() ? game.Roms[0].Path : string.Empty;
                                controller.StartEmulator(newAction, false, new SDK.Events.OnGameStartingEventArgs
                                {
                                    Game = game,
                                    SelectedRomFile = newAction.SelectedRomPath,
                                    SourceAction = action
                                });
                            }
                            else
                            {
                                controller.Start(action, false,  new SDK.Events.OnGameStartingEventArgs
                                {
                                    Game = game,
                                    SourceAction = action
                                });
                            }
                        }
                        break;

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Check that a profile with action.EmulatorProfileId exists in emulator.AllProfiles before activating.
  2. Re-select the emulator profile on the game action so the id is current.
  3. Provide a repair routine that flags game actions whose EmulatorProfileId is no longer present.

Example fix

// before
newAction.SelectedEmulatorProfile = prof ?? throw new Exception("Specified emulator config does't exists.");

// after
if (prof == null) {
    Dialogs.ShowMessage("The emulator profile for this action no longer exists. Please reconfigure it.", "Profile missing", MessageBoxButton.OK, MessageBoxImage.Warning);
    return;
}
newAction.SelectedEmulatorProfile = prof;
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the profile exists before starting an emulator action.
var prof = emulator.AllProfiles.FirstOrDefault(a => a.Id == action.EmulatorProfileId);
if (prof == null) { /* prompt user to reconfigure */ return; }

Type guard

static bool ProfileExists(Emulator emu, Guid profileId) =>
    emu.AllProfiles?.Any(a => a.Id == profileId) == true;

Prevention

When it happens

Trigger: ActivateAction on an emulator action where emulator.AllProfiles.FirstOrDefault(a => a.Id == action.EmulatorProfileId) returns null. The profile id on the action is stale relative to the emulator's current custom/built-in profiles.

Common situations: User edited/deleted an emulator profile after assigning it to a game action; profile ids regenerated on re-import; switching emulator definitions reset profile ids.

Related errors


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