Skip to content

bolt-socket-mode establishes a connection before a SocketModeApp#start()/startAsync() method call #937

Closed

Description

@seratch

The following code has not yet started the socketModeApp.

var app = new App(AppConfig.builder().singleTeamBotToken(System.getenv("SLACK_BOT_TOKEN")).build());
var socketModeApp = new SocketModeApp(System.getenv("SLACK_APP_TOKEN"), app);
// socketModeApp.start();
Thread.sleep(Long.MAX_VALUE);

However, the log outputs says:

2022-02-18 07:00:58,834 INFO [socket-mode-session-monitor-worker-39] com.slack.api.socket_mode.SocketModeClient The current session is no longer active. Going to reconnect to the Socket Mode server.
2022-02-18 07:00:59,756 INFO [Grizzly(1)] com.slack.api.socket_mode.SocketModeClient New session is open (session id: b3a24a85-3505-4fc5-93ea-7db775496406)

This is due to the default behavior of the underlying SocketModeClient. However, this is an unexpected behavior for bolt-java users and that should be improved in future releases.

Reproducible in:

Any versions

The Slack SDK version

v1.19.0

Java Runtime version

any

OS info

any

Steps to reproduce:

See the description

Activity

  1. added
    bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
    on Feb 17, 2022
  2. added this to the 1.20.0 milestone on Feb 17, 2022
  3. self-assigned this
    on Feb 17, 2022
  4. added 2 commits that reference this issue on Feb 18, 2022
    637cc09
    0e288d9
  5. added a commit that references this issue on Feb 19, 2022
    0b7081a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documentedproject:boltproject:slack-api-clientproject:slack-api-client

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions