FuelLabs/fuels-rs · error · anyhow::Error
Failed to download wasm executor: {}
Error message
Failed to download wasm executor: {} What it means
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.
Source
Thrown at e2e/build.rs:55
}
Ok(false)
}
pub fn download(&self) -> anyhow::Result<()> {
std::fs::create_dir_all(&self.dir)?;
const LINK_TEMPLATE: &str = "https://github.com/FuelLabs/fuel-core/releases/download/vVERSION/fuel-core-VERSION-x86_64-unknown-linux-gnu.tar.gz";
let link = LINK_TEMPLATE.replace("VERSION", &SUPPORTED_FUEL_CORE_VERSION.to_string());
let response = reqwest::blocking::Client::builder()
.timeout(std::time::Duration::from_secs(60))
.build()?
.get(link)
.send()?;
if !response.status().is_success() {
anyhow::bail!("Failed to download wasm executor: {}", response.status());
}
let mut content = Cursor::new(response.bytes()?);
let mut archive = Archive::new(GzDecoder::new(&mut content));
let mut extracted = false;
let executor_in_tar = Path::new(&format!(
"fuel-core-{SUPPORTED_FUEL_CORE_VERSION}-x86_64-unknown-linux-gnu"
))
.join(Self::EXECUTOR_FILE_NAME);
for entry in archive.entries()? {
let mut entry = entry?;
if entry.path()? == executor_in_tar {
entry.unpack(self.executor_path())?;
std::fs::write(View on GitHub (pinned to d9a250a518)
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.
Example fix
# before: build fails with 'Failed to download wasm executor: 404 Not Found' curl -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 # after: pre-seed OUT_DIR so the build script skips the download OUT_DIR=$(cargo metadata --format-version 1 | jq -r '.target_directory')/debug/build/<e2e-hash>/out tar -xzf /tmp/fc.tar.gz -C /tmp/fc mkdir -p "$OUT_DIR" && cp /tmp/fc/fuel-core-*/fuel-core-wasm-executor.wasm "$OUT_DIR/" echo "0.40.0" > "$OUT_DIR/fuel-core-wasm-executor.version"
Defensive patterns
Strategy: retry
Validate before calling
const URL: &str = format!("https://github.com/FuelLabs/fuel-core/releases/download/v{V}/fuel-core-{V}-x86_64-unknown-linux-gnu.tar.gz");
let status = reqwest::blocking::head(&URL).send().map(|r| r.status());
if let Ok(s) = &status { assert!(s.is_success(), "release asset unreachable: {s}"); } Try / catch
for attempt in 1..=3 {
match run_build() {
Err(e) if e.to_string().contains("Failed to download wasm executor") && attempt < 3 => {
std::thread::sleep(backoff(attempt)); continue;
}
other => break other,
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to extract wasm executor from the archive
- key arn missing from response
- Failed to deploy the contract
AI-assisted analysis of FuelLabs/fuels-rs@d9a250a518 (2026-08-16).
Data as JSON: /api/errors/a24563e3a04708cd.
Report an issue: GitHub.