[MySQL] Custom Alerts not saving

Expected behavior

Changes Saved

Actual behavior

Somthing went wrong

Steps to reproduce

  • Create a Main Category for the Alerts
  • Save the Main Category
  • Create a Custom Alert (like Follow or Subscribe or whatever)
  • Type only Title for tthe Alert and save

Additional informations

2020-05-15T03:07:28.380 DEBUG: * ======= COPY DEBUG MESSAGE FROM HERE =======
2020-05-15T03:07:28.380 DEBUG: * GENERAL | OS: npm/6.14.4 node/v13.12.0 linux x64
2020-05-15T03:07:28.404 DEBUG: * | Bot version: 11.2.0-cbe24ec
2020-05-15T03:07:28.404 DEBUG: * | DB: mysql
2020-05-15T03:07:28.404 DEBUG: * | HEAP: 67.52 MB
2020-05-15T03:07:28.405 DEBUG: * | Uptime: 01:20:49
2020-05-15T03:07:28.405 DEBUG: * | Language: en
2020-05-15T03:07:28.405 DEBUG: * | Mute: false
2020-05-15T03:07:28.405 DEBUG: * SYSTEMS | -Songs, Highlights, Points, Price, Alias, Bets, Checklist, Commercial, Ranks, CustomCommands, Cooldown, HowLongToBeat, Keywords, Moderation, Polls, Queue, Quotes, Raffles, Scrim, Timers, Top, UserInfo
2020-05-15T03:07:28.405 DEBUG: * GAMES | -Duel, -FightMe, -Gamble, -Heist, -Roulette, -Seppuku
2020-05-15T03:07:28.405 DEBUG: * INTEGRATIONS | -Spotify, Discord, -ResponsiveVoice, -Donationalerts, -PhillipsHue, -Qiwi, -StreamElements, -Streamlabs, -TipeeeStream, -Twitter
2020-05-15T03:07:28.405 DEBUG: * WIDGETS | bets, twitch, chat, ytplayer, part, join, join, eventlist, spotify, chat, join, chat, twitch, soundboard, part, part, ytplayer, eventlist, raffles, eventlist
2020-05-15T03:07:28.405 DEBUG: * OAUTH | BOT true | BROADCASTER true
2020-05-15T03:07:28.406 DEBUG: * ======= END OF DEBUG MESSAGE =======

Chrome Console:

main.6c59e01e2374b24638ca.js:2 QueryFailedError: Incorrect string value: ‘\xE2\x96\x88\xE2\x96\x93…’ for column ‘animationTextOptions’ at row 1
at new QueryFailedError (/root/sogebot/src/error/QueryFailedError.ts:9:9)
at Query.onResult (/root/sogebot/src/driver/mysql/MysqlQueryRunner.ts:167:37)
at Query.execute (/root/sogebot/node_modules/mysql2/lib/commands/command.js:30:14)
at PoolConnection.handlePacket (/root/sogebot/node_modules/mysql2/lib/connection.js:417:32)
at PacketParser.onPacket (/root/sogebot/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/root/sogebot/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket. (/root/sogebot/node_modules/mysql2/lib/connection.js:82:25)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)

Problem is using utf8 charset which is storing chars by 3 bytes only. To fix this issue, set up your MySQL to use utf8mb4 charset

--character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

I updated docs at https://github.com/sogehige/sogeBot/pull/3746

How to fix it:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.