Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twilio Dialogflow Integration error : 'ERR_STREAM_WRITE_AFTER_END' #194

Open
rajivcoomarHS opened this issue Sep 7, 2022 · 3 comments
Open

Comments

@rajivcoomarHS
Copy link

After performing the steps given in the readme, when tried to make call, getting below error.

node server.js

Your app is listening on port 3000
Captured call CAe8bda7bf19bf88b6d3f171132fd877a1
Sending audio (44840 characters)
node:events:346
throw er; // Unhandled 'error' event
^

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at new NodeError (node:internal/errors:329:5)
at ClientHttp2Stream.Writable.write (node:internal/streams/writable:329:11)
at /Users/robert/Desktop/dialogflow-integration/node_modules/@grpc/grpc-js/build/src/call-stream.js:416:34
at processTicksAndRejections (node:internal/process/task_queues:94:5)
Emitted 'error' event on Http2CallStream instance at:
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 'ERR_STREAM_WRITE_AFTER_END'
}

@RaheelAshraf
Copy link

I am getting the same issue

@komirellipavan
Copy link

@RaheelAshraf @rajivcoomarHS I had the same issue. Some how WebSocket connection is dropping.

In server.js file add code lines in between 2 and 4. It should work

 1. dialogflowService.on("audio", audio => {
 2.  mediaStream = websocketStream(ws, {
 3.     binary: false
 4.  });

@RaheelAshraf
Copy link

@komirellipavan I was facing the issue while testing with ngrok. When I deployed the code on the cloud it started working fine

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

No branches or pull requests

3 participants