{"record":{"id":"a9e9acdb2d9c41f5","repo":"CoplayDev/unity-mcp","slug":"manifest-template-not-found-manifest-template","errorCode":null,"errorMessage":"Manifest template not found: {MANIFEST_TEMPLATE}","messagePattern":"Manifest template not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"tools/generate_mcpb.py","lineNumber":33,"sourceCode":"from __future__ import annotations\n\nimport argparse\nimport json\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nfrom pathlib import Path\n\nREPO_ROOT = Path(__file__).resolve().parents[1]\nDEFAULT_ICON = REPO_ROOT / \"docs\" / \"images\" / \"coplay-logo.png\"\nMANIFEST_TEMPLATE = REPO_ROOT / \"manifest.json\"\n\n\ndef create_manifest(version: str, icon_filename: str) -> dict:\n    \"\"\"Create manifest.json content with the specified version.\"\"\"\n    if not MANIFEST_TEMPLATE.exists():\n        raise FileNotFoundError(f\"Manifest template not found: {MANIFEST_TEMPLATE}\")\n\n    manifest = json.loads(MANIFEST_TEMPLATE.read_text(encoding=\"utf-8\"))\n    manifest[\"version\"] = version\n    manifest[\"icon\"] = icon_filename\n    return manifest\n\n\ndef generate_mcpb(\n    version: str,\n    output_path: Path,\n    icon_path: Path,\n) -> Path:\n    \"\"\"Generate MCPB bundle file.\n\n    Args:\n        version: Semantic version string (e.g., \"9.0.8\")\n        output_path: Output path for the .mcpb file\n        icon_path: Path to the icon file","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/tools/generate_mcpb.py#L15-L51","documentation":"Raised by create_manifest in tools/generate_mcpb.py when the repo's manifest.json template (REPO_ROOT/manifest.json) does not exist. The MCPB bundle is assembled from this template plus a version and icon, so a missing template aborts generation early.","triggerScenarios":"tools/generate_mcpb.py is run, MANIFEST_TEMPLATE.exists() is false. Happens when the script is run outside a full checkout, the template was deleted/renamed, or REPO_ROOT resolves wrongly (script moved out of tools/).","commonSituations":"Partial/shallow clone missing manifest.json; running a copied generate_mcpb.py from outside the repo; manifest.json was gitignored or removed in a release prep branch.","solutions":["Run generate_mcpb.py from within the repository so REPO_ROOT/manifest.json resolves.","Restore manifest.json from git (git checkout HEAD -- manifest.json) if it was removed.","If releasing from a trimmed export, ensure manifest.json is included in the export."],"exampleFix":"# before\npython /tmp/exported/generate_mcpb.py 9.0.8  # no manifest.json present\n# after\npython tools/generate_mcpb.py 9.0.8  # run in repo root where manifest.json exists","handlingStrategy":"validation","validationCode":"if not MANIFEST_TEMPLATE.exists():\n    raise SystemExit(f'missing template {MANIFEST_TEMPLATE}; run from the repo root')","typeGuard":"def template_present(p: pathlib.Path) -> bool:\n    return p.exists()","tryCatchPattern":"try:\n    create_manifest(version, icon_filename)\nexcept FileNotFoundError as e:\n    print(e); sys.exit(1)","preventionTips":["Run release tooling from the repo root","Keep manifest.json tracked in the repo","Verify REPO_ROOT resolution when relocating the script"],"tags":["tooling","release","filesystem","mcpb"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}