{"record":{"id":"a24563e3a04708cd","repo":"FuelLabs/fuels-rs","slug":"failed-to-download-wasm-executor","errorCode":null,"errorMessage":"Failed to download wasm executor: {}","messagePattern":"Failed to download wasm executor: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"e2e/build.rs","lineNumber":55,"sourceCode":"        }\n\n        Ok(false)\n    }\n\n    pub fn download(&self) -> anyhow::Result<()> {\n        std::fs::create_dir_all(&self.dir)?;\n\n        const LINK_TEMPLATE: &str = \"https://github.com/FuelLabs/fuel-core/releases/download/vVERSION/fuel-core-VERSION-x86_64-unknown-linux-gnu.tar.gz\";\n        let link = LINK_TEMPLATE.replace(\"VERSION\", &SUPPORTED_FUEL_CORE_VERSION.to_string());\n\n        let response = reqwest::blocking::Client::builder()\n            .timeout(std::time::Duration::from_secs(60))\n            .build()?\n            .get(link)\n            .send()?;\n\n        if !response.status().is_success() {\n            anyhow::bail!(\"Failed to download wasm executor: {}\", response.status());\n        }\n\n        let mut content = Cursor::new(response.bytes()?);\n\n        let mut archive = Archive::new(GzDecoder::new(&mut content));\n\n        let mut extracted = false;\n        let executor_in_tar = Path::new(&format!(\n            \"fuel-core-{SUPPORTED_FUEL_CORE_VERSION}-x86_64-unknown-linux-gnu\"\n        ))\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(","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/FuelLabs/fuels-rs/blob/d9a250a51818dda64bfeb5ef7cc19cf27bdcd623/e2e/build.rs#L37-L73","documentation":"Thrown by the e2e test build script (e2e/build.rs) when downloading the fuel-core wasm executor from GitHub releases. The HTTP request completed but returned a non-success status code, which is embedded in the message (e.g. 404 or 403). This blocks compilation of the e2e test crate because the executor wasm is needed in OUT_DIR.","triggerScenarios":"cargo build/test of the e2e crate when OUT_DIR lacks fuel-core-wasm-executor.wasm or the saved version file does not match SUPPORTED_FUEL_CORE_VERSION, and the GET to https://github.com/FuelLabs/fuel-core/releases/download/vVERSION/fuel-core-VERSION-x86_64-unknown-linux-gnu.tar.gz returns 404 (release/asset missing for that version), 403 (GitHub rate limit), or a proxy/gateway error.","commonSituations":"Building on CI behind a restrictive proxy or offline environment; GitHub API rate limiting shared CI IPs; the fuel-core release for the SDK's pinned SUPPORTED_FUEL_CORE_VERSION not yet published or with renamed assets; a version bump in fuels-account/provider that outpaces the released artifacts.","solutions":["Check the embedded HTTP status: 404 means the release asset for SUPPORTED_FUEL_CORE_VERSION does not exist (verify the URL in a browser/curl); 403 usually means GitHub rate limiting — wait or change network/IP.","Ensure outbound HTTPS to github.com is allowed (proxy/firewall/CI allowlist) and retry the build.","If the version asset genuinely does not exist, update the SDK to a version whose SUPPORTED_FUEL_CORE_VERSION has published linux tarballs.","As a workaround, manually download the tarball, extract fuel-core-wasm-executor.wasm into the crate's OUT_DIR, and write the matching semver string into the version file next to it so should_download() returns false."],"exampleFix":"# before: build fails with 'Failed to download wasm executor: 404 Not Found'\ncurl -fL \"https://github.com/FuelLabs/fuel-core/releases/download/v0.40.0/fuel-core-0.40.0-x86_64-unknown-linux-gnu.tar.gz\" -o /tmp/fc.tar.gz\n# after: pre-seed OUT_DIR so the build script skips the download\nOUT_DIR=$(cargo metadata --format-version 1 | jq -r '.target_directory')/debug/build/<e2e-hash>/out\ntar -xzf /tmp/fc.tar.gz -C /tmp/fc\nmkdir -p \"$OUT_DIR\" && cp /tmp/fc/fuel-core-*/fuel-core-wasm-executor.wasm \"$OUT_DIR/\"\necho \"0.40.0\" > \"$OUT_DIR/fuel-core-wasm-executor.version\"","handlingStrategy":"retry","validationCode":"const URL: &str = format!(\"https://github.com/FuelLabs/fuel-core/releases/download/v{V}/fuel-core-{V}-x86_64-unknown-linux-gnu.tar.gz\");\nlet status = reqwest::blocking::head(&URL).send().map(|r| r.status());\nif let Ok(s) = &status { assert!(s.is_success(), \"release asset unreachable: {s}\"); }","typeGuard":null,"tryCatchPattern":"for attempt in 1..=3 {\n    match run_build() {\n        Err(e) if e.to_string().contains(\"Failed to download wasm executor\") && attempt < 3 => {\n            std::thread::sleep(backoff(attempt)); continue;\n        }\n        other => break other,\n    }\n}","preventionTips":["Pre-seede OUT_DIR with the executor wasm plus a version file matching SUPPORTED_FUEL_CORE_VERSION so CI never needs network access.","Pin the SDK version whose SUPPORTED_FUEL_CORE_VERSION has published linux tarballs; check the release URL after every upgrade.","Allowlist github.com on CI proxies and watch for GitHub rate limiting (403) on shared runner IPs."],"tags":["build-script","network","download","fuel-core","e2e"],"backgroundTag":null,"analyzedSha":"d9a250a51818dda64bfeb5ef7cc19cf27bdcd623","analyzedAt":"2026-08-16T09:49:30.618Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}