alexkvak / teamcity-slack

TeamCity Slack plugin
MIT License
124 stars 23 forks source link

Invalid Auth #119

Closed Deams51 closed 3 years ago

Deams51 commented 3 years ago

Just started to set up a new TeamCity server. I've followed the setup in the Readme (creating a classic app...). But when trying to set it up on Teamcity, I am getting an invalid_auth error.

Same error when trying https://slack.com/api/rtm.start?token=xoxp-my-long-token-here

Version: 1.8.1

Black-Stork commented 3 years ago

Yeah, having the same issue

constantnoise commented 3 years ago

I am also having the same issue. Trying to connect an existing TeamCity to a new copy of the app.

alexkvak commented 3 years ago

It seems that Slack has deprecated some APIs

https://api.slack.com/changelog https://github.com/Itiviti/simple-slack-api/issues/279

alexkvak commented 3 years ago

@constantnoise @Black-Stork @Deams51 I've replaced Itiviti/simple-slack-api with official library from Slack team and need some time to test the plugin. Basic functionality works fine. Even new bot apps, not only classic.

If you interested in testing I can publish beta version and you can use it.

constantnoise commented 3 years ago

That would be great, thanks!

nikolaigauss commented 3 years ago

I wouldn't mind re-configuring the Slack integration with the APIs on my test platform as well, do please include me on the beta if this means a meaningful test :).

alexkvak commented 3 years ago

@nikolaigauss @constantnoise I’ve just published beta.1 version https://github.com/alexkvak/teamcity-slack/releases/tag/v2.0.0-beta.1

I tested simple positive cases – the plugin posts notifications to the channels, stores the configuration in Administration section.

I have doubts if the proxy works. And if there is an error on configuration page – it does not shown.

Take a look at not permission list in readme https://github.com/alexkvak/teamcity-slack/blob/release/2.0.0/README.md

constantnoise commented 3 years ago

I've tested this now. It appears to work. Pasting in the OAuth access token, and hitting Submit resulted in no errors. I have only tested using the "Try it" button, and it sends to the correct channel. Will verify with daily and continuous build notifications. Thanks!

constantnoise commented 3 years ago

In further testing, notifications only work when I manually press "Try It" from the build, Slack menu. Notifications are not triggering automatically. Everything appears to be setup correctly. The per build settings haven't changed since before. Also, unsure if it's related, when I do click on the Build, Slack menu, the loading icon and text appear, and don't disappear. image N.B. This is with a Legacy Bot/Classic App.

alexkvak commented 3 years ago

Just checked your case, it works fine. I see Started and Succeeded status.

Could you check teamcity-server.log (/admin/admin.html?item=diagnostics&tab=logs&file=teamcity-server.log)

constantnoise commented 3 years ago

Thanks alexkvak! False alarm. I'm new to TC and Slack, In my haste I hadn't installed the app to the workspace!

alexkvak commented 3 years ago

Just published beta.4 version. In previous versions private messages should not work.

alexkvak commented 3 years ago

2.0.0 stable release, this issue can be closed. Thanks for help!