v10.52.1
v10.52.1
Fix: the native cold-start check never armed on HarmonyOS
HarmonyOS only. Android and iOS builds are identical to 10.52.0.
RNOH exposes an ArkTS TurboModule to JS exclusively through a C++ method table (PushyTurboModule.cpp), and that table was never taught the methods added since 10.50: syncNativeConfig, getNativeCheckCache, getBundleHash, resetToPackagedBundle. On the JS side they were undefined, so the SDK's old-native feature detection silently treated the capability as absent. The consequences on HarmonyOS in 10.51.0–10.52.0:
- the native cold-start check never ran (its config was never persisted), which also made 10.52.0's resumable downloads and zero-delay retry dead code there;
resetToPackagedBundle()was unusable from JS.
This release registers the missing methods, with a warning comment making the rule explicit: every new spec method must also be registered in the C++ glue.
Verified end-to-end on the DevEco simulator, which also settled an open question in our design doc: an uncaught JS error does not kill the process on RNOH — Hermes runs on RNOH-managed threads and the error only gets logged. The native check therefore completes its round even when JS dies on launch: in the experiment, a bundle that crashed 1s into every launch was replaced and the fix booted on the next launch. HarmonyOS needs no crash-moment hold (the mechanism 10.52.0 added for Android & iOS); its process model is naturally immune, and with this fix the recovery path is fully live there.
Why CI missed it: the HarmonyOS e2e suite never ran the native-check scenario, and the graceful old-native fallback hid the breakage. A HarmonyOS native-check e2e case is queued as follow-up.
HarmonyOS users on 10.51.0–10.52.0 should upgrade. Everything else is unchanged from 10.52.0.
修复:原生冷启动检测在鸿蒙上从未生效
仅鸿蒙。Android 与 iOS 构建与 10.52.0 完全一致。
RNOH 的 ArkTS TurboModule 只能通过 C++ 方法表(PushyTurboModule.cpp)暴露给 JS,而该表从未注册 10.50 起新增的方法:syncNativeConfig、getNativeCheckCache、getBundleHash、resetToPackagedBundle。JS 侧拿到的是 undefined,SDK 的老原生特性检测于是静默跳过。10.51.0–10.52.0 期间在鸿蒙上的后果:
- 原生冷启动检测从未运行(配置从未落盘),10.52.0 新增的断点续传与零延迟重试在鸿蒙也因此是死代码;
resetToPackagedBundle()在 JS 侧不可用。
本版补全注册,并以醒目注释固化规则:每个新增的 spec 方法都必须同步注册进 C++ 胶水层。
已在 DevEco 模拟器上端到端验证,同时也解决了设计文档里一个悬而未决的问题:RNOH 下未捕获的 JS 错误不会杀死进程——Hermes 跑在 RNOH 自管线程上,错误只会被记录。因此即使 JS 启动即崩,原生检测也照常完成整轮:实验中一个每次启动 1 秒即崩的 bundle 被替换,下次启动直接进入修复版。鸿蒙不需要 10.52.0 为 Android/iOS 引入的崩溃时刻扣留机制——其进程模型天然免疫,补上本修复后救援链路在鸿蒙完整生效。
CI 未能发现的原因:鸿蒙 e2e 套件从未运行 native-check 场景,而兼容老原生的优雅降级把断裂藏住了。补充鸿蒙 native-check e2e 用例已列入后续。
10.51.0–10.52.0 的鸿蒙用户请升级。其余与 10.52.0 一致。