{"record":{"id":"c3556ee34e16315e","repo":"babalae/better-genshin-impact","slug":"error-c3556e","errorCode":null,"errorMessage":"未检测到进入游戏按钮消失, 可能未点击成功","messagePattern":"未检测到进入游戏按钮消失, 可能未点击成功","errorType":"exception","errorClass":"RetryException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/Common/Job/ExitAndReloginJob.cs","lineNumber":99,"sourceCode":"            120,\n            1000\n        );\n        if (!enterGameAppear)\n        {\n            throw new RetryException(\"未检测进入游戏界面\");\n        }\n\n        // 点击进入游戏按钮直到它消失\n        var waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(\n            GetAutoWoodRecognitionObject(\"EnterGame\"),\n            () => GameCaptureRegion.GameRegion1080PPosClick(955, 666),\n            ct,\n            120,\n            1000\n        );\n        if (!waitForEnterGameRoDisappear)\n        {\n            throw new RetryException(\"未检测到进入游戏按钮消失, 可能未点击成功\");\n        }\n\n\n        // 等待主界面出现\n        var mainUiFound = await NewRetry.WaitForElementAppear(\n            ElementRecognition.Get(\"PaimonMenu\"),\n            () => { },\n            ct,\n            120,\n            1000\n        );\n\n        if (mainUiFound)\n        {\n            Logger.LogInformation(\"退出重新登录结束！\");\n        }\n        else\n        {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/Common/Job/ExitAndReloginJob.cs#L81-L117","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-derive the click point from the matched EnterGame region instead of the hard-coded (955,666).","Ensure the game window is focused and the process has input-injection privileges.","Verify the capture is live (not a frozen frame) before each click.","Increase tolerance / use the element's detected bounding-box center as the click target."],"exampleFix":"// before\nvar waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(\n    GetAutoWoodRecognitionObject(\"EnterGame\"),\n    () => GameCaptureRegion.GameRegion1080PPosClick(955, 666),\n    ct, 120, 1000);\n\n// after: click the detected element center, fall back to fixed point\nvar waitForEnterGameRoDisappear = await NewRetry.WaitForElementDisappear(\n    GetAutoWoodRecognitionObject(\"EnterGame\"),\n    screen =>\n    {\n        var ro = screen.Find(GetAutoWoodRecognitionObject(\"EnterGame\"), screen);\n        if (ro.IsExist()) ro.Click();\n        else GameCaptureRegion.GameRegion1080PPosClick(955, 666);\n    },\n    ct, 120, 1000);","handlingStrategy":"retry","validationCode":"null","typeGuard":"null","tryCatchPattern":"try { await job.Run(ct); }\ncatch (RetryException e) when (e.Message.Contains(\"进入游戏按钮消失\"))\n{ /* focus the game window, ensure input-injection privileges, then retry */ }","preventionTips":["Click the detected EnterGame element center instead of a hard-coded coordinate.","Ensure the game window is focused and the injector has privileges.","Confirm the capture is live (frame timestamp changes) before each click."],"tags":["relogin","input-simulation","timeout","template-match"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}