{"record":{"id":"9a05ffa8873bfcd7","repo":"facebook/relay","slug":"failed-to-open-daemon-log-file","errorCode":null,"errorMessage":"Failed to open daemon log file","messagePattern":"Failed to open daemon log file","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/crates/relay-compiler/src/server_daemon.rs","lineNumber":386,"sourceCode":"    start_extra_args: &[String],\n) {\n    let current_exe = std::env::current_exe().expect(\"Failed to get current exe path\");\n    let mut args = vec![\"server\".to_string()];\n    args.extend(extra_args.iter().cloned());\n    for project in projects {\n        args.push(\"--project\".to_string());\n        args.push(project.clone());\n    }\n    args.push(\"start\".to_string());\n    args.push(\"--foreground\".to_string());\n    args.extend(start_extra_args.iter().cloned());\n\n    let log_path = get_log_file_path(config_path, projects);\n    let log_file = File::options()\n        .create(true)\n        .append(true)\n        .open(&log_path)\n        .expect(\"Failed to open daemon log file\");\n    let log_file_clone = log_file\n        .try_clone()\n        .expect(\"Failed to clone daemon log file handle\");\n\n    let mut child = Command::new(current_exe)\n        .args(&args)\n        .stdin(Stdio::null())\n        .stdout(Stdio::from(log_file))\n        .stderr(Stdio::from(log_file_clone))\n        .spawn()\n        .expect(\"Failed to spawn daemon process\");\n\n    let socket_path = get_socket_path(config_path, projects);\n    let max_attempts = 60;\n    for i in 0..max_attempts {\n        tokio::time::sleep(std::time::Duration::from_secs(1)).await;\n\n        // Detect early daemon-process exit (e.g. invalid project name).","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/compiler/crates/relay-compiler/src/server_daemon.rs#L368-L404","documentation":"Startup panic in start_daemon_process: the log file derived from the config path and project list (via get_log_file_path) could not be created or opened for appending. The daemon's stdout/stderr are redirected into this file, so without it the child's output would be lost and startup aborts.","triggerScenarios":"Thrown at compiler/crates/relay-compiler/src/server_daemon.rs:386 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the daemon log directory exists and is writable by the current user","Inspect the computed log path for an invalid or unwritable location (read-only mount, permission denial)","Free disk space or clear a full filesystem if writes fail"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"668b1b85e06261aa3b58dabfc51f8b5524a70955","analyzedAt":"2026-09-02T19:57:20.783Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}