launchdarkly / node-server-sdk

LaunchDarkly Server-side SDK for Node
Other
79 stars 65 forks source link

Streaming not working with proxy after updating to SDK version 5.12.0 #186

Closed fredwes closed 4 years ago

fredwes commented 4 years ago

I am unable to successfully initialize the SDK (in streaming mode) after updating to version 5.12.0.

eli-darkly commented 4 years ago

It'd be easier for us to investigate this if you could provide some more information, as we request in the template that comes up when you start an issue:

Also, could you please show how you are configuring the SDK (with any sensitive information such as SDK key x'd out)?

eli-darkly commented 4 years ago

Another helpful piece of information would be what SDK version you were using when it did work. There are a lot more things that changed between 5.0.0 and 5.12.0 than between 5.11.3 and 5.12.0, for instance.

eli-darkly commented 4 years ago

I am able to reproduce a failure when using 5.12.0 with a proxy, and I know of at least one fix that is necessary, but I'd still like to get the above information to make sure that what you're seeing is really the same failure and not something else that also needs to be fixed.

fredwes commented 4 years ago

@eli-darkly Version 5.11.3 works and all versions 5.12.0 and greater do not.

SDK configuration:

LaunchDarklySDK.init('sdk-key', {
    logger,
    proxyHost: 'proxy.com',
    proxyPort: 1234,
    allAttributesPrivate: true,
    stream: true,
    sendEvents: false
  });
eli-darkly commented 4 years ago

Thanks! Looks like this is a straightforward bug in 5.12.0 that was my fault - it happened when we switched the Node SDK to use some shared code for streaming, instead of its own copy of that code which had a change in it that I had missed. Sorry about this and we'll have a patch out ASAP. I've also added better unit test coverage which would have caught this.

fredwes commented 4 years ago

Thanks @eli-darkly !

eli-darkly commented 4 years ago

There's a fix for this in 5.13.1. Please let us know when you've had a chance to retest with this release.

fredwes commented 4 years ago

Confirmed working now with v5.13.1. Thanks again @eli-darkly !