Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [RUMF-1060] fix failing worker detection in Firefox #1139

Merged
merged 21 commits into from
Oct 26, 2021

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Oct 15, 2021

Motivation

In Firefox, when the worker fails to instanciate because of CSP rules, it doesn't throw an error like Chromium does, but rather emits a error event asynchronously.

Changes

  • Make sure we catch error events from the worker
  • When creating the worker, check if the communication succeeds by sending an 'init' action and waiting for a 'initialized' response.

Testing

CI, manual


I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested review from a team as code owners October 15, 2021 14:48
packages/rum/test/utils.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/recorderApi.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/startRecording.spec.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2021

Codecov Report

Merging #1139 (287d6b0) into main (332724b) will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1139      +/-   ##
==========================================
+ Coverage   89.16%   89.44%   +0.27%     
==========================================
  Files          93       93              
  Lines        4201     4253      +52     
  Branches      962      972      +10     
==========================================
+ Hits         3746     3804      +58     
+ Misses        455      449       -6     
Impacted Files Coverage Δ
packages/core/src/domain/internalMonitoring.ts 95.89% <100.00%> (+0.36%) ⬆️
packages/rum/src/boot/recorderApi.ts 100.00% <100.00%> (ø)
...ckages/rum/src/domain/segmentCollection/segment.ts 100.00% <100.00%> (+2.32%) ⬆️
...src/domain/segmentCollection/startDeflateWorker.ts 100.00% <100.00%> (ø)
packages/rum/test/utils.ts 85.54% <100.00%> (+1.27%) ⬆️
...e/src/domain/configuration/experimentalFeatures.ts 92.30% <0.00%> (-7.70%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 332724b...287d6b0. Read the comment docs.

@amortemousque amortemousque force-pushed the benoit/fix-failing-worker-detection-in-firefox branch from a703632 to 49acaf4 Compare October 21, 2021 14:16
@amortemousque amortemousque merged commit 60cc2dd into main Oct 26, 2021
@amortemousque amortemousque deleted the benoit/fix-failing-worker-detection-in-firefox branch October 26, 2021 07:57
@BenoitZugmeyer BenoitZugmeyer restored the benoit/fix-failing-worker-detection-in-firefox branch November 2, 2021 08:53
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/fix-failing-worker-detection-in-firefox branch November 2, 2021 10:06
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.

5 participants