Closed Jericho closed 3 years ago
I have seen this problem as well, but I am honestly not sure about what is going on here. We are not using a token within AppVeyor for Slack, we are using an incoming webhook URL instead. Nothing has changed in this area of the configuration for a LONG time, so I am not clear on why this is suddenly causing problems. @devlead are you aware of any changes from an AppVeyor or Slack side of things that would mean that we need to update anything?
@gep13 @devlead
This annoying error message has ben bothering me (even though it doesn't prevent my builds from completing successfully) so I took it upon myself to investigate this situation and discovered that the URL configured in the Cake-Contrib account level configuration in AppVeyor for the Slack "incoming webhook" is incorrect. My guess is that at some point someone re-generated this URL in the Slack admin interface and simply didn't update the corresponding setting in the AppVeyor configuration.
The last message posted in the #appveyor
channel is dated March 4th 2021 so probably that's when the URL was re-generated.
This URL contains a secret and is therefore not meant to be publicly disclosed. Maybe someone accidently leaked this URL and therefore regenerated it? Another guess on my part: the part of the URL that changed is what slack calls the "token", hence the "invalid token" error message.
Anyway, long story short: I will fix this problem by updating the AppVeyor config and when I do, messages from 'AppVeyor CI' should resume being posted to the #appveyor
channel.
@Jericho thank you very much for investigating this, and for finding the problem!
I triggered a build of AddinDiscoverer: a message was posted to the #appveyor
channel and the annoying "invalid token" error in the AppVeyor interface is gone!
My build script does not send notifications to Slack but yet I'm getting this error message when building on AppVeyor:
Error sending Slack notification: Error sending Slack message: invalid_token
I'm guessing there's something configured at the Cake-Contrib account level to automatically send messages on Slack???? And evidently the token that this notification relies on for authentication is not valid.
@gep13 is this something you can look into?