{"record":{"id":"cd5a4bdcbd531640","repo":"FyroxEngine/Fyrox","slug":"unable-to-create-resource-watcher-reason-e","errorCode":null,"errorMessage":"Unable to create resource watcher. Reason {e:?}","messagePattern":"Unable to create resource watcher\\. Reason (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-impl/src/engine/executor.rs","lineNumber":230,"sourceCode":"        Log::info(\"Initializing resource registry.\");\n        self.engine.resource_manager.update_or_load_registry();\n\n        let engine = self.engine;\n        let event_loop = self.event_loop;\n        let throttle_threshold = self.throttle_threshold;\n        let throttle_frame_interval = self.throttle_frame_interval;\n\n        if self.resource_hot_reloading {\n            #[cfg(any(target_os = \"windows\", target_os = \"linux\", target_os = \"macos\"))]\n            {\n                use crate::core::watcher::FileSystemWatcher;\n                use std::time::Duration;\n                match FileSystemWatcher::new(\".\", Duration::from_secs(1)) {\n                    Ok(watcher) => {\n                        engine.resource_manager.state().set_watcher(Some(watcher));\n                    }\n                    Err(e) => {\n                        Log::err(format!(\"Unable to create resource watcher. Reason {e:?}\"));\n                    }\n                }\n            }\n        }\n\n        let args = Args::try_parse().unwrap_or_default();\n\n        match event_loop {\n            Some(event_loop) => run_normal(\n                engine,\n                args.override_scene.as_deref(),\n                event_loop,\n                throttle_threshold,\n                throttle_frame_interval,\n                self.desired_update_rate,\n            ),\n            None => run_headless(\n                engine,","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-impl/src/engine/executor.rs#L212-L248","documentation":"In fyrox-impl's Executor::run, the engine optionally creates a FileSystemWatcher for the current directory to enable hot resource reloading. If watcher creation fails (notify API error, unsupported platform, permission issue), this error is logged and the engine continues running without hot reloading — resources won't auto-reload on file changes.","triggerScenarios":"FileSystemWatcher::new(\".\", Duration::from_secs(1)) returns Err — e.g. inotify watch limits exhausted on Linux, no permission to watch the directory, or the notify backend unavailable on the target platform.","commonSituations":"Running in containers with restricted inotify (Docker default limits), sysctl fs.inotify.max_user_watches/max_user_instances exhausted on Linux, running from a read-only or network mount, unsupported embedded/WASM targets.","solutions":["Raise Linux inotify limits: sysctl fs.inotify.max_user_watches=524288 and max_user_instances","Check you have read permission on the working directory being watched","Continue without hot reload if the feature isn't needed (engine already does this — verify resource_manager watcher is None is acceptable)","Run outside containers/mounts that block file watching, or mount with inotify support"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"match FileSystemWatcher::new(\".\", Duration::from_secs(1)) {\n    Ok(w) => engine.resource_manager.state().set_watcher(Some(w)),\n    Err(e) => Log::warn(format!(\"hot reload disabled: {e:?}\")),\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = FileSystemWatcher::new(\".\", Duration::from_secs(1)) {\n    Log::warn(format!(\"watcher unavailable, continuing without hot reload: {e:?}\"));\n}","preventionTips":["Raise fs.inotify.max_user_watches/max_user_instances on Linux dev machines","Avoid running from network mounts or inotify-restricted containers if you need hot reload","Design the game loop to tolerate watcher == None"],"tags":["file-watcher","resources","hot-reload","fyrox"],"backgroundTag":"module-init-failed","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}