Skip to content

Slack Integration Issues with Socket Mode #11

@kwanLeeFrmVi

Description

@kwanLeeFrmVi

Environment Information

• qodo version: 0.27.0 (@qodo/command)
• Server version: 1.20.1-cli.165
• OS: Ubuntu Linux
• Node.js version: v22.17.1
• Installation method: npm global install
• Running via: PM2 with ecosystem.config.js

Issue Summary

Experiencing multiple critical issues when running qodo as a Slack bot via Socket Mode, including WebSocket connection failures, event handling errors, and configuration warnings.

Issues Encountered

  1. Slack Socket Mode WebSocket Connection Failures
[ERROR] socket-mode:SlackWebSocket:2 WebSocket error occurred: Unexpected server response: 408
[ERROR] socket-mode:SocketModeClient:0 WebSocket error! Error: Unexpected server response: 408
❌ Socket Mode error: Error: Unexpected server response: 408
  1. Slack Event Handling TypeError
Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
    at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)

Condition

Slack Event Handling TypeError happen every time SlackBot be mentioned

Full logs

8|qodo-slack  | 2025-09-10T03:39:02: 📬 Sending message to Slack thread: 1757475522.629119
8|qodo-slack  | 2025-09-10T03:39:02: 📝 Updated session with outgoing message: C09F6F1E3KJ:1757475522.629119:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:39:03: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)
8|qodo-slack  | 2025-09-10T03:39:29: 📨 Received message via Socket Mode
8|qodo-slack  | 2025-09-10T03:39:29: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)
8|qodo-slack  | 2025-09-10T03:39:29: 📨 Received app mention via Socket Mode
8|qodo-slack  | 2025-09-10T03:39:29: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)
8|qodo-slack  | 2025-09-10T03:39:29: 🔄 Creating new Slack session: C09F6F1E3KJ:1757475567.536189:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:39:29: 📨 Processed incoming message for session: C09F6F1E3KJ:1757475567.536189:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:40:30: 📨 Received message via Socket Mode
8|qodo-slack  | 2025-09-10T03:40:30: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)
8|qodo-slack  | 2025-09-10T03:40:30: 📨 Received app mention via Socket Mode
8|qodo-slack  | 2025-09-10T03:40:30: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)
8|qodo-slack  | 2025-09-10T03:40:30: 🔄 Creating new Slack session: C09F6F1E3KJ:1757475629.557079:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:40:30: 📨 Processed incoming message for session: C09F6F1E3KJ:1757475629.557079:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:40:31: ⚠️ No bot messages with session IDs found
8|qodo-slack  | 2025-09-10T03:40:33: 📤 Created response context for session: C09F6F1E3KJ:1757475629.557079:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:40:54: 📬 Sending message to Slack thread: 1757475629.557079
8|qodo-slack  | 2025-09-10T03:40:55: 📝 Updated session with outgoing message: C09F6F1E3KJ:1757475629.557079:U0510N5F0CX
8|qodo-slack  | 2025-09-10T03:40:56: Error handling Slack event via Socket Mode: TypeError: Cannot read properties of undefined (reading 'type')
8|qodo-slack  |     at _0x4cda5a.<anonymous> (file:///home/ubuntu/.nvm/versions/node/v22.17.1/lib/node_modules/@qodo/command/dist/cli.js:2:3685739)

message on slack:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions