botkit-starter-web
botkit-starter-web copied to clipboard
An error occurred when use_sockets is set to false
Whenever use_sockets
in client.js
file is disabled, this error occurs.
An error occurred while sending a message: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
You are trying to send two replies or convos through a webhook
On Feb 13, 2018 22:09, "Mohammad S. Jaber" [email protected] wrote:
Whenever use_sockets is client.js file is disabled, this error occurs.
An error occurred while sending a message: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/howdyai/botkit-starter-web/issues/27, or mute the thread https://github.com/notifications/unsubscribe-auth/AJnCY4fiIbtc8sEy_JrvRJWgc2KTkN1Aks5tUfohgaJpZM4SEZ1X .
@adantoscano Hmm... I only changed use_socket
to false
and didn't try to reply anything. Try to Remix it on Glitch and see.
Yup but if you keep socket as true, you can see that you receive two messages cause skills/need_token.js is triggered when it starts. Changing socket to false you're using webhook and with it cannot perform more than a reply each input.
See https://github.com/howdyai/botkit-starter-web/blob/master/docs/botkit_chat_server.md#using-webhooks