Gotify throws out error when sending down notification #3184

Closed
opened 2026-02-28 03:20:51 -05:00 by deekerman · 6 comments
Owner

Originally created by @alexbcberio on GitHub (Mar 11, 2024).

  • No down notifications for http and port monitors #2442
    No solution is provided
  • Error for Gotify down notifications #1148
    The database engine used in this issue is MariaDB while I'm using the embedded one

🛡️ Security Policy

Description

Gotify notification provider does not send any "down" notification messages, "up" notification messages are sent correctly.

👟 Reproduction steps

Add Gotify provider and wait or force a "down" notification message

👀 Expected behavior

The down notification message should be correctly processed by Gotify

😓 Actual Behavior

Gotify server rejects the message

🐻 Uptime-Kuma Version

1.23.11

💻 Operating System and Arch

Ubuntu 22.04

🌐 Browser

any

🖥️ Deployment Environment

  • Runtime: Docker 25.0.4
  • Database: sqlite/embedded
  • Filesystem used to store the database on: ext4
  • number of monitors: 1

📝 Relevant log output

uptime-kuma  | Error: Error: AxiosError: Request failed with status code 500 {"error":"Internal Server Error","errorCode":500,"errorDescription":"Error 1366: Incorrect string value: '\\xF0\\x9F\\x94\\xB4 D...' for column `gotify`.`messages`.`message` at row 1"}
uptime-kuma  |     at Gotify.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:38:15)
uptime-kuma  |     at Gotify.send (/app/server/notification-providers/gotify.js:23:18)
uptime-kuma  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
uptime-kuma  |     at async Monitor.sendNotification (/app/server/model/monitor.js:1421:21)
uptime-kuma  |     at async beat (/app/server/model/monitor.js:958:21)
uptime-kuma  |     at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1026:17)
Originally created by @alexbcberio on GitHub (Mar 11, 2024). ### 📑 I have found these related issues/pull requests - No down notifications for http and port monitors #2442 No solution is provided - Error for Gotify down notifications #1148 The database engine used in this issue is MariaDB while I'm using the embedded one ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### Description Gotify notification provider does not send any "down" notification messages, "up" notification messages are sent correctly. ### 👟 Reproduction steps Add Gotify provider and wait or force a "down" notification message ### 👀 Expected behavior The down notification message should be correctly processed by Gotify ### 😓 Actual Behavior Gotify server rejects the message ### 🐻 Uptime-Kuma Version 1.23.11 ### 💻 Operating System and Arch Ubuntu 22.04 ### 🌐 Browser any ### 🖥️ Deployment Environment - Runtime: Docker 25.0.4 - Database: sqlite/embedded - Filesystem used to store the database on: ext4 - number of monitors: 1 ### 📝 Relevant log output ```shell uptime-kuma | Error: Error: AxiosError: Request failed with status code 500 {"error":"Internal Server Error","errorCode":500,"errorDescription":"Error 1366: Incorrect string value: '\\xF0\\x9F\\x94\\xB4 D...' for column `gotify`.`messages`.`message` at row 1"} uptime-kuma | at Gotify.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:38:15) uptime-kuma | at Gotify.send (/app/server/notification-providers/gotify.js:23:18) uptime-kuma | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) uptime-kuma | at async Monitor.sendNotification (/app/server/model/monitor.js:1421:21) uptime-kuma | at async beat (/app/server/model/monitor.js:958:21) uptime-kuma | at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1026:17) ```
deekerman 2026-02-28 03:20:51 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@chakflying commented on GitHub (Mar 11, 2024):

I think this is still the same issue as #1148. What is the database configuration used for the Gotify server?

@chakflying commented on GitHub (Mar 11, 2024): I think this is still the same issue as #1148. What is the database configuration used **for the Gotify server**?
Author
Owner

@alexbcberio commented on GitHub (Mar 11, 2024):

Yes, as I already mentioned in the main message the issue is the same as on #1148.

The difference is on the used database provider. I'm using the embedded sqlite (I haven't found any docs regarding how to set it up to MariaDB) while this other issue is using MariaDB as the database provider.

Edit: the database provider for Gotify is MariaDB.

@alexbcberio commented on GitHub (Mar 11, 2024): ~~Yes, as I already mentioned in the main message the issue is the same as on #1148.~~ ~~The difference is on the used database provider. I'm using the embedded sqlite (I haven't found any docs regarding how to set it up to MariaDB) while this other issue is using MariaDB as the database provider.~~ Edit: the database provider for Gotify is MariaDB.
Author
Owner

@CommanderStorm commented on GitHub (Mar 11, 2024):

So the same issue, correct?

If that is the case, we should definitely adapt the helptext for said monitor.
What do you think would be a good way to phrase this "oddity"

@CommanderStorm commented on GitHub (Mar 11, 2024): So the same issue, correct? If that is the case, we should definitely adapt the helptext for said monitor. What do you think would be a good way to phrase this "oddity"
Author
Owner

@alexbcberio commented on GitHub (Mar 11, 2024):

OMG, I have been messing up between Gotify database and Uptime-Kuma database all this time.

You're completely right, its the same issue. I have updated Gotify settings and its working ok.

Hmm, as for the phrasing I would add a notice telling "Ensure Gotify database connection url encoding matches the database encoding (utf8, utf8mb4, etc)". It might also be a good idea, if it were possible, to customize the "Test" message adding some known characters that cause issues.

Thanks for the fast support and replying so fast!

@alexbcberio commented on GitHub (Mar 11, 2024): OMG, I have been messing up between Gotify database and Uptime-Kuma database all this time. You're completely right, its the same issue. I have updated Gotify settings and its working ok. Hmm, as for the phrasing I would add a notice telling "Ensure Gotify database connection url encoding matches the database encoding (utf8, utf8mb4, etc)". It might also be a good idea, if it were possible, to customize the "Test" message adding some known characters that cause issues. Thanks for the fast support and replying so fast!
Author
Owner

@CommanderStorm commented on GitHub (Mar 11, 2024):

It might also be a good idea, if it were possible, to customize the "Test" message adding some known characters that cause issues.

That sounds like something you would need to set up gotify for (taking time out of my/another maintainers "time-budget" which could be used for other purposes).
Given that you already have this notification provider set up, would it be possible for you to contribute such a change and test that the character reproduces the case as intended?
Our contribution guide (how to set up a dev-environment) can be found here and the two relevant lines are:

@CommanderStorm commented on GitHub (Mar 11, 2024): > It might also be a good idea, if it were possible, to customize the "Test" message adding some known characters that cause issues. That sounds like something you would need to set up gotify for (taking time out of my/another maintainers "time-budget" which could be used for other purposes). Given that you already have this notification provider set up, would it be possible for you to contribute such a change and test that the character reproduces the case as intended? Our contribution guide (how to set up a dev-environment) [can be found here](https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md) and the two relevant lines are: - The Frontend: https://github.com/louislam/uptime-kuma/blob/bfd65ab6e3bc23b1b075322886a91d8af5797091/src/components/notifications/Gotify.vue#L15 - The backend: https://github.com/louislam/uptime-kuma/blob/bfd65ab6e3bc23b1b075322886a91d8af5797091/server/notification-providers/gotify.js#L11-L28
Author
Owner

@alexbcberio commented on GitHub (Mar 11, 2024):

I will consider contributing to add this feature.

Thanks for the details!

@alexbcberio commented on GitHub (Mar 11, 2024): I will consider contributing to add this feature. Thanks for the details!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#3184
No description provided.