{"record":{"id":"c14b525bf5485348","repo":"jdx/mise","slug":"failed-to-build-tokio-runtime","errorCode":null,"errorMessage":"failed to build tokio runtime","messagePattern":"failed to build tokio runtime","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/github/oauth.rs","lineNumber":625,"sourceCode":"        .host_str()\n        .map(|h| h.to_string())\n}\n\nfn default_poll_interval() -> u64 {\n    5\n}\n\nfn block_on<F>(future: F) -> F::Output\nwhere\n    F: std::future::Future + Send + 'static,\n    F::Output: Send + 'static,\n{\n    if tokio::runtime::Handle::try_current().is_ok() {\n        std::thread::spawn(move || {\n            tokio::runtime::Builder::new_current_thread()\n                .enable_all()\n                .build()\n                .expect(\"failed to build tokio runtime\")\n                .block_on(future)\n        })\n        .join()\n        .expect(\"tokio runtime thread panicked\")\n    } else {\n        tokio::runtime::Builder::new_current_thread()\n            .enable_all()\n            .build()\n            .expect(\"failed to build tokio runtime\")\n            .block_on(future)\n    }\n}\n\n#[cfg(test)]\npub(crate) mod test_support {\n    use super::*;\n\n    pub(crate) fn cache_key(host: &str, client_id: &str, scopes: &str) -> String {","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/github/oauth.rs#L607-L643","documentation":"Error \"failed to build tokio runtime\" thrown in jdx/mise.","triggerScenarios":"Thrown at src/github/oauth.rs:625 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the GitHub OAuth flow; if it recurs, check system thread/resource limits (ulimit) that prevent tokio from starting a runtime."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}