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

Error with Asterisk 14.7.0-rc1 #98

Closed
jaunis opened this issue Oct 16, 2017 · 3 comments
Closed

Error with Asterisk 14.7.0-rc1 #98

jaunis opened this issue Oct 16, 2017 · 3 comments

Comments

@jaunis
Copy link

jaunis commented Oct 16, 2017

The node-ari-client library is not working any more with Asterisk 14.7.0-rc1. It is failing during initialization with the following error :

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Object.obj.on.response (/usr/lib/node_modules/ari-client/node_modules/swagger-client/lib/swagger.js:136:44)
    at EventEmitter.res.response (/usr/lib/node_modules/ari-client/node_modules/swagger-client/lib/swagger.js:1309:19)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)
    at emit (/usr/lib/node_modules/ari-client/node_modules/swagger-client/node_modules/shred/lib/shred/request.js:457:21)
    at /usr/lib/node_modules/ari-client/node_modules/swagger-client/node_modules/shred/lib/shred/request.js:477:9
    at setBodyAndFinish (/usr/lib/node_modules/ari-client/node_modules/swagger-client/node_modules/shred/lib/shred/response.js:103:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/ari-client/node_modules/swagger-client/node_modules/shred/lib/shred/response.js:120:7)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:921:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

I think it is due to Asterisk sending the HTTP headers and the body in two separate TCP packets. The issue is probably not on the Asterisk side, since standard tools like CURL are able to handle the response.

Everything was working fine until Asterisk 14.6.2.

@jaunis
Copy link
Author

jaunis commented Oct 26, 2017

Well, maybe this has been fixed in 14.7.0-rc2 (see https://issues.asterisk.org/jira/browse/ASTERISK-27372). I will test it as soon as I can and keep you informed.

@asteriskteam
Copy link

asteriskteam commented Oct 26, 2017 via email

@jaunis
Copy link
Author

jaunis commented Nov 9, 2017

I've tested with version 14.7.1, it's working. Thanks a lot !

@jaunis jaunis closed this as completed Nov 9, 2017
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

2 participants