{"record":{"id":"10272ea8db2678ed","repo":"DioxusLabs/dioxus","slug":"cannot-download-component-registry-while-offl","errorCode":null,"errorMessage":"Cannot download component registry '{}' while offline","messagePattern":"Cannot download component registry '(.+?)' while offline","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli/component.rs","lineNumber":363,"sourceCode":"    /// The revision of the component registry\n    #[arg(long)]\n    rev: Option<String>,\n}\n\nimpl RemoteComponentRegistry {\n    /// Resolve the path to the component registry, downloading the remote registry if needed\n    async fn resolve(&self) -> Result<PathBuf> {\n        // If a git url is provided use that (plus optional rev)\n        // Otherwise use the built-in registry\n        let (git, rev) = self.resolve_or_default();\n\n        let repo_dir = Workspace::component_cache_path(&git, rev.as_deref());\n\n        // If the repo already exists, use it otherwise clone it\n        if !repo_dir.exists() {\n            // If offline, we cannot download the registry\n            if verbosity_or_default().offline {\n                bail!(\"Cannot download component registry '{}' while offline\", git);\n            }\n\n            // Make sure the parent directory exists\n            tokio::fs::create_dir_all(&repo_dir).await?;\n            tokio::task::spawn_blocking({\n                let git = git.clone();\n                let repo_dir = repo_dir.clone();\n                move || {\n                    println!(\"Downloading {git}...\");\n\n                    // Clone the repo\n                    let repo = Repository::clone(&git, repo_dir)?;\n\n                    // If a rev is provided, checkout that rev\n                    if let Some(rev) = &rev {\n                        Self::checkout_rev(&repo, &git, rev)?;\n                    }\n","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/cli/component.rs#L345-L381","documentation":"Offline guard in RemoteComponentRegistry::resolve (called from update): the component registry repository is not present in the local cache and needs to be cloned, but the CLI is running in offline mode so no network fetch is permitted. The inputs at fault are the registry git URL (and optional rev) that cannot be downloaded under the offline constraint.","triggerScenarios":"Thrown at packages/cli/src/cli/component.rs:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The component registry cannot be downloaded offline. Run the command again with network access."],"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-14T05:17:10.506Z"}