[dev-launcher] fix hermes inspector connection issue (#22726)# Why fixes #20280 close ENG-8769 # How our original `stopInspector() -> startInspector()` is not reliable because of thread r
[dev-launcher] fix hermes inspector connection issue (#22726)# Why fixes #20280 close ENG-8769 # How our original `stopInspector() -> startInspector()` is not reliable because of thread race condition issue. looking into the [react-native code](https://github.com/facebook/react-native/blob/7f22db8ea034d1aed74103542b04af2a8a11caa1/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java#L207-L241), it posts task to background AsyncTask thread pool. so it could happen two different error cases: ### Case 1 with empty inspector targets `http://localhost:8081/json/list` returns empty array 1. openInspectorConnection() from ReactInstanceManager posted task 2. openInspectorConnection() from ReactInstanceManager executed in AsyncTask thread pool 3. closeInspectorConnection() from DevLauncherReactUtils posted task 4. openInspectorConnection() from DevLauncherReactUtils showing warning `Inspector connection already open, nooping.` and just returns. 5. closeInspectorConnection() from DevLauncherReactUtils executed in AsyncTask thread pool ### Case 2 with double inspector targets `http://localhost:8081/json/list` returns 6 items for bare-expo (2 + 1) x 2. 1. openInspectorConnection() from ReactInstanceManager posted task 2. closeInspectorConnection() from DevLauncherReactUtils posted task 3. openInspectorConnection() from DevLauncherReactUtils posted task 4. closeInspectorConnection() from DevLauncherReactUtils executed in AsyncTask thread pool 5. openInspectorConnection() from ReactInstanceManager executed in the AsyncTask thread pool 6. openInspectorConnection() from DevLauncherReactUtils executed in the AsyncTask thread pool that is my hypothesis, i did not confirm with logging. since it's a thread pool, so the out-of-order case may happen. # Test Plan tested on bare-expo and turning on `USE_DEV_CLIENT = true` in **MainApplication.java**
show more ...
[dev-launcher] Support react-native-v8 (#19117)# Why another attempt than #18151 to support react-native-v8 # How if there's *libv8android.so*, we just use the js executor factory from mai
[dev-launcher] Support react-native-v8 (#19117)# Why another attempt than #18151 to support react-native-v8 # How if there's *libv8android.so*, we just use the js executor factory from main ReactNativeHost. for the bundled reanimated in dev-menu, i have a pr to keep jsc in debug build: https://github.com/Kudo/react-native-v8/pull/142 # Test Plan ```sh $ yarn create expo-app -t blank@sdk-46 sdk46v8 $ cd sdk46v8 $ npx expo install react-native-v8 v8-android-jit # add "plugins": ["react-native-v8"] to app.json $ npx expo install expo-dev-client $ npx expo prebuild -p android # patch node_modules/expo-dev-launcher $ npx expo run:android ```
Upgrade to react-native 0.69 (#18006)# Why for sdk 46 close ENG-5353 # How - update packages - react -> 18.0.0 - react-native -> 0.69.0 - react-dom -> 18.0.0 - react-native-w
Upgrade to react-native 0.69 (#18006)# Why for sdk 46 close ENG-5353 # How - update packages - react -> 18.0.0 - react-native -> 0.69.0 - react-dom -> 18.0.0 - react-native-web -> ~0.18.1 - react-test-renderer -> ~18.0.0 - @types/react -> ~18.0.14 - @types/react-native -> ~0.69.1 - early patch react-native for 0.69.1 fixes - https://github.com/facebook/react-native/commit/43f831b - https://github.com/facebook/react-native/commit/c2088e1 - https://github.com/facebook/react-native/commit/f97c6a5 - https://github.com/facebook/react-native/commit/79baca6 - https://github.com/facebook/react-native/pull/34064#issuecomment-1168810152 - migrate `expo-template-bare-minimum`, `bare-expo`, `bare-sandbox` to 0.69. reference from https://react-native-community.github.io/upgrade-helper/?from=0.68.1&to=0.69.0 - also remove the `hermesCommand` because 0.69 uses the builtin hermes-engine - `expo-av`, `expo-modules-core`, `expo-gl-cpp`: fix android cpp building errors, because 0.69 ships both release and debug aar - `expo-dev-client`: fix android build error from RedBox package rename - `html-elements`: update RNWView where react-native-web removed [the `css` import](https://github.com/necolas/react-native-web/commit/b27c9820) - `expo`: move Expo.podspec out from ios, because newer [rn-cli removed the `podspecPath` and `project` support](https://github.com/react-native-community/cli/commit/25eec7c#diff-0dddbcedebb33032fcac5991f3dcdfa44157e6ae87afcf3dabcd240a0db09832L58). - [ ] disable dev-client because the vendored reanimated in dev menu doesn't support 0.69 yet, e.g. `folly_json -> folly_runtime` - update reanimated and gesture-handler to latest for 0.69 support - `jest-expo`: update to [fix the deprecated react-native-web jest preset](https://github.com/necolas/react-native-web/commit/9b0c119) - `NCL`, `home`, patch `react-native-svg`: fix react 18 that [`children` should be explicitly added](https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#updates-to-typescript-definitions) - `@expo/cli` fix react-native-web and react-dom version checks # Test Plan - android bare-expo smoke test - ios bare-expo smoke test - ci passed - updates e2e is broken because in the flow the react-native doesn't include 0.69.1 fixes.