{"record":{"id":"f381869732423e20","repo":"EpicGames/lore","slug":"notification-plugin-receiver-background-task-failed-e","errorCode":null,"errorMessage":"Notification plugin receiver background task failed: {e}","messagePattern":"Notification plugin receiver background task failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/server.rs","lineNumber":1495,"sourceCode":"                .unwrap_or_else(|| toml::Value::Table(toml::map::Map::new()));\n\n            let context = NotificationPluginContext {\n                environment: environment.clone(),\n                immutable_store: immutable_store.cloned(),\n            };\n\n            let output = registry\n                .create_notification(plugin_name, &plugin_config, &context)\n                .await\n                .map_err(|e| {\n                    anyhow::anyhow!(\"Failed to create notification plugin '{plugin_name}': {e}\")\n                })?;\n\n            // Spawn background tasks for the receiver tasks from the plugin\n            for task in output.receivers {\n                lore_spawn!(endpoints, async move {\n                    task.await.map_err(|e| {\n                        anyhow::anyhow!(\"Notification plugin receiver background task failed: {e}\")\n                    })\n                });\n            }\n\n            Ok((output.sender, None))\n        }\n    }\n}\n\n#[cfg(target_os = \"linux\")]\nasync fn log_base_address() {\n    use tracing::warn;\n\n    let executable =\n        match std::env::current_exe().map(|executable| executable.to_str().map(|s| s.to_owned())) {\n            Ok(executable) => executable,\n            Err(e) => {\n                warn!(\"Could not get path to current executable: {e:?}\");","sourceCodeStart":1477,"sourceCodeEnd":1513,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/server.rs#L1477-L1513","documentation":"Notification plugins can hand back long-lived receiver background tasks. The server spawns each one into the endpoints JoinSet; if such a task completes with an Err, the join result is mapped to this error naming the underlying failure.","triggerScenarios":"A running notification plugin receiver task (e.g. a webhook listener or queue consumer) terminates with an error at runtime — bind failure, dropped connection, handler panic captured as Err — surfacing through task.await in configure_notification's spawned wrapper.","commonSituations":"Port already in use for a listening receiver; upstream service (e.g. message broker) unreachable; receiver task erroring after config/network changes while the server is up.","solutions":["Inspect the wrapped inner error ({e}) to identify the receiver's actual failure (bind error, connection error, etc.)","Fix the underlying resource issue (free the port, restore connectivity, correct credentials)","Check the plugin config in [plugins.<name>] and restart the server; add monitoring/restart policy for the endpoints JoinSet"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"lore_spawn!(endpoints, async move {\n    task.await.map_err(|e| anyhow::anyhow!(\"Notification plugin receiver background task failed: {e}\"))\n});\n// consume JoinSet results and restart/alert on Err:\nwhile let Some(res) = endpoints.join_next().await {\n    if let Err(e) = res? { error!(\"receiver failed: {e}; restarting plugin receiver\"); }\n}","preventionTips":["Pre-check that receiver bind addresses/ports are free before startup","Add supervision/restart logic for notification receiver tasks","Monitor the endpoints JoinSet for completed tasks and alert on failures"],"tags":["plugin","notification","background-task","runtime"],"backgroundTag":"background-task-failed","analyzedSha":"074eb0b0d1194c997d7cf28b55519e3e197b3e23","analyzedAt":"2026-09-13T09:00:57.509Z","contentChangedAt":"2026-09-13T09:00:57.509Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}