question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Websockets mode with custom receiver

See original GitHub issue

Description

I was testing out socket mode with an existing bot but was met with dispatch_failed errors. Turns out this was because the bot was using a custom express receiver, which takes the place of SocketModeReceiver in the framework code. I don’t think I encountered any mention of this while I was reading about socket mode… Or if this is mentioned somewhere, I’d recommend calling this out somewhere a little more discoverable.

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

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version: 3.0.0

node version: 14

OS version(s):

Steps to reproduce:

  1. Go back in time and create a bolt app with a custom express receiver before websocket mode was released
  2. migrate to Bolt v3
  3. enable socket mode
  4. confusion

Expected result:

It would be cool if the bolt framework could somehow tell you that the express receiver provided wasn’t a correct implementation of a websocket receiver if App is initialized with socketMode flipped on. Not sure of the feasibility of this though.

I had turned on developerMode at some point hoping to see some kind of error message but saw none. It wasn’t until I actually got socket mode working that I realized that I was supposed to get additional socket-related logs.

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
smonetacommented, May 21, 2021

In the bolt js documentation it mentions a code for SocketModeReceiver but does not provide an example for a custom route… any change to add one? . I tested the code there but it fails to start saying that :

const socket_mode = new SocketModeReceiver({
                    ^

TypeError: SocketModeReceiver is not a constructor
0reactions
seratchcommented, Aug 18, 2021

To track the progress in a single place, let us close this issue now. Please check #866 for this topic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intro to Socket Mode - Slack API
Socket Mode allows your app to communicate with Slack via a WebSocket URL. WebSockets use a bidirectional stateful protocol with low latency to...
Read more >
Writing WebSocket servers - Web APIs | MDN
A WebSocket server is nothing more than an application listening on any port ... The task of creating a custom server tends to...
Read more >
Socket to me. Build custom Slack integrations… | by Jim Ray
Enable Socket Mode through the settings section of your app's configuration page. Apps can choose the delivery protocol, WebSocket or HTTP. It's ...
Read more >
25. WebSocket Support - Spring
That format can be custom, framework-specific, or a standard messaging protocol. The Spring Framework provides support for using STOMP — a simple, messaging ......
Read more >
Work with WebSockets - Flutter documentation
Work with WebSockets · Connect to a WebSocket server. · Listen for messages from the server. · Send data to the server. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found