FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

r11s-driver: fix prefetch uncaught exceptions

Open znewton opened this issue 1 year ago • 1 comments

Description

PrefetchDocumentStorageService includes many fire-and-forget API calls. However, it uses the void keyword to mark those as intentionally un-awaited, rather than using .catch(() => {}) to explicitly catch and ignore errors. This results in Unhandled Promise Rejection errors that crash the runtime if those API calls fail.

To fix this, I'm simply replacing the void uses with .catch(() => {}).

Resolves #22214

TODO:

  • [ ] Add Regression Tests
  • [ ] Confirm with issue creator that disabling prefetch mitigates the issue.

znewton avatar Aug 22 '24 22:08 znewton

@fluid-example/bundle-size-tests: +293 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 457.84 KB 457.88 KB +35 Bytes
azureClient.js 555.02 KB 555.11 KB +97 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 258.65 KB 258.67 KB +14 Bytes
fluidFramework.js 403.74 KB 403.75 KB +14 Bytes
loader.js 134.2 KB 134.22 KB +14 Bytes
map.js 42.25 KB 42.25 KB +7 Bytes
matrix.js 146.42 KB 146.42 KB +7 Bytes
odspClient.js 523.16 KB 523.21 KB +49 Bytes
odspDriver.js 97.66 KB 97.68 KB +21 Bytes
odspPrefetchSnapshot.js 42.72 KB 42.73 KB +14 Bytes
sharedString.js 163.12 KB 163.13 KB +7 Bytes
sharedTree.js 394.25 KB 394.26 KB +7 Bytes
Total Size 3.29 MB 3.29 MB +293 Bytes

Baseline commit: 1a86c7d256838b797c736bd7be602189654ff80a

Generated by :no_entry_sign: dangerJS against a06fa7eb2ea7241621a210494dcae008acc53f0f

msfluid-bot avatar Aug 22 '24 23:08 msfluid-bot

This PR has been automatically marked as stale because it has had no activity for 60 days. It will be closed if no further activity occurs within 8 days of this comment. Thank you for your contributions to Fluid Framework!