Comments (6)
Same issue here, when sending a message through RTM with the the following code:
rtm.SendMessage(rtm.NewOutgoingMessage(mytext, IDchannel))
The RTM event I receive:
event.type: "outgoing_error"
event.data: write tcp 10.0.0.212:57025->54.172.82.211:443: i/o timeout
EDIT:
There is not the issue when using this code:
api.PostMessage(IDchannel, mytext,slack.PostMessageParameters{AsUser: true})
from slack.
Worked fine before, but started a few days ago. This code:
rtm.SendMessage(rtm.NewTypingMessage(event.Channel))
now results in i/o timeout and disconnect:
OutgoingError: write tcp 172.*.*.*:41407->54.225.22.47:443: i/o timeout
Disconnected: intentional false
IncomingError: read tcp 172.*.*.*:41407->54.225.22.47:443: use of closed network connection
Looks like RTM hits some new rate limits, and Slack closes connection. I had to turn off typing notifications. api.PostMessage works fine.
from slack.
So I'm using this wrapper for the bot, which uses rtm.SendMessage
: https://github.com/BeepBoopHQ/go-slackbot/blob/master/bot.go#L116, this one times out regularly. @ignat you're saying if I replace that with api.PostMessage
it would work?
That's cool, I'm just curious what we can do for this lib to fix RTM as well.
from slack.
I think this is related with nlopes@b7940f2.
I'm reverting until I have some time to look into these issues.
from slack.
Reverted branch works well indeed.
from slack.
I can confirm that this commit caused the problem: nlopes@8955910
Also, it seems that we're attempting to set the write deadline on the PING only where in actuality when using SetWriteDeadline
it affects any writes thereafter on the current connection.
So there are two issues:
- the one second deadline is too short
SetWriteDeadline
should probably be moved toManageConnection()
I just submitted this PR #102 to resolves these issues.
from slack.
Related Issues (20)
- Webhook Sending Functions Seem to Use the Regular JSON Encoder Which Escapes HTML Characters Unnecessarily HOT 1
- Get Block data from webhook payload
- request for a release cut HOT 2
- Release 0.21.4 breaks slash commands in socket mode
- Slash Command returns "bad_error_message" HOT 7
- file_input feature support in slack-go HOT 2
- Unable to render buttons using slack.Attachment HOT 2
- Receiving no payload on websocket based events HOT 2
- Custom http client Resty retry function does not work
- Not possible to set initial value of RichTextInputBlockElement due to wrong type HOT 1
- bug: Missing `team_id` param HOT 1
- Why doesn't the getFile method return []body HOT 1
- Unable to post messages when in deployment HOT 2
- files.upload is getting deprecated by Slack HOT 1
- Upload Files V2: Ability to upload multiple files in one message HOT 1
- UploadFileV2 uploads incorrectly when using text `Content` parameter
- conversations.history unmarshall bug HOT 1
- AddRemoteFile fails because of token in querystring HOT 4
- Slack Functions HOT 2
- Events API Reconciliation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack.