{"record":{"id":"27a5f359414169d4","repo":"babalae/better-genshin-impact","slug":"error-27a5f3","errorCode":null,"errorMessage":"地图追踪文件加载失败","messagePattern":"地图追踪文件加载失败","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/Common/Job/GoToCraftingBenchTask.cs","lineNumber":235,"sourceCode":"                if (i == _retryTimes - 1)\n                {\n                    throw;\n                }\n\n                await Delay(1000, ct);\n                Logger.LogInformation(\"重试前往合成台\");\n            }\n        }\n\n        Logger.LogInformation(\"→ {Name} 结束\", Name);\n    }\n\n    public async Task GoToCraftingBenchOnce(string country, CancellationToken ct)\n    {\n        var task = PathingTask.BuildFromFilePath(Global.Absolute(@$\"GameTask\\Common\\Element\\Assets\\Json\\合成台_{country}.json\"));\n        if (task == null)\n        {\n            throw new Exception(\"地图追踪文件加载失败\");\n        }\n\n        var pathingTask = new PathExecutor(ct)\n        {\n            PartyConfig = new PathingPartyConfig\n            {\n                Enabled = true,\n                AutoSkipEnabled = true,\n                AutoRunEnabled = country != \"枫丹\",\n            },\n            EndAction = region => Bv.FindFAndPress(region, text: this.craftLocalizedString)\n        };\n        await pathingTask.Pathing(task);\n\n        await Delay(700, ct);\n        \n        // 多种尝试 责任链\n        if (!IsInCraftingTalkUi())","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/Common/Job/GoToCraftingBenchTask.cs#L217-L253","documentation":"Thrown by GoToCraftingBenchTask.GoToCraftingBenchOnce when PathingTask.BuildFromFilePath returns null for GameTask\\Common\\Element\\Assets\\Json\\合成台_{country}.json. Identical mechanism to the AdventurersGuild file-load error but for the crafting-bench pathing asset.","triggerScenarios":"PathingTask.BuildFromFilePath(Global.Absolute(@$\"...\\合成台_{country}.json\")) returns null. The country value has no shipped bench JSON, the file is missing from the deploy, or the JSON fails to parse.","commonSituations":"Unsupported/misspelled country (e.g. a region without a 合成台_*.json asset); assets folder not included in the build output; JSON corrupted by manual edit; filename encoding mismatch on a locale-sensitive filesystem.","solutions":["Confirm GameTask/Common/Element/Assets/Json/合成台_{country}.json exists for the requested country.","Whitelist country against the set of shipped bench JSON files before calling BuildFromFilePath.","If the file exists, validate it against the pathing-task schema (BuildFromFilePath returns null on parse error).","Ensure the assets are marked CopyToOutputDirectory in the project file."],"exampleFix":"// before\nvar task = PathingTask.BuildFromFilePath(Global.Absolute(@$\"GameTask\\Common\\Element\\Assets\\Json\\合成台_{country}.json\"));\nif (task == null) throw new Exception(\"地图追踪文件加载失败\");\n\n// after: include the resolved path in the message\nvar path = Global.Absolute(@$\"GameTask\\Common\\Element\\Assets\\Json\\合成台_{country}.json\");\nvar task = PathingTask.BuildFromFilePath(path);\nif (task == null) throw new Exception($\"地图追踪文件加载失败：{path}\");","handlingStrategy":"validation","validationCode":"var path = Global.Absolute(@$\"GameTask\\Common\\Element\\Assets\\Json\\合成台_{country}.json\");\nif (!File.Exists(path))\n    throw new FileNotFoundException($\"合成台路径文件缺失：{path}\", path);\nvar task = PathingTask.BuildFromFilePath(path) ?? throw new Exception(\"地图追踪文件加载失败：\" + path);","typeGuard":"static bool HasBenchPathing(string country) =>\n    File.Exists(Global.Absolute($\"GameTask/Common/Element/Assets/Json/合成台_{country}.json\"));","tryCatchPattern":"null","preventionTips":["Whitelist supported countries against the shipped 合成台_*.json filenames.","Ensure pathing assets are copied to the output directory.","Validate bench JSON against the pathing schema in the editor."],"tags":["pathing","config","assets","file-io"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}