{"record":{"id":"596df7936c4f05ed","repo":"babalae/better-genshin-impact","slug":"error-596df7","errorCode":null,"errorMessage":"无法领取奖励","messagePattern":"无法领取奖励","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":691,"sourceCode":"    }\n\n    private async Task ExecutePath(PathInfo path)\n    {\n        foreach (var routePath in path.Routes)\n        {\n            await RunPathingFile(routePath);\n        }\n\n        var lastRoute = path.Routes.Last();\n        var targetRoute = BuildTargetRoute(lastRoute);\n        var rerunRoute = BuildRerunRoute(lastRoute);\n        var fromTeleportStart = \"teleport\".Equals(path.StartNode.Type, StringComparison.OrdinalIgnoreCase);\n        await ProcessLeyLineOutcrop(_taskParam.FightConfig.Timeout, targetRoute, rerunRoute, fromTeleportStart);\n\n        var rewardSuccess = await AttemptReward();\n        if (!rewardSuccess)\n        {\n            throw new Exception(\"无法领取奖励\");\n        }\n\n        await TryScanDropsAfterReward();\n        _consecutiveFailureCount = 0;\n    }\n\n    private static string BuildTargetRoute(string routePath)\n    {\n        return routePath\n            .Replace(\"assets/pathing/\", \"assets/pathing/target/\", StringComparison.OrdinalIgnoreCase)\n            .Replace(\"-rerun\", \"\", StringComparison.OrdinalIgnoreCase);\n    }\n\n    private static string BuildRerunRoute(string routePath)\n    {\n        var rerunRoute = routePath\n            .Replace(\"assets/pathing/target/\", \"assets/pathing/rerun/\", StringComparison.OrdinalIgnoreCase)\n            .Replace(\"assets/pathing/\", \"assets/pathing/rerun/\", StringComparison.OrdinalIgnoreCase);","sourceCodeStart":673,"sourceCodeEnd":709,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L673-L709","documentation":"Thrown by ExecutePath when AttemptReward returns false. AttemptReward tries to claim the ley line reward: it presses the interact key, verifies the reward page via OCR, then calls TryUseRewardResin. If after 3 retries the reward page cannot be verified, or if TryUseRewardResin fails (e.g. insufficient resin of the expected type, resin-use UI not detected), it returns false, and ExecutePath throws this exception. The reward claim is the final step of each ley line run.","triggerScenarios":"ExecutePath navigates to the blossom, runs ProcessLeyLineOutcrop (combat), then calls AttemptReward. Fires when: (1) the reward prompt was not detected on screen after 3 interaction+navigation retries, or (2) the resin-use confirmation failed (TryUseRewardResin returned false, possibly because the resin-use button wasn't found or there's no resin).","commonSituations":"The character is not standing close enough to the blossom to trigger the interact prompt; a game animation/dialogue blocked the reward page; the OCR for the reward prompt failed; condensed resin was expected but not available; the game was desynced or lagging causing the reward UI to not appear in time; a game update changed the reward UI layout.","solutions":["Ensure the character lands close to the ley line blossom after combat (check the pathing route's final position).","Verify you have the correct resin type (original or condensed) available.","If the issue is intermittent, increase retry counts or add a delay before AttemptReward.","Check the reward-page OCR template/recognition logic if the UI appears but is not detected.","Manually test claiming a ley line reward to rule out a game-side issue."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before claiming reward, verify the character is near the blossom\nvar rewardSuccess = await AttemptReward();\nif (!rewardSuccess)\n{\n    Logger.LogWarning(\"首次领取奖励失败，尝试重新接近并重试\");\n    // re-navigate and retry once more before failing\n}","typeGuard":null,"tryCatchPattern":"catch (Exception ex) when (ex.Message.Contains(\"无法领取奖励\"))\n{\n    logger.LogWarning(ex, \"无法领取奖励，记录后继续寻找下一条地脉花\");\n    await EnsureExitRewardPage();\n    continue; // move to the next ley line instead of terminating\n}","preventionTips":["Ensure the pathing route lands the character close enough to the blossom for interaction.","Verify resin availability (original or condensed) before the reward step.","If the reward UI is intermittently not detected, increase AttemptReward's max retry count or add pre-interaction delays.","Keep reward-page OCR templates updated if the game UI changes."],"tags":["ley-line","reward","ocr","resin","retry-exhausted"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}