Automattic / breakingbot

breaking incident management chat bot
GNU General Public License v2.0
1 stars 0 forks source link

Slack `invalid_blocks` crash #65

Open mhsdef opened 3 weeks ago

mhsdef commented 3 weeks ago
2024-07-03T02:48:57.294118+00:00 app[web.1]: const error = errorWithCode(new Error(`An API error occurred: ${result.error}`), ErrorCode.PlatformError);
2024-07-03T02:48:57.294120+00:00 app[web.1]: ^
2024-07-03T02:48:57.294122+00:00 app[web.1]: 
2024-07-03T02:48:57.294122+00:00 app[web.1]: Error: An API error occurred: invalid_blocks
2024-07-03T02:48:57.294123+00:00 app[web.1]: at platformErrorFromResult (/app/node_modules/@slack/web-api/dist/errors.js:62:33)
2024-07-03T02:48:57.294124+00:00 app[web.1]: at WebClient.<anonymous> (/app/node_modules/@slack/web-api/dist/WebClient.js:198:60)
2024-07-03T02:48:57.294124+00:00 app[web.1]: at Generator.next (<anonymous>)
2024-07-03T02:48:57.294125+00:00 app[web.1]: at fulfilled (/app/node_modules/@slack/web-api/dist/WebClient.js:28:58)
2024-07-03T02:48:57.294125+00:00 app[web.1]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024-07-03T02:48:57.294126+00:00 app[web.1]: code: 'slack_webapi_platform_error',
2024-07-03T02:48:57.294126+00:00 app[web.1]: data: {
2024-07-03T02:48:57.294126+00:00 app[web.1]: ok: false,
2024-07-03T02:48:57.294127+00:00 app[web.1]: error: 'invalid_blocks',
2024-07-03T02:48:57.294128+00:00 app[web.1]: response_metadata: {
2024-07-03T02:48:57.294128+00:00 app[web.1]: scopes: [
2024-07-03T02:48:57.294128+00:00 app[web.1]: 'app_mentions:read',
2024-07-03T02:48:57.294128+00:00 app[web.1]: 'bookmarks:write',
2024-07-03T02:48:57.294128+00:00 app[web.1]: 'channels:history',
2024-07-03T02:48:57.294129+00:00 app[web.1]: 'channels:join',
2024-07-03T02:48:57.294129+00:00 app[web.1]: 'channels:manage',
2024-07-03T02:48:57.294129+00:00 app[web.1]: 'channels:read',
2024-07-03T02:48:57.294130+00:00 app[web.1]: 'chat:write',
2024-07-03T02:48:57.294130+00:00 app[web.1]: 'pins:write',
2024-07-03T02:48:57.294130+00:00 app[web.1]: 'reactions:write',
2024-07-03T02:48:57.294130+00:00 app[web.1]: 'users:read',
2024-07-03T02:48:57.294131+00:00 app[web.1]: 'users:read.email'
2024-07-03T02:48:57.294131+00:00 app[web.1]: ],
2024-07-03T02:48:57.294131+00:00 app[web.1]: acceptedScopes: [ 'chat:write' ]
2024-07-03T02:48:57.294131+00:00 app[web.1]: }
2024-07-03T02:48:57.294132+00:00 app[web.1]: }
2024-07-03T02:48:57.294132+00:00 app[web.1]: }
mhsdef commented 3 weeks ago

This was topic related. I can't post the case in question, verbatium, but the set topic (via .start) was 115 characters with a 32 char schemaless domain that had a dashes in a couple spots. On channel join, the welcome from the bot would bounce off Slack as shown above and crash the bot. It stopped after I simplified the topic by removing the domain part.

So, leading theories: