babalae/better-genshin-impact · error · RetryException

未检测到进入游戏按钮消失, 可能未点击成功

Error message

未检测到进入游戏按钮消失, 可能未点击成功

What it means

Thrown when the 'EnterGame' button is found to appear but never disappears despite 120 repeated clicks at (955,666). NewRetry.WaitForElementDisappear returns false, meaning the click coordinate did not register as a successful enter.

Source

Thrown at BetterGenshinImpact/GameTask/Common/Job/ExitAndReloginJob.cs:99

            120,
            1000
        );
        if (!enterGameAppear)
        {
            throw new RetryException("未检测进入游戏界面");
        }

        // 点击进入游戏按钮直到它消失
        var waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(
            GetAutoWoodRecognitionObject("EnterGame"),
            () => GameCaptureRegion.GameRegion1080PPosClick(955, 666),
            ct,
            120,
            1000
        );
        if (!waitForEnterGameRoDisappear)
        {
            throw new RetryException("未检测到进入游戏按钮消失, 可能未点击成功");
        }


        // 等待主界面出现
        var mainUiFound = await NewRetry.WaitForElementAppear(
            ElementRecognition.Get("PaimonMenu"),
            () => { },
            ct,
            120,
            1000
        );

        if (mainUiFound)
        {
            Logger.LogInformation("退出重新登录结束!");
        }
        else
        {

View on GitHub (pinned to a7cb36712d)

Solutions

  1. Re-derive the click point from the matched EnterGame region instead of the hard-coded (955,666).
  2. Ensure the game window is focused and the process has input-injection privileges.
  3. Verify the capture is live (not a frozen frame) before each click.
  4. Increase tolerance / use the element's detected bounding-box center as the click target.

Example fix

// before
var waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(
    GetAutoWoodRecognitionObject("EnterGame"),
    () => GameCaptureRegion.GameRegion1080PPosClick(955, 666),
    ct, 120, 1000);

// after: click the detected element center, fall back to fixed point
var waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(
    GetAutoWoodRecognitionObject("EnterGame"),
    screen =>
    {
        var ro = screen.Find(GetAutoWoodRecognitionObject("EnterGame"), screen);
        if (ro.IsExist()) ro.Click();
        else GameCaptureRegion.GameRegion1080PPosClick(955, 666);
    },
    ct, 120, 1000);
Defensive patterns

Strategy: retry

Validate before calling

null

Type guard

null

Try / catch

try { await job.Run(ct); }
catch (RetryException e) when (e.Message.Contains("进入游戏按钮消失"))
{ /* focus the game window, ensure input-injection privileges, then retry */ }

Prevention

When it happens

Trigger: GetAutoWoodRecognitionObject("EnterGame") keeps matching across 120 retries while GameCaptureRegion.GameRegion1080PPosClick(955,666) fires each iteration. The button stays because the click misses it, the click is ignored, or the screen advanced to a different but similar-looking screen.

Common situations: The enter button moved (resolution/scale drift) so (955,666) no longer hits it; input injection is blocked (game window not focused, admin rights missing); a network/handshake step after the click bounces back to the enter screen; template matches a stale frame.

Related errors


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