{"record":{"id":"6d24ab051d73b9a0","repo":"louislam/uptime-kuma","slug":"output","errorCode":null,"errorMessage":"${output}","messagePattern":"\\$\\{output\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/notification-providers/apprise.js","lineNumber":29,"sourceCode":"        const okMsg = \"Sent Successfully.\";\n\n        const args = [\"-vv\", \"-b\", msg, notification.appriseURL];\n        if (notification.title) {\n            args.push(\"-t\");\n            args.push(notification.title);\n        }\n        const s = await childProcessAsync.spawn(\"apprise\", args, {\n            encoding: \"utf8\",\n        });\n\n        const output = s.stdout ? s.stdout.toString() : \"ERROR: maybe apprise not found\";\n\n        if (output) {\n            if (!output.includes(\"ERROR\")) {\n                return okMsg;\n            }\n\n            throw new Error(output);\n        } else {\n            return \"No output from apprise\";\n        }\n    }\n}\n\nmodule.exports = Apprise;\n","sourceCodeStart":11,"sourceCodeEnd":37,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/notification-providers/apprise.js#L11-L37","documentation":"apprise.js:11-30. Apprise is shelled out as a child process; its stdout is inspected. If the output contains the substring 'ERROR' (case-sensitive) the provider throws the entire stdout as the error message. This catches apprise reporting missing endpoints, bad URLs, or library-level failures.","triggerScenarios":"Apprise URL tags malformed (e.g. 'mailto://' without config), target service unreachable, apprise cannot find a configured plugin, or apprise itself prints an ERROR-prefixed diagnostic line.","commonSituations":"Apprise not installed / not on PATH (the fallback string 'ERROR: maybe apprise not found'), an Apprise URL syntax the installed apprise version no longer accepts, a persistent config token expired for a target (Discord/Telegram/Slack).","solutions":["Run `apprise --version` on the host to confirm the binary is installed and on PATH.","Reproduce the send from the shell with `apprise -vv -t test -b test '<your URLs>'` to see the full diagnostic.","Fix/refresh the Apprise URL string in the notification config based on the diagnostic.","Upgrade or pin Apprise to a version whose URL syntax matches the configured targets."],"exampleFix":"# before: apprise URL uses deprecated syntax\n# after: correct scheme\n# 'tgram://' requires bot token + chat id\ntgram://<bot_token>/<chat_id>","handlingStrategy":"validation","validationCode":"// Confirm apprise is installed AND the URL parses before sending\nconst { execSync } = require('child_process');\nfunction appriseReady() {\n    try { execSync('apprise --version', { stdio: 'pipe' }); return true; }\n    catch { return false; }\n}\nif (!appriseReady()) throw new Error('apprise binary not on PATH');","typeGuard":"function isAppriseSuccess(stdout) { return typeof stdout === 'string' && !stdout.includes('ERROR'); }","tryCatchPattern":"try { await provider.send(...); }\ncatch (e) {\n    if (/maybe apprise not found/i.test(e.message)) log.error('Install apprise on the Uptime Kuma host');\n    else log.warn(`Apprise delivery issue: ${e.message}`);\n}","preventionTips":["Pin apprise version in your deployment; add a startup check that the binary exists.","Maintain apprise URL syntax in lockstep with the installed version's changelog."],"tags":["notification","apprise","child-process","cli"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}