statsig-io / node-js-server-sdk

Statsig's SDK for server-side Node.js applications.
ISC License
21 stars 14 forks source link

Failed while attempting to sync values: Unexpected end of JSON input #10

Closed re-sounding closed 2 years ago

re-sounding commented 2 years ago

statsig-node v4.16.1. Node + Typescript + Webpack.

I have no dynamic configuration, gates, or experiments setup. When calling logEvent with localMode: true, Failed while attempting to sync values: Unexpected end of JSON input is logged to the console.

The debugger points to this line, where the value of specsString is ''. This does not happen when localMode: false. Screenshot 2022-06-20 at 19 35 12

Additional context: I'm using Webpack and had to jump through a few hoops to get fetch and Response to be available globally. Let me know if I can provide any further information.

tore-statsig commented 2 years ago

Ah thanks for the report - we will get this fixed up

tore-statsig commented 2 years ago

This should be fixed in v4.17.0 by this change: https://github.com/statsig-io/node-js-server-sdk/commit/1d2c2a66d58d808c68ca8330c526f79202fcb511