vwo-node-sdk icon indicating copy to clipboard operation
vwo-node-sdk copied to clipboard

fix: fixing unhandled exception when fetching settings file

Open lytvynenko opened this issue 3 years ago • 4 comments

We are seeing several server crashes caused by VWO SDK throwing unhandled exception.
Turned out the http(s).get doesn't have on("error") handler attached, which causes node crash if any HTTP(S) errors happen.

lytvynenko avatar Dec 28 '22 04:12 lytvynenko

Codecov Report

Base: 93.18% // Head: 93.02% // Decreases project coverage by -0.15% :warning:

Coverage data is based on head (2cc8a2c) compared to base (63ada71). Patch coverage: 16.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   93.18%   93.02%   -0.16%     
==========================================
  Files          59       59              
  Lines        2420     2424       +4     
  Branches      560      560              
==========================================
  Hits         2255     2255              
- Misses        159      163       +4     
  Partials        6        6              
Flag Coverage Δ
Linux 93.02% <16.66%> (-0.16%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/utils/SettingsFileUtil.js 83.60% <16.66%> (-5.87%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Dec 29 '22 19:12 codecov-commenter

hey @softvar! any chance to review this one? Not having .on("error") makes impossible to wrap getSettingFile in try/catch to handle any connectivity issues (like one from yesterday when https://dev.visualwebsiteoptimiser.com had an invalid SSL cert causing unhandled 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' error)

lytvynenko avatar Jul 12 '23 04:07 lytvynenko

Hey @lytvynenko, this issue has been resolved.

We had updated SSL certificates on all our nodes today, and due to a certificate change, the SSL certificate was not fully accepted by all the machines. We became aware and resolved the issue on our end.

Let us work on adding an .on("error") for getSettingFile, in a future release.

hey @softvar! any chance to review this one? Not having .on("error") makes impossible to wrap getSettingFile in try/catch to handle any connectivity issues (like one from yesterday when https://dev.visualwebsiteoptimiser.com had an invalid SSL cert causing unhandled 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' error)

rohitesh-wingify avatar Jul 12 '23 04:07 rohitesh-wingify

Is this getting added in a future release any time soon? Consistently hitting errno: -54, code: 'ECONNRESET' in one of our projects.

shanelynamneilson avatar Jan 08 '24 15:01 shanelynamneilson