We just updated to Vega 0.23 in our development environment and got a crash on using cloneDeepfrom lodash-es in an asynchronous call that did not crash when compiling against Vega 0.22:
TypeError: target property is non-configurable and non-writable,
and get trap result differs from target property value
It seems that 0.23 is stricter in checking ECMAScript Proxy specification invariants. This is easily solved, but because the Vega Sdk is not shipped with the app, but the app uses the one that is installed on the Firestick, I am concerned that our already released app (built with < 0.23) might show this crash on Firesticks with version 0.23. Is that the case? Or are there precautions in place on Vega OS that guarantee apps built with an Sdk < 0.23 will not show this crash?
What’s happening in 0.23:
The stricter Proxy invariant enforcement partner is seeing is correct per the ECMAScript specification (§10.5.8). The 0.22 engine was lenient and didn’t enforce that a get trap on a non-configurable, non-writable property must return the same value as the target. 0.23 now enforces this correctly. This is not a bug - it’s a spec-compliance improvement.
Regarding already-released app:
Based on our understanding of the runtime architecture, the already-released app should not crash unless it is rebuilt with v0.23 and published again. We are confirming with the VegaScript team whether backward-compatibility mechanisms (such as runtime version pinning per app target SDK) shield released builds from this behavior change on devices that OTA to 0.23. We’ll update this thread once we have a definitive answer.
What we recommend in the meantime:
Fix the issue in your codebase now. Replace cloneDeep from lodash-es with structuredClone (native, no Proxy interaction) or a Proxy-safe deep copy utility. This is a straightforward fix and eliminates the problem regardless of the runtime version.
Submit an updated build targeting 0.23. Even if backward-compatibility protections exist, shipping a fixed version ensures your app is robust on all OS versions going forward.
Test using the Vega Virtual Device with SDK 0.23 to confirm the fix resolves the crash before submission.
We need your actual failing code pattern to dig deep into this issue.
Specifically what object is being passed to cloneDeep (React state? a store from MobX/Valtio/Immer? a navigation param?) and a minimal project that reproduces “works when built with 0.22, crashes when built with 0.23.”
Checking again @Matthias_Fesich
We need your actual failing code pattern to dig deep into this issue.
Specifically what object is being passed to cloneDeep (React state? a store from MobX/Valtio/Immer? a navigation param?) and a minimal project that reproduces “works when built with 0.22, crashes when built with 0.23.”