JSON parse error for webhook

I am implementing the auto-scaling feature released in 2.15.0. I am building and API to interface with my cloud provider to scale up and down the KMS nodes. I have no problems receiving both the autoscaling and media node status changed web hooks. For some reason when there are no KMS nodes in the pool (i.e. at startup) my server receives a message that cannot be parsed.

“SyntaxError: Unexpected token N in JSON at position 567”

I’m not sure why this is the case as it seems to go away once I manually add a KMS node. But until I add the first node the ov Controller will not auto scale. Any help would be appreciated.

use 2.15.1 i supposed you are using pro
and second at least 1 master openvidu server +1 kms need running always

Hi,

Thanks I am using pro, and have upgraded to 2.15.1 I was just referencing the version when they released the autoscaling.

ok
i confused with version you given

Hi,

I was reviewing this issue, but I’m not able to replicate it. If I start OpenVIdu Pro with the following configuration:

OPENVIDU_PRO_CLUSTER_MEDIA_NODES=0
OPENVIDU_PRO_CLUSTER_AUTOSCALING_MAX_NODES=1
OPENVIDU_PRO_CLUSTER_AUTOSCALING_MIN_NODES=0

On startup no WebHook events will be registered (no mediaNodeStatusChanged neither autoscaling events), as the cluster will not launch a Media Node on its own and the autoscaling algorithm will not be triggered at this stage.
The only way to start receiving events is to manually launch the first Media Node. But all the WebHook events that this action generates are prefectly valid stringified JSON objects.

How can I replicate this problem?