babalae/better-genshin-impact · critical · InvalidOperationException
BvFlow 第 {i + 1} 步执行失败:{step.Description}
Error message
BvFlow 第 {i + 1} 步执行失败:{step.Description} What it means
Thrown when the MsRdpClient10 ActiveX control's AdvancedSettings7 property returns null. AdvancedSettings7 is the IMsRdpClientAdvancedSettings8 interface that exposes RDPPort, CredSSP support, Windows-key passthrough, and SmartSizing. A null return means the control instantiated but the advanced-settings interface at version 7 is not available — indicating either an incompatible/older RDP client version or the COM object being in an invalid state.
Source
Thrown at BetterGenshinImpact/Core/BgiVision/BvFlow.cs:249
for (var i = 0; i < steps.Length; i++)
{
var step = steps[i];
try
{
_services.ThrowIfCancellationRequested();
await step.Action(context);
}
catch (OperationCanceledException)
{
throw;
}
catch (NormalEndException)
{
throw;
}
catch (Exception ex)
{
throw new InvalidOperationException($"BvFlow 第 {i + 1} 步执行失败:{step.Description}", ex);
}
}
return _page;
}
finally
{
Volatile.Write(ref _isRunning, 0);
}
}
internal BvFlow AddActionStep(BvFlowActionSnapshot snapshot)
{
return AddStep(snapshot.Description, context => ExecuteActionStep(snapshot, context));
}
internal BvFlow AddOnceActionStep(string description, Func<BvFlowExecutionContext, Task> action)
{View on GitHub (pinned to a7cb36712d)
Solutions
- Check the Windows / RDP client version; AdvancedSettings7 requires RDP client 8.0+ on Windows 10.
- Register the latest mstscax.dll or install the latest RDP client update (KB).
- Gracefully degrade: try AdvancedSettings6, then AdvancedSettings5, setting only the properties each version supports.
- Inspect earlier RunComStep calls for silent failures that may have corrupted control state.
Example fix
// before
var advancedSettings = GetComProperty(client, "AdvancedSettings7")
?? throw new COMException("RDP ActiveX 未返回 AdvancedSettings7。");
// after — cascade through available versions
var advancedSettings = GetComProperty(client, "AdvancedSettings7")
?? GetComProperty(client, "AdvancedSettings6")
?? GetComProperty(client, "AdvancedSettings5");
if (advancedSettings is null)
throw new COMException("RDP ActiveX 未返回任何 AdvancedSettings 接口。"); Defensive patterns
Strategy: type-guard
Validate before calling
// Probe the highest available AdvancedSettings version before use
var advancedSettings = GetComProperty(client, "AdvancedSettings7")
?? GetComProperty(client, "AdvancedSettings6")
?? GetComProperty(client, "AdvancedSettings5");
if (advancedSettings is null) { /* disable advanced features */ } Type guard
static bool SupportsAdvancedSettings7(object client) =>
GetComProperty(client, "AdvancedSettings7") is not null; Try / catch
try { /* connect with AdvancedSettings7 */ }
catch (COMException ex) when (ex.Message.Contains("AdvancedSettings7"))
{
// fall back to AdvancedSettings5, skip unsupported properties
} Prevention
- Check RDP client version (mstsc /version) during setup; require 8.0+.
- Gracefully degrade through AdvancedSettings7→6→5 for older installations.
- Log the installed mstscax.dll version for remote diagnosis.
When it happens
Trigger: Called in ConnectToChildSession after configuring SecuredSettings2, when GetComProperty(client, "AdvancedSettings7") returns null. Happens when the registered mstscax.dll is too old to expose the AdvancedSettings7 dispatch ID, or when the ActiveX object entered an error state during earlier property sets.
Common situations: Down-level Windows (7/8/Server 2008 R2) with only AdvancedSettings through AdvancedSettings5, partially failed earlier SetComProperty calls leaving the control in a bad state, or a sandboxed/locked-down environment where COM registration is incomplete.
Related errors
- 同一个 BvFlow 不能并发执行
- BvFlow 已经开始执行,不能再添加步骤
- 当前 Windows 未提供任务计划程序 COM 服务。
- {paramName} 必须大于 0
- 动作 {snapshot.Description} 执行 {attempts} 次后,等待 {snapshot.Targ
AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13).
Data as JSON: /api/errors/cd883ac8a5fcc5f0.
Report an issue: GitHub.