sct / overseerr

Request management and media discovery tool for the Plex ecosystem
https://overseerr.dev
MIT License
3.81k stars 441 forks source link

Telegram integration not working #3894

Open Sprooty opened 3 months ago

Sprooty commented 3 months ago

Description

I have spent the morning trying to integrate Overseerr into a telegram bot and have been hitting generic error

"Telegram test notification failed to send."

I have also tried integrating to Telegram via webhook and i get a same/similar error.

"Webhook test notification failed to send."

Debug logs don't show anything useful.

Version

1.33.2

Steps to Reproduce

Telegram Integration

  1. Create Telegram bot
  2. Get Telegram Bot Auth key
  3. Fill fields in Overseer
  4. Click test

Webhook Integration

  1. URL - https://api.telegram.org/botCHANGEME/sendMessage
  2. Payload {
    
    "chat_id": "CHANGEME",
    "text": "Notification Type: {{notification_type}}\nEvent: {{event}}\nSubject: {{subject}}\nMessage: {{message}}\nImage: {{image}}\nMedia Type: {{media.media_type}}\nTMDB ID: {{media.tmdbId}}\nTVDB ID: {{media.tvdbId}}\nStatus: {{media.status}}\nStatus 4K: {{media.status4k}}\nRequest ID: {{request.request_id}}\nRequested By Email: {{request.requestedBy_email}}\nRequested By Username: {{request.requestedBy_username}}\nRequested By Avatar: {{request.requestedBy_avatar}}\nIssue ID: {{issue.issue_id}}\nIssue Type: {{issue.issue_type}}\nIssue Status: {{issue.issue_status}}\nReported By Email: {{issue.reportedBy_email}}\nReported By Username: {{issue.reportedBy_username}}\nReported By Avatar: {{issue.reportedBy_avatar}}\nComment Message: {{comment.comment_message}}\nCommented By Email: {{comment.commentedBy_email}}\nCommented By Username: {{comment.commentedBy_username}}\nCommented By Avatar: {{comment.commentedBy_avatar}}"
    }

The Telegram bot is working fine outside overseerr using curl

curl -X POST \
     -H "Content-Type: application/json" \
     -d '{
           "chat_id": "CHANGEME",
           "text": "Notification Type: {{notification_type}}\nEvent: {{event}}\nSubject: {{subject}}\nMessage: {{message}}\nImage: {{image}}\nMedia Type: {{media.media_type}}\nTMDB ID: {{media.tmdbId}}\nTVDB ID: {{media.tvdbId}}\nStatus: {{media.status}}\nStatus 4K: {{media.status4k}}\nRequest ID: {{request.request_id}}\nRequested By Email: {{request.requestedBy_email}}\nRequested By Username: {{request.requestedBy_username}}\nRequested By Avatar: {{request.requestedBy_avatar}}\nIssue ID: {{issue.issue_id}}\nIssue Type: {{issue.issue_type}}\nIssue Status: {{issue.issue_status}}\nReported By Email: {{issue.reportedBy_email}}\nReported By Username: {{issue.reportedBy_username}}\nReported By Avatar: {{issue.reportedBy_avatar}}\nComment Message: {{comment.comment_message}}\nCommented By Email: {{comment.commentedBy_email}}\nCommented By Username: {{comment.commentedBy_username}}\nCommented By Avatar: {{comment.commentedBy_avatar}}"
         }' \
     https://api.telegram.org/botCHANGEME/sendMessage

### Screenshots

![SNAG-0026](https://github.com/sct/overseerr/assets/4150588/2d584bcd-2bab-4f6a-aa9b-74b9b57a078e)
![SNAG-0027](https://github.com/sct/overseerr/assets/4150588/82e9e7c1-a5d7-449b-9107-b4370724c92f)

### Logs

```shell
2024-07-10T00:32:12.962Z [info][Jobs]: Starting scheduled job: Plex Watchlist Sync 

2024-07-10T00:32:38.835Z [debug][Notifications]: Sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification"}

2024-07-10T00:32:39.114Z [error][Notifications]: Error sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":""}

2024-07-10T00:33:00.007Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:33:25.899Z [debug][Notifications]: Sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification"}

2024-07-10T00:33:26.154Z [error][Notifications]: Error sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":""}

2024-07-10T00:34:00.007Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:34:17.402Z [debug][Notifications]: Sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification"}

2024-07-10T00:34:17.678Z [error][Notifications]: Error sending webhook notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":""}

2024-07-10T00:35:00.019Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:35:00.024Z [info][Jobs]: Starting scheduled job: Plex Recently Added Scan 

2024-07-10T00:35:00.024Z [info][Plex Scan]: Scan starting {"sessionId":"e2b1445c-11c5-4076-8622-6c5278f9518b"}

2024-07-10T00:35:00.034Z [info][Plex Scan]: Beginning to process recently added for library: Movies {"lastScan":1720571400033}

2024-07-10T00:35:00.070Z [info][Notifications]: Sending notification(s) for MEDIA_AVAILABLE {"subject":"Trigger Warning (2024)"}

2024-07-10T00:35:00.071Z [debug][Notifications]: Sending Slack notification {"type":"MEDIA_AVAILABLE","subject":"Trigger Warning (2024)"}

2024-07-10T00:35:00.072Z [debug][Notifications]: Sending Telegram notification {"type":"MEDIA_AVAILABLE","subject":"Trigger Warning (2024)"}

2024-07-10T00:35:00.092Z [info][Plex Scan]: Media for Trigger Warning exists. Changes were detected and the title will be updated. 

2024-07-10T00:35:00.335Z [error][Notifications]: Error sending Telegram notification {"type":"MEDIA_AVAILABLE","subject":"Trigger Warning (2024)","errorMessage":""}

2024-07-10T00:35:04.096Z [info][Plex Scan]: Beginning to process recently added for library: TV Shows {"lastScan":1720571400048}

2024-07-10T00:35:04.116Z [info][Plex Scan]: Recently Added Scan Complete 

2024-07-10T00:36:00.022Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:37:00.024Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:38:00.008Z [debug][Jobs]: Starting scheduled job: Download Sync 

2024-07-10T00:38:05.226Z [debug][Notifications]: Sending Telegram notification {"type":"TEST_NOTIFICATION","subject":"Test Notification"}

2024-07-10T00:38:05.495Z [error][Notifications]: Error sending Telegram notification {"type":"TEST_NOTIFICATION","subject":"Test Notification","errorMessage":""}

Platform

desktop

Device

Docker

Operating System

Ubuntu + Docker

Browser

Firefox

Additional Context

No response

Code of Conduct

deftdev commented 3 months ago

I'm getting same issue. Its the same bot I have been using for ages, recently stopped working though I couldnt tell you at what point. I thought maybe i messed something up, but all the details in it are correct, I tested with a second bot, and same problem. For both. the log shows no content in "errorMessage".

2024-07-14T12:13:39.655Z [debug][Notifications]: Sending Telegram notification{"subject":"Test Notification","type":"TEST_NOTIFICATION"} 2024-07-14T12:13:39.911Z [error][Notifications]: Error sending Telegram notification{"errorMessage":"","subject":"Test Notification","type":"TEST_NOTIFICATION"} 2024-07-14T12:13:00.006Z [debug][Jobs]: Starting scheduled job: Download Sync 2024-07-14T12:12:34.940Z [debug][Notifications]: Sending Telegram notification{"subject":"Test Notification","type":"TEST_NOTIFICATION"} 2024-07-14T12:12:35.196Z [error][Notifications]: Error sending Telegram notification{"errorMessage":"","subject":"Test Notification","type":"TEST_NOTIFICATION"}

Version v1.33.2

Platform desktop

Device Docker

Operating System Ubuntu + Docker

Browser Firefox, also tested on chrome

hamishm456 commented 3 months ago

Same here unfortunately.