alexkvak / teamcity-slack

TeamCity Slack plugin
MIT License
124 stars 23 forks source link

Emojis in message templates causes plugin to break unpredictably #72

Closed mmzmusicnotes closed 4 years ago

mmzmusicnotes commented 5 years ago

When we include emojis in our message templates, they sometimes work for a while, but eventually (we're not sure under what circumstances, yet), they seem to cause the plugin to stop working.

For example, if we have a message that reads (from the messageTemplate key in slackIntegration.json):

✔️ Build succeeded!

this will work for a while, but eventually results in a mangled config where the emoji has been "translated" into unicode garbage symbols, so that the message becomes:

✅ Build succeeded!

and then, eventually (in our experience, between 24 hours and a few weeks later) the entire plugin stops working. It puts out an error on the plugins list page with a stack trace that begins this:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.fpd.teamcity.slack.pages.BuildPage#0' defined in Byte array resource [plugin: Slack Integration#slackIntegration-server-1.0.0.jar!/META-INF/build-server-plugin-slackIntegration.xml]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.fpd.teamcity.slack.ConfigManager#0' defined in Byte array resource [plugin: Slack Integration#slackIntegration-server-1.0.0.jar!/META-INF/build-server-plugin-slackIntegration.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fpd.teamcity.slack.ConfigManager]: Constructor threw exception; nested exception is org.json4s.ParserUtil$ParseException: parsing failed

(I can provide a longer one if desired.)

Note that we have emojis in the message, with "Send message as attachment" checked. I haven't tried it with "send message as attachment" unchecked, and the default emojis.

This was happening intermittently, in such a way that it was difficult to figure out that the emojis were the problem. With the emojis gone, the config seems to be working fine, but we're still keeping an eye on it.

AlkisFortuneFish commented 4 years ago

This looks like issue #73, which was fixed by release 1.3.0.