Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for Gotify down notifications #1148

Closed
2 tasks done
Syntoxr opened this issue Jan 8, 2022 · 7 comments
Closed
2 tasks done

Error for Gotify down notifications #1148

Syntoxr opened this issue Jan 8, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@Syntoxr
Copy link

Syntoxr commented Jan 8, 2022

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I'm using Gotify as my Notification service but only getting notifications, if a service goes online again. If it goes offline, I'm not getting notified and the log throws out an error.

👟 Reproduction steps

Manually turning off a monitored docker container or other service

👀 Expected behavior

Getting notified if as service goes down

😓 Actual Behavior

Getting no notification but an error message in log

🐻 Uptime-Kuma Version

1.11.3

💻 Operating System and Arch

ubuntu5~20.04.2

🌐 Browser

Brave: Version 1.34.80 Chromium: 97.0.4692.71 (Official Build) (64-Bit)

🐋 Docker Version

20.10.7, build 20.10.7-0

🟩 NodeJS Version

No response

📝 Relevant log output

Cannot send notification to Gotify
Error: Error: Error: 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"}
    at Gotify.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:32:15)
    at Gotify.send (/app/server/notification-providers/gotify.js:23:18)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Function.sendNotification (/app/server/model/monitor.js:684:21)
    at async beat (/app/server/model/monitor.js:391:17)
    at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:443:17)
@Syntoxr Syntoxr added the bug Something isn't working label Jan 8, 2022
@Syntoxr
Copy link
Author

Syntoxr commented Feb 9, 2022

Just had the Idea of using the gotify component of apprise, but even there the down notifications don't work. Maybe some illegal characters in the down message? If so, #975 could be a potential alternative.

@Sev455
Copy link

Sev455 commented Feb 19, 2022

I have this happening too.

Cannot send notification to Uptime Alert
Error: Error: Error: 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"}
at Gotify.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:32:15)
at Gotify.send (/app/server/notification-providers/gotify.js:23:18)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.sendNotification (/app/server/model/monitor.js:684:21)
at async beat (/app/server/model/monitor.js:391:17)
at async safeBeat (/app/server/model/monitor.js:443:17)
Monitor #6 'Insurgency': Failing: Server not found on Steam | Interval: 60 seconds | Type: steam

@kimpenhaus
Copy link

kimpenhaus commented Mar 3, 2022

@Syntoxr / @Sev455 I assume you are running gotify against mysql/maria db? Most probably your collations are not setup properly.
I had the same problems and fixed it by changing

  1. table collations to utf8mb4_unicode_ci (I've changed them on the entire database)

image

  1. added charset=utf8mb4 to the connection string inside gotify

image

I don't see an issue with uptime kuma here...

image

@Syntoxr
Copy link
Author

Syntoxr commented Mar 3, 2022

@kimpenhaus Wow, many thanks!
My collations were right, but my connection string just had utf8.
Your detailed description is also very appreciated! 👍

@Syntoxr Syntoxr closed this as completed Mar 3, 2022
@kimpenhaus
Copy link

@Syntoxr glad I could help 👍

@tan-yong-sheng
Copy link

I used sqlite3 and i faced similar error. Any way to mitigate it, thanks in advance.

@CommanderStorm
Copy link
Collaborator

What do you mean by "similar"?
Also when you mean you use sqlite, do you mean you use sqlite for gotify or uptime-kuma?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants