babalae/better-genshin-impact · error · Exception

大地图打开失败

Error message

大地图打开失败

What it means

Thrown when opening the big map via the adventurer handbook fails on all attempts. The loop opens the handbook, selects the country/type, clicks track, and calls TryOpenBigMapFromHandbook; when retry reaches the final attempt (retry >= 2) without success, it throws.

Source

Thrown at BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs:2242

    private async Task FindLeyLineOutcropByBook(string country, string type)
    {
        await OpenLeyLineOutcropCountryInHandbook(country, type);

        for (var retry = 0; retry < 3; retry++)
        {
            if (await TryOpenBigMapFromHandbook())
            {
                break;
            }

            if (retry < 2)
            {
                _logger.LogDebug("通过冒险之证打开大地图失败,重新打开冒险之证,第{Retry}次", retry + 1);
                await OpenLeyLineOutcropCountryInHandbook(country, type);
            }
            else
            {
                throw new Exception("大地图打开失败");
            }
        }

        var center = _tpTask.GetBigMapCenterPoint(MapTypes.Teyvat.ToString());
        _leyLineX = center.X;
        _leyLineY = center.Y;

        await CancelTrackingInMap();
    }

    private async Task OpenLeyLineOutcropCountryInHandbook(string country, string type)
    {
        await _returnMainUiTask.Start(_ct);
        await Delay(1000, _ct);

        Simulation.SendInput.SimulateAction(GIActions.OpenAdventurerHandbook);
        await Delay(2500, _ct);

View on GitHub (pinned to a7cb36712d)

Solutions

  1. Update the handbook button icon templates to match the current game version.
  2. Verify the handbook is opened on the correct tab (ley-line / challenges) before track is clicked.
  3. Check FindHandbookTrackActionButtonByIcon recognition thresholds.
  4. Fall back to opening the big map directly if the handbook path is unreliable.
Defensive patterns

Strategy: retry

Try / catch

try { /* open map via handbook */ }
catch (Exception ex) when (ex.Message == "大地图打开失败")
{
    _logger.LogWarning("通过冒险之证打开大地图失败,尝试直接打开大地图");
    await _tpTask.OpenBigMapUi();
}

Prevention

When it happens

Trigger: TryOpenBigMapFromHandbook returns false across retries; on the last iteration (retry == 2) the else branch throws '大地图打开失败'.

Common situations: The handbook UI changed in a game update; the track-action button icon isn't found (FindHandbookTrackActionButtonByIcon returns null); clicks land on the wrong element; handbook tab not on the ley-line page.

Related errors


AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13). Data as JSON: /api/errors/2cc0e7c0b20b5e42. Report an issue: GitHub.