Devolutions/UniGetUI · error · InvalidOperationException
No setting matching "{settingKey}" was found.
Error message
No setting matching "{settingKey}" was found. What it means
Thrown by ResolveSettingKey when the provided setting key does not match any visible Settings.K enum value. Matching is attempted two ways: the enum member name (e.g., 'EnableScoopCleanup') and the resolved key string from Settings.ResolveKey(candidate), both case-insensitive. Hidden settings (CurrentSessionToken, TelemetryClientToken) and Settings.K.Unset are excluded from matching.
Source
Thrown at src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs:521
{
if (!IsVisibleSetting(candidate))
{
continue;
}
if (
candidate.ToString().Equals(settingKey, StringComparison.OrdinalIgnoreCase)
|| Settings.ResolveKey(candidate).Equals(
settingKey,
StringComparison.OrdinalIgnoreCase
)
)
{
return candidate;
}
}
throw new InvalidOperationException($"No setting matching \"{settingKey}\" was found.");
}
private static IpcSettingInfo ToSettingInfo(Settings.K setting)
{
string stringValue = Settings.GetValue(setting);
bool isSet = Settings.Get(setting);
return new IpcSettingInfo
{
Name = setting.ToString(),
Key = Settings.ResolveKey(setting),
IsSet = isSet,
BoolValue = isSet,
StringValue = stringValue,
HasStringValue = !string.IsNullOrWhiteSpace(stringValue),
};
}
}View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Call ListSettings() to get all valid keys and their resolved key strings.
- Check for typos — matching is case-insensitive but otherwise exact.
- If the setting was renamed, update to the new enum name or resolved key.
Example fix
// before — using a stale or incorrect key
var info = IpcManagerSettingsApi.GetSetting("ScoopCleanup");
// after — look up the correct key
var settings = IpcManagerSettingsApi.ListSettings();
var match = settings.FirstOrDefault(s =>
s.Key.Equals("ScoopCleanup", StringComparison.OrdinalIgnoreCase)
|| s.Name.Equals("ScoopCleanup", StringComparison.OrdinalIgnoreCase));
if (match is null) throw new KeyNotFoundException("Setting not found.");
var info = IpcManagerSettingsApi.GetSetting(match.Key); Defensive patterns
Strategy: validation
Validate before calling
var validKeys = IpcManagerSettingsApi.ListSettings()
.SelectMany(s => new[] { s.Name, s.Key })
.ToHashSet(StringComparer.OrdinalIgnoreCase);
if (!validKeys.Contains(settingKey))
throw new ArgumentException($"Unknown setting key: {settingKey}"); Prevention
- Call ListSettings() to discover valid keys before using GetSetting/SetSetting/ClearSetting.
- Hidden settings (CurrentSessionToken, TelemetryClientToken) are excluded and won't match.
- Matching accepts both the enum name and the resolved key string, case-insensitively.
When it happens
Trigger: Calling GetSetting/SetSetting/ClearSetting with a key that is neither an enum member name nor a resolved key string of any visible setting. Using a deprecated setting name after an enum rename. Using a display label instead of the programmatic key.
Common situations: Setting was renamed in a newer version and old key string no longer matches. Typo in the setting key. Attempting to set a hidden setting (CurrentSessionToken/TelemetryClientToken) — these are filtered out and won't match even with the correct enum name. Using a UI-facing label instead of the programmatic key.
Related errors
- Provide exactly one of enabled or value when setting a setti
- No package manager matching "{managerName}" was found.
- No known source matching "{request.SourceName}" was found fo
- The setting key is required.
- Unsupported page \"{page}\". Supported pages: {string.Join("
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/e1d50107e86d6cae.
Report an issue: GitHub.