sabnzbd / sabnzbd

SABnzbd - The automated Usenet download tool

Home Page:http://sabnzbd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apprise - does not work - fail config check

thezoggy opened this issue · comments

SABnzbd version

4.3.0 RC1

Operating system

linux

Using Docker image

linuxserver

Description

user on discord reporting apprise stuff not working, the test notification is fine

2024-04-21 16:12:52,017::INFO::[api:853] Sending Apprise notification
2024-04-21 16:12:52,017::DEBUG::[notifier:290] Sending Apprise notification
2024-04-21 16:12:52,018::DEBUG::[AppriseLocale:140] Language set to en
2024-04-21 16:12:52,018::DEBUG::[Apprise:190] Loaded Telegram URL: tgram://7...I/-1002125724793:12/?image=False&detect=no&silent=no&preview=no&content=before&mdv=v2&format=html&overflow=upstream&rto=4.0&cto=4.0&verify=yes
2024-04-21 16:12:52,019::DEBUG::[NotifyTelegram:831] Telegram POST URL: https://api.telegram.org/bot7016967316:<HASH>BAw_jcbRxI/sendMessage (cert_verify=True)
2024-04-21 16:12:52,019::DEBUG::[NotifyTelegram:834] Telegram Payload: {'disable_notification': False, 'disable_web_page_preview': True, 'parse_mode': 'HTML', 'text': '<b>SABnzbd</b>\r\nTest Notification', 'chat_id': -1002125724793, 'message_thread_id': 12}
2024-04-21 16:12:52,021::DEBUG::[connectionpool:1055] Starting new HTTPS connection (1): api.telegram.org:443
2024-04-21 16:12:52,584::DEBUG::[connectionpool:549] https://api.telegram.org:443 "POST /bot7016967316:<HASH>BAw_jcbRxI/sendMessage HTTP/1.1" 200 681
2024-04-21 16:12:52,586::INFO::[NotifyTelegram:886] Sent Telegram notification.

but when it comes to doing the actual work it does not work due to check_classes expecting different config structure than what apprise decided to use

2024-04-21 16:32:54,935::INFO::[notifier:157] Sending notification: Download Completed - test_download_100MB (type=complete, job_cat=*)
2024-04-21 16:32:54,935::DEBUG::[config:834] Missing configuration item apprise,apprise_prio_complete
2024-04-21 16:32:54,935::DEBUG::[notifier:106] Incorrect Notify option apprise:apprise_prio_complete

as they are apprise_target_<notification_type>_enable instead of the expected apprise_prio_<notification_type> config entries

additionally can see that user would have no clue why something isnt working unless they used DEBUG.. so silently errors..

just to note, i must have accidentally enabled apprise option to look at the settings while helping out that user... woke up this morning to a bunch of errors in sab gui "There are no service(s) to notify" which imho should be updated to denote this is apprise doing it... but since this is bubbling up from apprise maybe its better to just detect this scenario and silently ignore if its not configured but just enabled..

now of course if user has debug logging enabled its not hard to decipher but still

2024-04-25 01:50:39,983::DEBUG::[notifier:292] Sending Apprise notification
2024-04-25 01:50:39,984::DEBUG::[AppriseLocale:140] Language set to en
2024-04-25 01:50:39,984::INFO::[notifier:157] Sending notification: Error - There are no service(s) to notify (type=error, job_cat=None)
2024-04-25 01:50:39,984::ERROR::[Apprise:456] There are no service(s) to notify