{"record":{"id":"698237ec4b20780e","repo":"FuelLabs/fuels-rs","slug":"failed-to-extract-wasm-executor-from-the-archive","errorCode":null,"errorMessage":"Failed to extract wasm executor from the archive","messagePattern":"Failed to extract wasm executor from the archive","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"e2e/build.rs","lineNumber":83,"sourceCode":"        ))\n        .join(Self::EXECUTOR_FILE_NAME);\n\n        for entry in archive.entries()? {\n            let mut entry = entry?;\n\n            if entry.path()? == executor_in_tar {\n                entry.unpack(self.executor_path())?;\n                std::fs::write(\n                    self.version_path(),\n                    format!(\"{SUPPORTED_FUEL_CORE_VERSION}\"),\n                )?;\n\n                extracted = true;\n                break;\n            }\n        }\n        if !extracted {\n            anyhow::bail!(\"Failed to extract wasm executor from the archive\");\n        }\n\n        Ok(())\n    }\n\n    fn make_cargo_watch_downloaded_files(&self) {\n        let executor_path = self.executor_path();\n        println!(\"cargo:rerun-if-changed={}\", executor_path.display());\n\n        let version_path = self.version_path();\n        println!(\"cargo:rerun-if-changed={}\", version_path.display());\n    }\n\n    fn executor_path(&self) -> PathBuf {\n        self.dir.join(Self::EXECUTOR_FILE_NAME)\n    }\n\n    fn version_path(&self) -> PathBuf {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/FuelLabs/fuels-rs/blob/d9a250a51818dda64bfeb5ef7cc19cf27bdcd623/e2e/build.rs#L65-L101","documentation":"Thrown by the e2e build script after a successful download: the tar.gz was fetched and scanned, but no entry matched the expected path fuel-core-<VERSION>-x86_64-unknown-linux-gnu/fuel-core-wasm-executor.wasm. It means the release artifact was downloaded fine but its internal layout does not contain the executor at the expected location.","triggerScenarios":"The fuel-core release tarball for SUPPORTED_FUEL_CORE_VERSION ships with a different directory name or no fuel-core-wasm-executor.wasm at the archive root (e.g. the wasm executor was moved to a separate release asset, the top-level folder was renamed, or an unrelated/HTML error page was served with a 200 status and parsed as a tar).","commonSituations":"Upgrading the SDK to a fuel-core version whose packaging changed; a mirror/proxy returning an HTML body with status 200; release-asset naming drift between fuel-core versions.","solutions":["Inspect what you actually downloaded: curl the same URL and run `tar -tzf fuel-core-*.tar.gz | grep wasm` to see the real internal path.","If the executor lives elsewhere or in a separate asset, update e2e/build.rs (executor_in_tar / LINK_TEMPLATE) or upgrade the fuels repo to a revision matching the new layout.","If the downloaded file is HTML (proxy error page), fix the network path and re-download.","Pre-seed OUT_DIR with the executor and version file as a local workaround."],"exampleFix":"# diagnose the archive layout\ncurl -fL \"$EXECUTOR_URL\" -o /tmp/fc.tar.gz\ntar -tzf /tmp/fc.tar.gz | grep -i wasm\n# after: if the path differs, adjust executor_in_tar in e2e/build.rs to the actual entry, e.g.\n# let executor_in_tar = Path::new(\"fuel-core-wasm-executor.wasm\");","handlingStrategy":"validation","validationCode":"let url = format!(\"https://github.com/FuelLabs/fuel-core/releases/download/v{V}/fuel-core-{V}-x86_64-unknown-linux-gnu.tar.gz\");\nlet bytes = reqwest::blocking::get(&url)?.error_for_status()?.bytes()?;\nlet mut arch = tar::Archive::new(flate2::read::GzDecoder::new(&bytes[..]));\nlet expected = format!(\"fuel-core-{V}-x86_64-unknown-linux-gnu/fuel-core-wasm-executor.wasm\");\nassert!(arch.entries()?.any(|e| e.unwrap().path().unwrap().to_str() == Some(&expected)), \"archive layout changed\");","typeGuard":null,"tryCatchPattern":"match downloader.download() {\n    Err(e) if e.to_string().contains(\"Failed to extract\") => {\n        eprintln!(\"archive layout drift — inspect with: tar -tzf <downloaded> | grep wasm\");\n        std::process::exit(1);\n    }\n    other => other,\n}","preventionTips":["After bumping SUPPORTED_FUEL_CORE_VERSION, locally verify the new tarball still contains the executor at the expected path before pushing.","Treat an unexpected archive layout as a packaging change, not a flake — check the fuel-core release notes."],"tags":["build-script","tar","fuel-core","packaging","e2e"],"backgroundTag":null,"analyzedSha":"d9a250a51818dda64bfeb5ef7cc19cf27bdcd623","analyzedAt":"2026-08-16T09:49:30.618Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}