Repository navigation
fix(mobile): initialize text decoding before client startup - #479
harryisfish wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Stale comment
这次不合并。和当前 main 在
apps/mobile/app/_layout.tsx、apps/mobile/package.json和packages/docs/e2e.md冲突。当前入口已经是expo-router/entry,polyfill 由根布局引入,不再是这个分支上的index.ts。Hermes 缺 TextDecoder 这件事在 main 上还在:
packages/client/src/lib/secure.ts和transport.ts在模块顶层就构造 TextDecoder,手机根布局会引入它们,而polyfills.ts只补了 crypto。旧记录里的真机通过属于旧 head,iOS 模拟器 UI 并未通过。先按当前入口重做,再用当前 head 验收启动。在那之前不另开第二个同主题 PR。Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
Stale comment
本轮不合并。
对照
main@4ca16a8d:Hermes 启动崩溃根因还在。packages/client/src/lib/secure.ts和transport.ts仍在模块顶层构造TextDecoder;polyfills.ts只补了 crypto 和 URL;入口仍是expo-router/entry,polyfill 只挂在_layout。GitHub 现在显示 MERGEABLE,但分支落后main约 58 个提交,仍是 Draft。本 PR 用
index.ts在 Router 之前安装@bacons/text-decoder仍是对症方案。旧记录里的真机通过属于旧 head,iOS 模拟器 UI 当时也没通过。清理轮次不代合并、也不另开第二个同主题 PR。请先 integrate 最新main,跑test:polyfills与真机冷启动,通过后再去 Draft。Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
Stale comment
本轮不合并。
对照
main@9300b1f:仍是 Draft,现已 CONFLICTING。Hermes 缺 TextDecoder 的根因还在:packages/client/src/lib/secure.ts和transport.ts仍在模块顶层构造TextDecoder;polyfills.ts只补了 crypto 和 URL;入口仍是expo-router/entry。在
index.ts里、Router 之前安装@bacons/text-decoder仍是对症方案。旧真机记录属于旧 head。请先 integrate 最新 main,跑 polyfill 检查和冷启动,通过后再去 Draft。清理轮次不另开第二个同主题 PR。Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
Stale comment
本轮不合并。
对照
main@8a06a332:仍是 Draft 且 CONFLICTING。Hermes 缺 TextDecoder 的根因还在:packages/client/src/lib/secure.ts和transport.ts仍在模块顶层构造TextDecoder;polyfills.ts只补 crypto 和 URL;入口仍是expo-router/entry。这仍是对症方案。不另开同主题 PR。请作者按当前 main 重做后标 Ready,并在当前 head 上重跑移动端启动检查。
Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
Stale comment
本轮不合并。
仍是 Draft。Hermes 缺 TextDecoder 在当前 main 上还在:
packages/client/src/lib/secure.ts和transport.ts在模块顶层构造 TextDecoder;apps/mobile/src/platform/polyfills.ts只补 crypto 和 URL。不另开同主题 PR。描述里的真机记录属于旧基线
b5bc2a23。请作者按当前 main 重验吮并标 Ready。清理轮次不接走 Draft。Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
Stale comment
本轮不合并。
仍是 Draft,对照
main@07191092为 CONFLICTING。Hermes 缺 TextDecoder 在当前 main 上还在:packages/client/src/lib/secure.ts和transport.ts仍在模块顶层构造 TextDecoder;apps/mobile/src/platform/polyfills.ts只补 crypto 和 URL;入口仍是expo-router/entry。这仍是对症方案,不另开同主题 PR。请作者从当前 main 重做并提供当前 head 的启动验收。不把 Draft 改成 Ready。等下一轮。
Sent by Cursor Automation: Vibeface 清理
There was a problem hiding this comment.
本轮不合并。
仍是 Draft,对照 main @ 4ee0dcf2 为 CONFLICTING。Hermes 缺 TextDecoder 的根因还在:packages/client/src/lib/secure.ts 和 transport.ts 在模块顶层构造 TextDecoder;mobile polyfill 只补 crypto/URL;入口仍是 expo-router/entry。在 Router 之前安装解码 polyfill 仍是对症方案。请作者自行 rebase 并完成真机验收。不会接管 Draft,也不会另开同主题 PR。
Sent by Cursor Automation: Vibeface 清理


Why
iOS Release 启动时,共享客户端顶层创建 TextDecoder,但 Hermes 没有提供该全局对象,导致应用立即退出。
What changed
Scope
移动端 JavaScript 初始化。没有更改协议、存储或设备身份。
Verification
修复前检查复现缺少 TextDecoder;修复后启动检查和移动端类型检查通过。独立审查无 P0-P3,并通过 75,536 组 UTF-8 对照检查。配置的 CI 策略自检、Web 构建与打包资源进程检查、静态官网检查通过。已合入最新主分支 b5bc2a2,当前提交 5ab14fd,发行版本 0.0.1-nightly.20261106.3。底层库按 iOS 16.4 最低版本构建,当前 iPhone Release 已编译成功,包内源码标记与发行版本已核验。
已在物理 iPhone 17 Pro Max 完成签名校验、覆盖安装和启动验收;消息列表正常显示,进程持续存活。最终提交 Mobile CI Android 通过,iOS 模拟器 UI 因 daemon-rpc 超时失败,未当作通过。PR 保持 Draft。
Owner: harryisfish.