Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

An error occurred when use_sockets is set to false #27

Open
msjaber opened this issue Feb 13, 2018 · 3 comments
Open

An error occurred when use_sockets is set to false #27

msjaber opened this issue Feb 13, 2018 · 3 comments
Assignees

Comments

@msjaber
Copy link

msjaber commented Feb 13, 2018

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

@msjaber msjaber changed the title An error occurred when use_sockets set to false An error occurred when use_sockets is set to false Feb 13, 2018
@peterswimm peterswimm assigned peterswimm and benbrown and unassigned peterswimm Feb 13, 2018
@adantoscano
Copy link

adantoscano commented Feb 14, 2018 via email

@msjaber
Copy link
Author

msjaber commented Feb 14, 2018

@adantoscano Hmm... I only changed use_socket to false and didn't try to reply anything. Try to Remix it on Glitch and see.

@adantoscano
Copy link

adantoscano commented Feb 14, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants