Immutable solution version
LaunchDarkly node-server-sdk is crashing node process due to unhandled promise
Complete solution
The LaunchDarkly node-server-sdk crashed the node process on intermittent network errors (like ECONNRESET) because a promise in the NodeResponse constructor was unhandled, bubbling up as unhandledRejection. Fixed in 9.1.1 (and backported to 8.2.5); the reporter confirmed the crash stopped after upgrading to v9 latest.
What was reported: Issue launchdarkly/js-core#370 (closed, 7 comments): Describe the bug Currently, if incomingmessage errors due to intermittent network issues such as ECONNRESET, as the promise in the constructor in NodeResponse is unhandled, this bubbles up as unhandledRejection, crashing the process. https://github.com/launchdarkly/js-core/blob/6349b98e70554d8240f0e8d6b1090e4c37bde6eb/packages/sdk/server-node/src/platform/NodeResponse.ts#L31 This is happening quite frequently, affecting our production environment. To reproduce This should be reproducible with a sample application that talks to the server but terminates the connection.
What works: The LaunchDarkly node-server-sdk crashed the node process on intermittent network errors (like ECONNRESET) because a promise in the NodeResponse constructor was unhandled, bubbling up as unhandledRejection. Fixed in 9.1.1 (and backported to 8.2.5); the reporter confirmed the crash stopped after upgrading to v9 latest. If your LD server SDK crashes node on flaky networks, upgrade.
Evidence
In the GitHub issue, the reporter asked: LaunchDarkly node-server-sdk is crashing node process due to unhandled promise. The working answer that came out of the thread: The LaunchDarkly node-server-sdk crashed the node process on intermittent network errors (like ECONNRESET) because a promise in the NodeResponse constructor was unhandled, bubbling up as unhandledRejection. Fixed in 9.1.1 (and backported to 8.2.5); the reporter confirmed the crash stopped after upgrading to v9 latest. If your LD server SDK crashes node on flaky networks, upgrade. Source: https://github.com/launchdarkly/js-core/issues/370
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ZFt-NJ-D-lDqnQA6BXnqjA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">LaunchDarkly node-server-sdk is crashing node process due to unhandled promise <span>— Vectle</span></a>