Closed kronosapiens closed 1 week ago
May be related:
/chores-channel
[ERROR] bolt-app Error: An API error occurred: method_not_supported_for_channel_type
at platformErrorFromResult (/home/ubuntu/mirror/node_modules/@slack/web-api/dist/errors.js:62:33)
at WebClient.apiCall (/home/ubuntu/mirror/node_modules/@slack/web-api/dist/WebClient.js:181:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exports.setChannel (/home/ubuntu/mirror/src/bolt/common.js:133:5)
at async /home/ubuntu/mirror/src/bolt/chores.app.js:151:3
at async Array.<anonymous> (/home/ubuntu/mirror/node_modules/@slack/bolt/dist/middleware/builtin.js:211:9)
at async Array.onlyCommands (/home/ubuntu/mirror/node_modules/@slack/bolt/dist/middleware/builtin.js:45:5)
at async Promise.allSettled (index 3)
at async /home/ubuntu/mirror/node_modules/@slack/bolt/dist/App.js:582:48
at async Array.<anonymous> (/home/ubuntu/mirror/node_modules/@slack/bolt/dist/conversation-store.js:67:9) {
code: 'slack_webapi_platform_error',
data: {
ok: false,
error: 'method_not_supported_for_channel_type',
response_metadata: { scopes: [Array], acceptedScopes: [Array] }
}
}
[ERROR] An unhandled error occurred after ack() called in a listener
After some digging, it seems like the issue is due to the app channel being set to a private channel. Posting to a private channel requires the additional groups:history
scope, which is added in https://github.com/zaratanDotWorld/choreWheel/commit/54e4cbcbc58e15992ad413184eed6ba0f49d9ed3
The second bug is likely due to apps not being able to add themselves to private channels. If workspaces want to install apps to private channels, they will have to manually add the app to the channel. The docs are updated to reflect this in https://github.com/zaratanDotWorld/choreWheel/commit/6878afcd78fe8d2dc9e8b82560075c2e2100dbd1
This error has appeared multiple times in the logs:
It is unclear the larger context, but it should be investigated and fixed.
More info here: https://api.slack.com/scopes/groups:history