Skip to content

Socket mode is unreliable #1151

@ngryman

Description

@ngryman

Description

Hey Slack friends,

I'm facing issues with the socket mode and I wonder if you could help me figure out what could be happening 🙏

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

I'm mostly interested in processing message events. This particular event has been pretty unreliable for me. By unreliable I mean that some events will arrive with a pretty big delay (ie. dozens of seconds) or never arrive at all. Weirdly subtypes like message_deleted seem to be more reliable with almost no delay.

Reproducible in:

package version: 3.7.0

node version: 16.5.0

OS version(s): OS X Big Sur 11.5.2 (20G95)

Steps to reproduce:

  1. Create a simple app:
const { App } = require("@slack/bolt");
const dotenv = require("dotenv");

dotenv.config();

const app = new App({
  token: process.env.BOT_TOKEN,
  socketMode: true,
  appToken: process.env.APP_TOKEN,
});

(async () => {
  await app.start();
  app.message(async ({ message }) => {
    console.log(message);
  });
  console.log("⚡️ Bolt app started");
})();
  1. Send a couple of short messages (ie. "1", "2", "3")
  2. Sometimes only the first two arrive, sometimes none.
  3. Delete one of the messages
  4. The message_deleted event almost always arrive immedialy.

Additional remarks:

  • Originally I'm developing a bot written in Rust and I face the exact same issue with reliability in Rust. So I don't think it's bolt-js specific. I'm not exactly sure who to reach out to investigate this issue though.
  • I'm developing at home with no firewall or proxy. I don't know if this helps but here is my connection test results using your tool.
  • I'm located in Barcelona, Spain, UTC+2 timezone. Not sure if this is relevant at this point, but if you can't reproduce in a different location, it might be related to a specific infrastructure region.

Expected result:

All events consistently arrive with a "reasonable delay".

Actual result:

Not all events arrive, some seem to be lost.

Attachments:

Please let me know if you need more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs infoAn issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more infoquestionM-T: User needs support to use the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions