From 2c70182758710462d2ae3ab569589c31b4e7e32c Mon Sep 17 00:00:00 2001 From: mhawryluk Date: Wed, 12 Aug 2026 17:03:49 +0200 Subject: [PATCH 1/2] Patch Skia to fix iOS chart crash and charts stuck loading --- ...a+2.4.14+003+fix-dispose-symbol-eval.patch | 18 ++++++++++++ patches/@shopify/react-native-skia/details.md | 28 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 patches/@shopify/react-native-skia/@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch diff --git a/patches/@shopify/react-native-skia/@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch b/patches/@shopify/react-native-skia/@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch new file mode 100644 index 000000000000..aca8d05aaef6 --- /dev/null +++ b/patches/@shopify/react-native-skia/@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch @@ -0,0 +1,18 @@ +diff --git a/node_modules/@shopify/react-native-skia/cpp/jsi/JsiHostObject.cpp b/node_modules/@shopify/react-native-skia/cpp/jsi/JsiHostObject.cpp +index ef1654d..b41fbfd 100644 +--- a/node_modules/@shopify/react-native-skia/cpp/jsi/JsiHostObject.cpp ++++ b/node_modules/@shopify/react-native-skia/cpp/jsi/JsiHostObject.cpp +@@ -85,8 +85,11 @@ jsi::Value JsiHostObject::get(jsi::Runtime &runtime, + + // Check for dispose symbol as last resort + static const auto disposeSymbol = jsi::PropNameID::forSymbol( +- runtime, +- eval(runtime, "Symbol.for('Symbol.dispose');").getSymbol(runtime)); ++ runtime, runtime.global() ++ .getPropertyAsObject(runtime, "Symbol") ++ .getPropertyAsFunction(runtime, "for") ++ .call(runtime, "Symbol.dispose") ++ .getSymbol(runtime)); + if (jsi::PropNameID::compare(runtime, disposeSymbol, name)) { + // Recursively call get with "dispose" string + auto disposeName = jsi::PropNameID::forAscii(runtime, "dispose"); diff --git a/patches/@shopify/react-native-skia/details.md b/patches/@shopify/react-native-skia/details.md index e513c934704c..556ca47e3593 100644 --- a/patches/@shopify/react-native-skia/details.md +++ b/patches/@shopify/react-native-skia/details.md @@ -68,3 +68,31 @@ - Upstream PR/issue: https://github.com/Shopify/react-native-skia/pull/3996 — applies the same defensive handling (and the `skia-surface-unavailable` event) to upstream `main`, where the throws now live in the renderer constructor and `onResize`. Once it ships in a release we consume, this patch can be dropped. - E/App issue: https://github.com/Expensify/App/issues/97104 - PR introducing patch: https://github.com/Expensify/App/pull/97219 + +### [@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch](@shopify+react-native-skia+2.4.14+003+fix-dispose-symbol-eval.patch) + +- Reason: + + ``` + Fixes two iOS failures with one cause: the Top merchants pie chart killing the app + (Sentry APP-K19, fatal unhandled "SyntaxError: Parsing source code unsupported: + Symbol.for('Symbol.dispose');"), and every Line and Bar chart sitting on an indefinite + loading spinner because their fonts never load. + + JsiHostObject::get() falls back to a "dispose symbol" check for any property it does + not recognise, and that check calls jsi::eval(). Hermes without a runtime compiler + rejects that, so any unknown property read on a Skia host object throws instead of + returning undefined: + + - Pie: reaches skia's ReanimatedRecorder, whose + isSharedValue worklet reads _isReanimatedSharedValue on the SkPath. Nothing catches + the throw, so the app terminates. + - Line/Bar: Skia.Data.fromURI resolves with an SkData host object and promise + resolution reads .then on it, so every typeface load rejects, the font manager is + never built, and the charts never leave their loading state. + + Fix: obtain the symbol through runtime.global() instead of eval. + ``` + +- Upstream PR/issue: https://github.com/Shopify/react-native-skia/pull/3855 — the same fix, merged upstream on 2026-05-26. Drop this patch once the Skia dependency is bumped to >= 2.6.9. +- E/App issue: https://github.com/Expensify/App/issues/98331, https://github.com/Expensify/App/issues/95905 From 7334f834fd510e7609231ca6f8927a74d6217085 Mon Sep 17 00:00:00 2001 From: mhawryluk Date: Wed, 12 Aug 2026 17:12:35 +0200 Subject: [PATCH 2/2] Link PR introducing patch --- patches/@shopify/react-native-skia/details.md | 1 + 1 file changed, 1 insertion(+) diff --git a/patches/@shopify/react-native-skia/details.md b/patches/@shopify/react-native-skia/details.md index 556ca47e3593..515a8377ec20 100644 --- a/patches/@shopify/react-native-skia/details.md +++ b/patches/@shopify/react-native-skia/details.md @@ -96,3 +96,4 @@ - Upstream PR/issue: https://github.com/Shopify/react-native-skia/pull/3855 — the same fix, merged upstream on 2026-05-26. Drop this patch once the Skia dependency is bumped to >= 2.6.9. - E/App issue: https://github.com/Expensify/App/issues/98331, https://github.com/Expensify/App/issues/95905 +- PR introducing patch: https://github.com/Expensify/App/pull/98437