{"record":{"id":"2900c911d8a09ee3","repo":"DioxusLabs/dioxus","slug":"failed-to-parse-assets","errorCode":null,"errorMessage":"Failed to parse assets","messagePattern":"Failed to parse assets","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/wasm_opt.rs","lineNumber":169,"sourceCode":"        return Ok(\"https://github.com/WebAssembly/binaryen/releases/download/version_127/binaryen-version_127-arm64-macos.tar.gz\".to_string());\n    };\n\n    let url = \"https://api.github.com/repos/WebAssembly/binaryen/releases/latest\";\n    let client = reqwest::Client::new();\n    let response = client\n        .get(url)\n        .header(\"User-Agent\", \"dioxus-cli\")\n        .send()\n        .await?\n        .json::<serde_json::Value>()\n        .await?;\n\n    tracing::trace!(\"Response from GitHub: {:#?}\", response);\n\n    let assets = response\n        .get(\"assets\")\n        .and_then(|assets| assets.as_array())\n        .ok_or_else(|| anyhow::anyhow!(\"Failed to parse assets\"))?;\n\n    // Find the platform identifier based on the current OS and architecture\n    let platform = if cfg!(all(target_os = \"windows\", target_arch = \"x86_64\")) {\n        \"x86_64-windows\"\n    } else if cfg!(all(target_os = \"windows\", target_arch = \"aarch64\")) {\n        \"arm64-windows\"\n    } else if cfg!(all(target_os = \"linux\", target_arch = \"x86_64\")) {\n        \"x86_64-linux\"\n    } else if cfg!(all(target_os = \"linux\", target_arch = \"aarch64\")) {\n        \"aarch64-linux\"\n    } else if cfg!(all(target_os = \"macos\", target_arch = \"x86_64\")) {\n        \"x86_64-macos\"\n    } else if cfg!(all(target_os = \"macos\", target_arch = \"aarch64\")) {\n        \"arm64-macos\"\n    } else {\n        bail!(\n            \"Unknown platform for wasm-opt installation. Please install wasm-opt manually from https://github.com/WebAssembly/binaryen/releases and add it to your PATH.\"\n        );","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/wasm_opt.rs#L151-L187","documentation":"Response-shape guard in find_latest_wasm_opt_download_url (called from install_github): the GitHub releases API call succeeded, but the JSON's `assets` field could not be extracted as an array (missing or wrong type), so no downloadable binaryen artifact can be located. The input at fault is the GitHub API response body whose assets list failed to parse.","triggerScenarios":"Thrown at packages/cli/src/wasm_opt.rs:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Asset metadata could not be parsed. Rebuild with matching dioxus and dx versions."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}