{"record":{"id":"88ce9107d1562f93","repo":"rust-lang/rust","slug":"unable-to-parse-transfer-manifest","errorCode":null,"errorMessage":"Unable to parse transfer manifest","messagePattern":"Unable to parse transfer manifest","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"src/ci/docker/scripts/fuchsia-test-runner.py","lineNumber":525,"sourceCode":"                    \"--machine\",\n                    \"json\",\n                    \"product\",\n                    \"lookup\",\n                    product_name,\n                    sdk_version,\n                    \"--base-url\",\n                    \"gs://fuchsia/development/\" + sdk_version,\n                ],\n                env=ffx_env,\n                stdout_handler=self.subprocess_logger.debug,\n                stderr_handler=self.subprocess_logger.debug,\n            )\n\n            try:\n                transfer_manifest_url = json.loads(output)[\"transfer_manifest_url\"]\n            except Exception as e:\n                print(e)\n                raise Exception(\"Unable to parse transfer manifest\") from e\n\n            # Download the product bundle.\n            self.env_logger.info(\"Downloading the product bundle...\")\n            check_call_with_logging(\n                [\n                    ffx_path,\n                    \"product\",\n                    \"download\",\n                    transfer_manifest_url,\n                    self.local_pb_path,\n                ],\n                env=ffx_env,\n                stdout_handler=self.subprocess_logger.debug,\n                stderr_handler=self.subprocess_logger.debug,\n            )\n\n        # Start emulator\n        self.env_logger.info(\"Starting emulator...\")","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/ci/docker/scripts/fuchsia-test-runner.py#L507-L543","documentation":"Raised by TestEnvironment.start() when json.loads(output) or the subsequent ['transfer_manifest_url'] access on ffx's 'product lookup' JSON output fails. The runner looks up the product bundle transfer manifest URL from ffx to download the emulator image; any parsing/key failure is fatal because there is no URL to download. The original exception is chained via 'raise ... from e'.","triggerScenarios":"Reached at fuchsia-test-runner.py:521-525 during 'start' when use_local_pb is false or the local product bundle path does not exist. ffx product lookup returned output that is not JSON, or JSON missing the 'transfer_manifest_url' key (e.g. an error payload, empty output, or a schema change in a newer ffx).","commonSituations":"SDK/ffx version mismatch (ffx returns an error object instead of a lookup result); no network access so ffx emitted a connection error to stdout; product name / SDK version do not exist in the catalog; ffx authentication to the storage backend failed; ffx output schema changed between SDK releases.","solutions":["Run the exact ffx command manually to see the raw output: `ffx --machine json product lookup minimal.{arch} {sdk_version} --base-url gs://fuchsia/development/{sdk_version}` and inspect the JSON.","Confirm the SDK version (read from {sdk_dir}/meta/manifest.json 'id') actually exists in the gs://fuchsia/development catalog.","Authenticate ffx / ensure network and GCS access, then retry 'start'.","Use --use-local-product-bundle-if-exists with a pre-downloaded bundle to bypass the lookup entirely.","Update fuchsia-test-runner.py to match a newer ffx output schema if the key was renamed."],"exampleFix":"// before\n$ fuchsia-test-runner.py start --sdk ... --target aarch64-unknown-fuchsia ...\n# Exception: Unable to parse transfer manifest\n\n// after - reproduce the ffx call to see the real error\n$ ffx --machine json product lookup minimal.arm64 <sdk_id> --base-url gs://fuchsia/development/<sdk_id>\n# fix auth / network / version, then re-run start","handlingStrategy":"try-catch","validationCode":"import json, subprocess\n\nout = subprocess.run(\n    [ffx_path, \"--machine\", \"json\", \"product\", \"lookup\", product_name, sdk_version,\n     \"--base-url\", f\"gs://fuchsia/development/{sdk_version}\"],\n    stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=ffx_env,\n).stdout\ntry:\n    url = json.loads(out)[\"transfer_manifest_url\"]\nexcept Exception:\n    raise SystemExit(f\"ffx product lookup did not return a transfer_manifest_url; raw output:\\n{out!r}\")","typeGuard":"def has_transfer_manifest_url(payload) -> bool:\n    return isinstance(payload, dict) and isinstance(payload.get(\"transfer_manifest_url\"), str)","tryCatchPattern":"try:\n    test_env.start()\nexcept Exception as e:\n    if \"Unable to parse transfer manifest\" in str(e):\n        logging.error(\"ffx product lookup failed; check SDK version, network, and ffx auth.\")\n    raise","preventionTips":["Pre-download the product bundle and pass --use-local-product-bundle-if-exists for offline/reproducible runs.","Pin a known-good SDK version rather than latest.","Smoke-test `ffx product lookup` manually after any SDK/ffx upgrade."],"tags":["fuchsia","ffx","json","network","product-bundle"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}