opentok / opentok-node

OpenTok Server SDK for node.js
MIT License
164 stars 167 forks source link

2.17.0 breaks due to SyntaxError, automatic json parsing in needle #316

Closed borkanee closed 6 months ago

borkanee commented 1 year ago

2.17.0 breaks when using listStreams and probably listBroadcasts and stopBroadcast as well,, we have gone back to 2.16.0 in the meantime.

It seems to be related to the switch from request to needle as needle automatically parses json unless options.parse is set to false and as far is I can see it is not set at the moment in version 2.17.0, which leads to JSON.parse() throwing errors. You could either set parse:false on the specific request or simply change the defaults for all request by setting _parseresponse: false: on the defaults. Read more here: https://github.com/tomas/needle/#overriding-defaults

Another option could be to simply remove the JSON.parse() in the requestCallbacks.

tapz commented 1 year ago

I created a ticket to Vonage about this.

manchuck commented 6 months ago

This has been resolved