Android: initialize cannot be retried after it throws
維護者通常 3 天內回覆
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 57/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- android, react-native, typescript
研究方向
Start by reading the Android implementation of ReactNativeBrownfield.initialize, especially the initialized flag, nativeLibsLoaded, and the reactHostFactory path described in the report. Trace the retry behavior when native library loading or host creation throws, and check the Android tests covering initialization if present. Done means a failed call can be retried and the original error is not replaced by an uninitialized shared access.
由索引模型根據 Issue 內容生成。
描述
Description
On Android, ReactNativeBrownfield.initialize marks itself initialized before it does any work (initialized.getAndSet(true)). If loading native libraries or creating the ReactHost throws, the flag stays true:
- The first call throws, for example an
UnsatisfiedLinkErrorfrom a native module's static initializer whilePackageListis built insidereactHostFactory. - The host catches it and calls
initializeagain later. - The second call takes the "already initialized" branch and returns without error, but
instancewas never set. - The first
ReactNativeBrownfield.sharedaccess (for example inReactNativeFragment) throwsUninitializedPropertyAccessException.
nativeLibsLoaded has the same problem: if SoLoader.init or load() throws, a retry skips them.
So a host cannot recover from a failed start, and the real error is replaced by an unrelated one.
Context
We hit the first error in production: a Nitro module's System.loadLibrary failed with dlopen failed: library ".../split_config.arm64_v8a.apk!/lib/arm64-v8a/libX.so" not found on a few Android 13–14 devices. It was transient: the next process loaded it fine. We want to catch it and keep the app usable, but initialize cannot be retried today.
Expected
If initialize throws, the next call runs it again.
Versions
@callstack/react-native-brownfield5.1.0; the same code is in 6.0.1 andmain- React Native 0.86.3
- 主要語言
- TypeScript
- 星號
- 553
- 分支
- 58
- 平均合併
- 3 天 18 小時
- 30 天內合併 PR
- 16
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/react-native-brownfield 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
callstack/react-native-brownfield#502 · 1 則留言 ·
維護者通常 3 天內回覆
-
navigation:codegen: optional number and boolean params break the iOS build可能已有人在做 @RaphaelFakhri 於 2 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 45/100
callstack/react-native-brownfield#518 ·
維護者通常 3 天內回覆
-
`package:ios --add-spm-package`: allow project-declared extra XCFrameworks as binary targets可能已有人在做 @DanielPotorCK 於 10 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 55/100
callstack/react-native-brownfield#468 ·
維護者通常 3 天內回覆
-
iOS: emitOnBrownfieldMessage: can crash with std::bad_function_call when native posts before JS requires the TurboModule (cold-start race)可能已有人在做 @tlq5l 於 7 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 48/100
callstack/react-native-brownfield#420 ·
維護者通常 3 天內回覆
-
難度 5/5 一週以上 新手友好度 38/100
callstack/react-native-brownfield#406 ·
維護者通常 3 天內回覆
查看 callstack/react-native-brownfield 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
documentation easy good first issue help wanted
難度 1/5 1-3 小時 新手友好度 83/100
維護者通常 1 天內回覆
-
Billion-context documentation addendum: nudge is independent of window occupancy. | billion-context 文档补充:nudge 与窗口占用无关可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 1/5 1-3 小時 新手友好度 86/100
ranxianglei/billion-context#5893 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
microsoft/monaco-editor#5575 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 68/100