Skip to content

fix: fixing unhandled exception when fetching settings file - #44

Open
lytvynenko wants to merge 1 commit into
wingify:masterfrom
lytvynenko:fix/fetch-settings-file-crash
Open

fix: fixing unhandled exception when fetching settings file#44
lytvynenko wants to merge 1 commit into
wingify:masterfrom
lytvynenko:fix/fetch-settings-file-crash

Conversation

@lytvynenko

Copy link
Copy Markdown

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.

@codecov-commenter

codecov-commenter commented Dec 29, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.02%. Comparing base (63ada71) to head (2cc8a2c).
⚠️ Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
lib/utils/SettingsFileUtil.js 16.66% 5 Missing ⚠️
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%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lytvynenko

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Contributor

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)

@shanelynamneilson

Copy link
Copy Markdown

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

@softvar
softvar force-pushed the master branch 2 times, most recently from 33a5f91 to 1d54f4e Compare March 25, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants