{"record":{"id":"56a44dbf38dc227e","repo":"nikivdev/code","slug":"touch-id-is-not-available-on-this-device","errorCode":null,"errorMessage":"Touch ID is not available on this device","messagePattern":"Touch ID is not available on this device","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/env.rs","lineNumber":584,"sourceCode":"  ok = success;\n  done = true;\n}});\nconst runLoop = $.NSRunLoop.currentRunLoop;\nwhile (!done) {{\n  runLoop.runUntilDate($.NSDate.dateWithTimeIntervalSinceNow(0.1));\n}}\n$.exit(ok ? 0 : 1);\"#\n    );\n\n    let status = Command::new(\"osascript\")\n        .args([\"-l\", \"JavaScript\", \"-e\", &script])\n        .status()\n        .context(\"failed to launch Touch ID prompt\")?;\n\n    match status.code() {\n        Some(0) => Ok(()),\n        Some(1) => bail!(\"Touch ID verification failed\"),\n        Some(2) => bail!(\"Touch ID is not available on this device\"),\n        _ => bail!(\"Touch ID verification failed\"),\n    }\n}\n\nfn unlock_env_read() -> Result<()> {\n    if !cfg!(target_os = \"macos\") {\n        println!(\"Touch ID unlock is not available on this OS.\");\n        return Ok(());\n    }\n\n    if let Some(entry) = load_env_unlock() {\n        if let Some(expires_at) = unlock_expires_at(&entry) {\n            if expires_at > Utc::now() {\n                let local_expiry = expires_at.with_timezone(&Local);\n                println!(\n                    \"Env read access already unlocked until {}\",\n                    local_expiry.format(\"%Y-%m-%d %H:%M %Z\")\n                );","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/env.rs#L566-L602","documentation":"Error \"Touch ID is not available on this device\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/env.rs:584 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}