invakid404
invakid4043mo ago

Slack error handler: Resource exists but you don't have access to it

When trying to send a test message for the Slack error handler, the run fails with the following error:
ExecutionErr: error during execution of the script:
Not found: Resource f/slack_bot/bot_token not found for `slack`: Not authorized: Resource exists but you don't have access to it:
resource perms: {}
folder perms: null
ExecutionErr: error during execution of the script:
Not found: Resource f/slack_bot/bot_token not found for `slack`: Not authorized: Resource exists but you don't have access to it:
resource perms: {}
folder perms: null
Any idea what could be going wrong?
17 Replies
rubenf
rubenf3mo ago
either you do not have access to it, or the error_handler group doesn't have access to it
invakid404
invakid4043mo ago
it's not a resource I've created manually, f/slack_bot/bot_token is the resource that got created after setting up Slack OAuth as per https://www.windmill.dev/docs/misc/setup_oauth#slack the weird bit is the test message worked once then i changed the target channel and it seems to have just stopped working
rubenf
rubenf3mo ago
the resource perms are incorrect, it should give perms to the error_handler group did you sync from git?
invakid404
invakid4043mo ago
i do use the windmill cli for pulling and pushing, but i don't sync resources at all, so it shouldn't have been affected I run wmill sync pull/push --skip-variables --skip-secrets --skip-resources
rubenf
rubenf3mo ago
I see, so likely the perms changed when you changed the channel even though it shouldn't have add the error_handler group to that resource as an admin
invakid404
invakid4043mo ago
I am unsure how to change the permissions for a resource and for some reason I am struggling to find relevant docs
rubenf
rubenf3mo ago
resources pages -> find resource -> share
invakid404
invakid4043mo ago
oh, right, thanks lemme see
invakid404
invakid4043mo ago
rubenf
rubenf3mo ago
you also need to share the variable
invakid404
invakid4043mo ago
i see
rubenf
rubenf3mo ago
there is a linked variable at same name
invakid404
invakid4043mo ago
yeah, that did it i am still unsure why it worked initially then stopped working, but it seems to be working now
rubenf
rubenf3mo ago
it's weird though, the variable being linked, the sharing should have applied as well. What version are you on ? We will investigate and try to reproduce
invakid404
invakid4043mo ago
EE v1.377.1-5-gd56a956b9
rubenf
rubenf3mo ago
thanks
invakid404
invakid4043mo ago
all that i did was configure Slack OAuth, after which I set one channel as the target, and it worked then later on I changed the channel which is the only change I remember doing after which I noticed it just stopped working