8000 App/patches/mapbox-gl/details.md at main · dominictb/App · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.4 KB

details.md

File metadata and controls

21 lines (16 loc) · 1.4 KB

mapbox-gl patches

  • Reason:

    `Map.remove()` calls `remove()` on the shared `MapLoadEvent` and `MapSessionAPI` telemetry singletons, which sets their
    `errorCb` to `null` without cancelling the telemetry request already in flight. When that request fails after the map is
    gone, its callback in `processRequests` calls `this.errorCb(e)` on the nulled field and throws
    `TypeError: this.errorCb is not a function` as an unhandled rejection (Sentry APP-FR5). On web this happens when the user
    leaves the distance map before the request to events.mapbox.com settles.
    
    The patch only calls `errorCb` while it is still set, in both `processRequests` callbacks in `dist/mapbox-gl.js`, the
    bundle `react-map-gl/mapbox` loads. Telemetry itself is unchanged. The bundle is minified onto a few very long lines,
    which is why the patch file is large for a two-expression change.
    
  • Upstream PR/issue: mapbox/mapbox-gl-js#13735, fixed upstream in https://github.com/mapbox/mapbox-gl-js/commit/8a04af5eb487d328457dfdd7ad25e5f656255c40, which ships in v3.36. Remove this patch when we upgrade to that version.

  • E/App issue: Expensify#100845

  • PR introducing patch: Expensify#106319

0