LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[BUG] Broken Telegram alert

Open Nord1cWarr1or opened this issue 2 years ago • 5 comments

User Story

As a LGSM user, I want send test alert on telegram, but it doesn't happen

Basic info

  • Distro: Debian 11
  • Game: Counter-Strike 1.6
  • Command: test-alert
  • LinuxGSM version: v21.4.1

Further Information

Commit https://github.com/GameServerManagers/LinuxGSM/commit/44daf200834c5bf56956531ff082dc1045021253 (last commit at file alert_telegram.sh) broke Telegram alert. I tried to send test-alert, but get an error:

[ .... ] Sending Alert csserver: Sending Telegram alertparse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 4, column 431
[ FAIL ] Sending Alert csserver: Sending Telegram alert: {"ok":false,"error_code":400,"description":"Bad Request: message text is empty"}

Then I copied code from previous commit (https://github.com/GameServerManagers/LinuxGSM/commit/48308ec61e6f01e83e7e127a8b25c8fda4ef1355) at this file and everithing worked as expected.

[  OK  ] Sending Alert csserver: Sending Telegram alert

To Reproduce

Steps to reproduce the behaviour:

  1. Configure telegram alerts in lgsm config
  2. Send test-alert
  3. See error

Expected behaviour

[  OK  ] Sending Alert csserver: Sending Telegram alert

Nord1cWarr1or avatar Dec 06 '21 14:12 Nord1cWarr1or

Potential duplicates:

  • [#3567] [BUG] Broken server version (63.39%)

github-actions[bot] avatar Dec 06 '21 14:12 github-actions[bot]

i know this bug but from a other game #3463

johnoclockdk avatar Dec 06 '21 15:12 johnoclockdk

@Nord1cWarr1or do you have any color code in alert

johnoclockdk avatar Dec 06 '21 15:12 johnoclockdk

@Nord1cWarr1or do you have any color code in alert

Sorry, but what do you mean by color code? And where it shoud be?

Nord1cWarr1or avatar Dec 06 '21 15:12 Nord1cWarr1or

Any news? @johnoclockdk @dgibbs64

Nord1cWarr1or avatar May 30 '22 11:05 Nord1cWarr1or

I seem to experience the same issue.

When running this code directly, there is no issue. curl -s -X POST https://api.telegram.org/bot5865808094:ASl_UM/sendMessage -F chat_id='-1001804566104' -F text='test message'

Reading furthermore in forums, all files are EOL encoded for UNIX, no hidden characters found.

Another supporter from discord with their latest LGSM is able to send a test alert with the same details in common.cfg

LayerFort avatar Feb 02 '23 20:02 LayerFort

Just completed a refactor of alerts and did not spot any issues. Closing

dgibbs64 avatar Oct 20 '23 21:10 dgibbs64