babalae/better-genshin-impact · error · TimeoutException
单次传送超过 {TeleportTimeoutMs / 1000} 秒
Error message
单次传送超过 {TeleportTimeoutMs / 1000} 秒 What it means
TimeoutException from Tp when the linked cancellation token (timeoutCts, CancelAfter(TeleportTimeoutMs=60_000)) fires before TpWithRetries completes, and the parent token ct is NOT cancelled. A single teleport sequence taking over 60s is treated as hung. The original OperationCanceledException is wrapped as the inner exception.
Source
Thrown at BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs:1200
await Delay(BigMapOpenCheckIntervalMs, ct);
}
return false;
}
public async Task<(double, double)> Tp(double tpX, double tpY, string mapName = "Teyvat", bool force = false)
{
using var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(ct);
timeoutCts.CancelAfter(TeleportTimeoutMs);
try
{
return await new TpTask(timeoutCts.Token).TpWithRetries(tpX, tpY, mapName, force);
}
catch (OperationCanceledException e) when (!ct.IsCancellationRequested && timeoutCts.IsCancellationRequested)
{
throw new TimeoutException($"单次传送超过 {TeleportTimeoutMs / 1000} 秒", e);
}
}
private async Task<(double, double)> TpWithRetries(double tpX, double tpY, string mapName, bool force)
{
for (var i = 0; i < 3; i++)
{
try
{
return await TpOnce(tpX, tpY, mapName, force);
}
catch (TpPointNotActivate e)
{
// 未激活点位的详情面板会遮挡后续地图操作,重试前先关闭。
// 最后一次失败也需要执行清理,避免影响脚本组中的下一个任务。
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_ESCAPE);
await Delay(300, ct);
// throw; // 不抛出异常,继续重试View on GitHub (pinned to a7cb36712d)
Solutions
- Retry the overall task — transient map-loading stalls are common.
- Ensure input injection (key + mouse) reaches Genshin (focus, privileges).
- Run at 1920x1080 so detection loops converge faster (fewer pan/zoom retries).
- If consistently timing out, raise TeleportTimeoutMs for slow hardware.
- Check the game is not paused, in a loading screen, or blocked by an overlay during teleport.
Defensive patterns
Strategy: retry
Try / catch
try { await tp.Tp(x, y, mapName, force); }
catch (TimeoutException e) when (e.Message.Contains("单次传送超过"))
{ /* single TP hung; return to main UI and retry the whole route */ } Prevention
- Ensure input injection reaches the game so teleport steps converge fast.
- Run at 1920x1080 to minimize pan/zoom retries inside the TP pipeline.
- Raise TeleportTimeoutMs on slow hardware; confirm the game is not paused/loading.
When it happens
Trigger: TpWithRetries → TpOnce stuck in a zoom/click/wait loop that never converges; map-loading hangs; WaitForTeleportPanelAndConfirm looping the full panel timeout on every retry; input injection stalled so map never opens. Anything in the teleport pipeline exceeding the 60s budget.
Common situations: Slow/struggling machine where map open + zoom + click + panel wait > 60s; teleport point at an extreme edge needing many pan retries; game paused/frozen mid-teleport; input not reaching the game so each retry burns the full timeout.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- 等待传送点交互面板超时
- 地图缩放未到传送点显示级别
- 目标传送点位于不可点击区域,传送失败
- 地图图标绝对坐标匹配失败
- Raw Input 采集线程初始化超过 {InitializationTimeout.TotalSeconds:0} 秒
AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13).
Data as JSON: /api/errors/86f906489458c65e.
Report an issue: GitHub.