Slack Alert issue

Hi, we're having an intermittent issue with our slack notifications: when creating an alert, I try to click the Slack radio button, and most of the time it remains grey and will not allow a Slack channel to be selected. Other times it works, but only after counting to 10! Very occassionally it works first time, and then on occasions, it will show a 'CJ-' something error. However, when we do create the notifications, they all appear in Slack when expected. Any help would be appreciated!

{
"browser-info": {
"language": "en",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.12+7",
"java.vendor": "Eclipse Foundation",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.12",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.12+7",
"os.name": "Linux",
"os.version": "5.4.129-63.229.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "12.7"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
}
},
"run-mode": "prod",
"version": {
"date": "2021-09-21",
"tag": "v0.40.5",
"branch": "release-x.40.x",
"hash": "042a36e"
},
"settings": {
"report-timezone": null
}
}
}

Hi @blake_kj
Try posting the entire error that you're seeing. Also check the logs, since there might be more details there - Admin > Troubleshooting > Logs.
I have not heard about this problem before. How many Slack channels+users do you have?

Thanks. I can't see any errors in the log that might reference this issue, but then I don't really know what I'm looking for - the only error/warning we have is this:

[945964e7-4637-4079-9e79-c5117e2d891f] 2021-10-04T06:13:00+01:00 WARN metabase.driver.sql-jdbc.sync.describe-table Don't know how to map column type '_int8' to a Field base_type, falling back to :type/*.

We currently have 3 Slack channels that we're outputting to, this issue isn't confined to a particular channel, it seems more related to the slack integration, almost as if there is a timing issue somewhere, but I'm just theorising...

@blake_kj That error is unrelated: https://github.com/metabase/metabase/issues/16838

But how many channels+users do you have in total? Metabase does a sync of all those, so it might be a race-condition based on the amount, since it's only happening sometimes.
Kinda sounds similar to this https://github.com/metabase/metabase/issues/17479

Check your browser developer Console, and the Network-tab to see if you can see any errors or if you can potentially see, when it works correctly and fails based on the requests.

Thanks Flamber.

Well, in answer to your question, we have our entire company using Slack, so probably around 1k users, thousands of channels, but only 20 or so actually added to the 3 or so Slack channels we use to output Metabase to.

I guess I will need someone more technical to look at this our end, as I'm a luddite when it comes to developer Consoles and network settings. Essentially Metabase still works, but it just takes a minute to set up an alert when it should take seconds, and we have hundreds to set up...

The error I'm getting is this: clj-http: status 429

@blake_kj It seems like there's too many requests to Slack: https://httpstatuses.com/429
Think you need to ask an administrator to help figuring out where the problem is.
https://www.metabase.com/docs/latest/operations-guide/log-configuration.html
Metabase should be caching the Slack users+channels, so it does not need to make such a lookup every time. Really strange.
We are working on a complete rewrite of the Slack integration:
https://github.com/metabase/metabase/issues/12383

@flamber Great, thanks for the help!