babalae/better-genshin-impact · error · Exception
无法领取奖励
Error message
无法领取奖励
What it means
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.
Source
Thrown at BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs:691
}
private async Task ExecutePath(PathInfo path)
{
foreach (var routePath in path.Routes)
{
await RunPathingFile(routePath);
}
var lastRoute = path.Routes.Last();
var targetRoute = BuildTargetRoute(lastRoute);
var rerunRoute = BuildRerunRoute(lastRoute);
var fromTeleportStart = "teleport".Equals(path.StartNode.Type, StringComparison.OrdinalIgnoreCase);
await ProcessLeyLineOutcrop(_taskParam.FightConfig.Timeout, targetRoute, rerunRoute, fromTeleportStart);
var rewardSuccess = await AttemptReward();
if (!rewardSuccess)
{
throw new Exception("无法领取奖励");
}
await TryScanDropsAfterReward();
_consecutiveFailureCount = 0;
}
private static string BuildTargetRoute(string routePath)
{
return routePath
.Replace("assets/pathing/", "assets/pathing/target/", StringComparison.OrdinalIgnoreCase)
.Replace("-rerun", "", StringComparison.OrdinalIgnoreCase);
}
private static string BuildRerunRoute(string routePath)
{
var rerunRoute = routePath
.Replace("assets/pathing/target/", "assets/pathing/rerun/", StringComparison.OrdinalIgnoreCase)
.Replace("assets/pathing/", "assets/pathing/rerun/", StringComparison.OrdinalIgnoreCase);View on GitHub (pinned to a7cb36712d)
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.
Defensive patterns
Strategy: retry
Validate before calling
// Before claiming reward, verify the character is near the blossom
var rewardSuccess = await AttemptReward();
if (!rewardSuccess)
{
Logger.LogWarning("首次领取奖励失败,尝试重新接近并重试");
// re-navigate and retry once more before failing
} Try / catch
catch (Exception ex) when (ex.Message.Contains("无法领取奖励"))
{
logger.LogWarning(ex, "无法领取奖励,记录后继续寻找下一条地脉花");
await EnsureExitRewardPage();
continue; // move to the next ley line instead of terminating
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- 关闭补充原粹树脂提示超时
- 计算缺失树脂 {missingResin} 超过树脂上限 {resinLimit}
- 原粹树脂上限 OCR 失败:{countText}
- 原粹树脂上限解析失败:{countText}
- 未识别到全部恢复时间:{text}
AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13).
Data as JSON: /api/errors/596df7936c4f05ed.
Report an issue: GitHub.