react-native-community / releases

React Native releases
https://github.com/facebook/react-native/
1.5k stars 407 forks source link

Road to v0.64 Discussion #214

Closed grabbou closed 3 years ago

grabbou commented 3 years ago

Current latest release: v0.64.0-rc.4

Highlighted Changes

Please see the changelog PR for more details.

Work Required

Already resolved - [X] [Update documentation](https://github.com/facebook/react-native-website/projects/1) [@simek] - [x] facebook/react-native#29914 - [x] React 17 support (landed) - [x] facebook/react-native#29882 - [x] facebook/react-native#30177 - [x] facebook/react-native@a7c1c5a - [x] Bump CLI to latest - [x] Migrate warnings in index.js to point to new lean core repos (https://github.com/facebook/react-native/pull/30422) - [x] The `hermes-engine` pod has no version constraints specified, which should probably happen in the `React-Core.podspec` file and lock it with similar version constraints as the one applied to the Android version in `package.json`. Fixed by https://github.com/facebook/react-native/pull/30432 - [x] The newly introduced codegen invocation step in the iOS Podfile is failing, as the dependencies of the `react-native-codegen` package have not been installed. See output [here](https://gist.github.com/alloy/2d3b3285b76666234be62086f9d4b8b6). In progress PR here https://github.com/facebook/react-native/pull/30449 - [x] Trying to build a newly created Android app fails when checking the dynamic libraries for duplicate classes. See output [here](https://gist.github.com/alloy/a9f2f4102705bad0b2c53407edd2bd89). Fixed by https://github.com/facebook/react-native/pull/30452 - [x] https://github.com/facebook/react-native/pull/30470 - [x] The new CLI has a minor regression when using a local template dir, now you need to specify the `file://` protocol to resolve that [@grabbou] (added note to changelog, this is expected) - [x] https://github.com/facebook/react-native/commit/d85d5d2e1974b463318e4c86da29a5ccdd60a977 - [x] facebook/react-native#30489 (+ make sure to update the changelog as [per this comment](https://github.com/facebook/react-native/pull/30489#pullrequestreview-539864503)) - [x] Bump to Hermes 0.7.2 (facebook/hermes#373) (https://github.com/facebook/react-native/pull/30561) - [x] Add instructions on how to enable Hermes in the default application https://github.com/facebook/react-native/pull/30461 - [x] Running `pod install` outside of `ios` folder will fail facebook/react-native#30469 (temporary solution, will be fixed by facebook/react-native#30449) - cherry picked https://github.com/facebook/react-native/commit/c901c1fbce080c6e9b6ed56dbccaa7f2fa0571b2, https://github.com/facebook/react-native/commit/5eee2f2bc01184481a663453648ab15d1d295f4d and https://github.com/facebook/react-native/commit/b61aaa1545b3308bda5ade169204f875ba417f01 for the record. - [x] ~~Submitting Hermes enabled application to AppStore will fail validation https://github.com/facebook/hermes/issues/420~~ This isn't a release blocker; this issue is triggered when somebody specifies a higher deployment target than the default and can be solved by the user as shown [here](https://github.com/facebook/hermes/issues/420#issuecomment-736875843). - [x] https://github.com/facebook/react-native/pull/30571 - [x] Building React Native application in release mode will cause an issue with Xcode 12 facebook/react-native#29984 (here [is a workaround](https://github.com/facebook/react-native/issues/29984#issuecomment-696328815)) https://github.com/facebook/react-native/pull/30543 - [x] facebook/react-native#30495 (regression) - [x] Building with Hermes in Release mode (or with "build active architecture" set to false) causes "Thread-local storage is not supported for the current target" in "folly/synchronization/Rcu.cpp:17:10:" and happens while building for "i386". https://github.com/facebook/react-native/pull/30592 - [x] Resolve issues highlighted in the comment https://github.com/react-native-community/releases/issues/214#issuecomment-758203239 - [x] https://github.com/facebook/react-native/commit/811ccec74e5b898e9304f86f85f390908f8d317f - [x] https://github.com/facebook/react-native/commit/7a9e4ba4e9ae02ab8a0fe0f67ceefd5d675b9dbf - [x] https://github.com/facebook/react-native/commit/f312e5ba84afcddaac326ed62eaf4e00c00cf480 - [x] https://github.com/facebook/react-native/commit/f45cb60e560d21be134aa808bd105e0394ba1fd5 - [x] Issue stripping symbols on Android https://github.com/react-native-community/releases/issues/214#issuecomment-758425571 - [x] Some users are experiencing issues with CodeGen on iOS due to missing files https://github.com/react-native-community/releases/issues/214#issuecomment-766436299

Hopeful Dates

We can never commit to the dates involved in a release as many things are out of our control. However, we are thinking about these rough dates for this release.

nonewcode commented 3 years ago

Thanks to everyone who put in effort to get react native to 0.64

a-eid commented 3 years ago

I'm not able to try this RC release, for some reason I get the following errors.

Screen Shot 2020-11-23 at 7 03 17 PM

Screen Shot 2020-11-23 at 7 04 03 PM

mrousavy commented 3 years ago

@a-eid take a look at the RN Upgrade Helper to find out what you need to change for this release.

Run

rm -rf node_modules && rm -rf package-lock.json && rm -rf ios/Pods && rm -rf ios/Podfile.lock

and then reinstall everything using

npm i && cd ios && pod repo update && pod update && pod install

I've successfully upgraded to 0.64.0-rc.0 in my project without problems and even managed to get hermes running on iOS with a single line of code (thanks to @grabbou !), so everything seems to work fine

EDIT: To everyone that wants to try out 0.64 rc0 and hermes for iOS, this is how you upgrade:

  1. Clean all your caches, Pods/ node_modules, lockfiles
  2. Install rn 0.64 rc0 (npm i react-native@next)
  3. Update packages/dependencies accordingly, e.g. react to 17, and metro packages to the newest versions
  4. Follow this upgrade helper
  5. Update your Podfile like this:
-  use_react_native!(:path => config[:reactNativePath])
+  use_react_native!(:path => config[:reactNativePath], :hermes_enabled => true)
Android issues EDIT 2: Have you guys been able to get 0.64 running on Android? I'm having all kinds of weird errors, such as * Flipper causing `E/SoLoader: couldn't find DSO to load: libfbjni.so` * OkHttp causing `E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher` (`java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so`) * `E/SoLoader: couldn't find DSO to load: libjscexecutor.so`
nonewcode commented 3 years ago

@a-eid take a look at the RN Upgrade Helper to find out what you need to change for this release.

Run

rm -rf node_modules && rm -rf package-lock.json && rm -rf ios/Pods && rm -rf ios/Podfile.lock

and then reinstall everything using

npm i && cd ios && pod repo update && pod update && pod install

I've successfully upgraded to 0.64.0-rc.0 in my project without problems and even managed to get hermes running on iOS with a single line of code (thanks to @grabbou !), so everything seems to work fine

A quicker trip to this point would be to install react-native-clean-project as a dev dependency and setup the following in package.json:

"scripts": {
  "clean": "react-native clean-project-auto && yarn && yarn pod",
  "pod": "pod install --repo-update --project-directory=ios"
}

Run yarn clean when ever you notice some weird behaviour so you can reset the working directory.

SConaway commented 3 years ago

As with @a-eid , I'm unable to run the newly-created app on Android. Here's the relevant section from adb logcat

Log ``` --------- beginning of system 11-23 10:27:52.933 3822 3822 D SoLoader: init start 11-23 10:27:52.933 3822 3822 D SoLoader: adding system library source: /vendor/lib 11-23 10:27:52.934 3822 3822 D SoLoader: adding system library source: /system/lib 11-23 10:27:52.934 3822 3822 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:52.935 3822 3822 D SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:52.935 3822 3822 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2] 11-23 10:27:52.935 3822 3822 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2] 11-23 10:27:52.935 3822 3822 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:52.935 3822 3822 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:52.936 3101 3101 D ImageWallpaper: onVisibilityChanged: mVisible, visible=true, false 11-23 10:27:52.936 3101 3101 D ImageWallpaper: Visibility changed to visible=false 11-23 10:27:52.949 3822 3822 V fb-UnpackingSoSource: locked dso store /data/user/0/com.rn064/lib-main 11-23 10:27:52.951 3822 3822 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.rn064/lib-main 11-23 10:27:52.951 3822 3822 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.rn064/lib-main 11-23 10:27:52.951 3822 3822 D SoLoader: init finish: 4 SO sources prepared 11-23 10:27:52.951 3822 3822 D SoLoader: init exiting 11-23 10:27:52.955 3822 3822 D SoLoader: init exiting 11-23 10:27:52.955 3822 3822 D SoLoader: About to load: libjscexecutor.so 11-23 10:27:52.956 3822 3822 D SoLoader: libjscexecutor.so not found on /data/data/com.rn064/lib-main 11-23 10:27:52.956 3822 3822 D SoLoader: libjscexecutor.so not found on /data/app/com.rn064-1/lib/arm 11-23 10:27:52.956 3822 3822 D SoLoader: libjscexecutor.so not found on /system/vendor/lib 11-23 10:27:52.956 3822 3822 D SoLoader: libjscexecutor.so not found on /system/lib 11-23 10:27:52.957 3822 3822 W System : ClassLoader referenced unknown path: 11-23 10:27:52.960 3822 3822 E SoLoader: couldn't find DSO to load: libjscexecutor.so 11-23 10:27:52.960 3822 3822 E SoLoader: SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:52.960 3822 3822 E SoLoader: SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:52.960 3822 3822 E SoLoader: SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2] 11-23 10:27:52.960 3822 3822 E SoLoader: SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2] 11-23 10:27:52.960 3822 3822 E SoLoader: Native lib dir: /data/app/com.rn064-1/lib/arm 11-23 10:27:52.960 3822 3822 E SoLoader: result: 0 11-23 10:27:52.961 3822 3822 D SoLoader: init exiting 11-23 10:27:52.978 3822 3822 D NetworkSecurityConfig: No Network Security Config specified, using platform default 11-23 10:27:52.985 2890 4445 E SensorService: getSensorList a sensor (Sensor Diagnostic Monitor) without holding its required permission: com.samsung.permission.SSENSOR 11-23 10:27:52.985 2890 4445 I SensorService: Skipped sensor Sensor Diagnostic Monitor because it requires permission com.samsung.permission.SSENSOR and app op -1 11-23 10:27:52.994 3822 3822 D SensorManager: registerListener :: 0, LSM6DS3 Accelerometer, 66667, 0, 11-23 10:27:53.018 3822 3846 D SoLoader: About to load: libfbjni.so 11-23 10:27:53.018 3822 3846 D SoLoader: libfbjni.so not found on /data/data/com.rn064/lib-main 11-23 10:27:53.018 3822 3846 D SoLoader: libfbjni.so not found on /data/app/com.rn064-1/lib/arm 11-23 10:27:53.018 3822 3846 D SoLoader: libfbjni.so not found on /system/vendor/lib 11-23 10:27:53.019 3822 3846 D SoLoader: libfbjni.so not found on /system/lib 11-23 10:27:53.020 3822 3846 E SoLoader: couldn't find DSO to load: libfbjni.so 11-23 10:27:53.020 3822 3846 E SoLoader: SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:53.020 3822 3846 E SoLoader: SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:53.020 3822 3846 E SoLoader: SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2] 11-23 10:27:53.020 3822 3846 E SoLoader: SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2] 11-23 10:27:53.020 3822 3846 E SoLoader: Native lib dir: /data/app/com.rn064-1/lib/arm 11-23 10:27:53.020 3822 3846 E SoLoader: result: 0 --------- beginning of crash 11-23 10:27:53.021 3822 3846 E AndroidRuntime: FATAL EXCEPTION: FlipperEventBaseThread 11-23 10:27:53.021 3822 3846 E AndroidRuntime: Process: com.rn064, PID: 3822 11-23 10:27:53.021 3822 3846 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfbjni.so 11-23 10:27:53.021 3822 3846 E AndroidRuntime: SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:53.021 3822 3846 E AndroidRuntime: SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:53.021 3822 3846 E AndroidRuntime: SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2] 11-23 10:27:53.021 3822 3846 E AndroidRuntime: SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2] 11-23 10:27:53.021 3822 3846 E AndroidRuntime: Native lib dir: /data/app/com.rn064-1/lib/arm 11-23 10:27:53.021 3822 3846 E AndroidRuntime: result: 0 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.NativeLoaderToSoLoaderDelegate.loadLibrary(NativeLoaderToSoLoaderDelegate.java:29) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:51) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.jni.HybridData.(HybridData.java:34) 11-23 10:27:53.021 3822 3846 E AndroidRuntime: at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25) 11-23 10:27:53.023 2890 3664 D Debug : !@DumpState : SHIP 11-23 10:27:53.024 2890 3664 D Debug : !@DumpState : debug level:0x4f4c 11-23 10:27:53.024 2890 3664 D Debug : !@Dumpstate : Finally, system will skip dumpstate 11-23 10:27:53.024 2890 3664 W ActivityManager: Force finishing activity com.rn064/.MainActivity 11-23 10:27:53.024 2890 3664 W MultiScreenManagerService: moveTaskBackToDisplayIfNeeded(): root is not base activity 11-23 10:27:53.025 3822 3847 I art : Rejecting re-init on previously-failed class java.lang.Class: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfbjni.so 11-23 10:27:53.025 3822 3847 I art : SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.rn064/lib-main flags = 1] 11-23 10:27:53.025 3822 3847 I art : SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.rn064-1/lib/arm flags = 0] 11-23 10:27:53.025 3822 3847 I art : SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2] 11-23 10:27:53.025 3822 3847 I art : SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2] 11-23 10:27:53.025 3822 3847 I art : Native lib dir: /data/app/com.rn064-1/lib/arm 11-23 10:27:53.025 3822 3847 I art : result: 0 11-23 10:27:53.025 3822 3847 I art : (Throwable with no stack trace) 11-23 10:27:53.025 3822 3847 I Process : Sending signal. PID: 3822 SIG: 9 ```

It seems to be unable to find any .so, including JSCExecutor and LibFBNI's.


As for iOS, building with or without hermes worked well. I did create a PR to react-native's home repo to add some brief instructions to the template's Podfile. I did encounter an odd warning building for the simulator with hermes:

Odd warning ``` [CP] Vendored binary '/Users/steven/Library/Developer/Xcode/DerivedData/RN064-ehggynwgftmxakbbpchohofnjjxt/Build/Intermediates.noindex/RN064.build/Debug-iphonesimulator/RN064.build/DerivedSources/hermes.framework.dSYM/Contents/Resources/DWARF/hermes' contains architectures (armv7 armv7s arm64) none of which match the current build architectures (x86_64). ```
Since it worked, I'm sure there's no reason to be concerned, but just thought I'd bring this up!
miinos commented 3 years ago

Unable to run Android app after upgrade with hermes enabled. Error: E/SoLoader: couldn't find DSO to load: libjscexecutor.so

irekrog commented 3 years ago

After upgrade from 0.63.3 to this RC I can't open app on Android. This is log from logcat:

--------- beginning of crash
2020-11-23 22:29:24.494 16152-16241/com.myapp E/AndroidRuntime: FATAL EXCEPTION: create_react_context
    Process: com.myapp, PID: 16152
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: library "libc++_shared.so" not found result: 0
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
        at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
        at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1024)
        at java.lang.Thread.run(Thread.java:929)
brunolemos commented 3 years ago

iOS

I noticed an annoying behavior on iOS:

If I run yarn and pod install, the project runs correctly. But if I run yarn again, the codegen changes will be lost and the build will fail:

Build input file cannot be found: 'node_modules/react-native/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm'

So every time we run yarn we need to run pod install again.

About hermes, it seems to work correctly, but still need to test it on a bigger project.

Android

I wasn't able to run the app. I also had the android issues other people pointed above:

E/SoLoader: couldn't find DSO to load: libjscexecutor.so
E/SoLoader: couldn't find DSO to load: libfbjni.so
E/SoLoader: couldn't find DSO to load: libhermes.so
FATAL EXCEPTION: FlipperEventBaseThread

Reproduction code: https://github.com/brunolemos/react-native-web-monorepo/tree/rn64

mikehardy commented 3 years ago

Sorry if this is just noise, but when I have had "android total failure to find/load DSO" issues like that, it was of course immediately down to the soloader. You can maybe try downgrading it (it was upgraded for RN64 yes?) sort of like so: https://github.com/invertase/react-native-firebase/blob/bda2d67ddaf7f12ac3143b564e7e94974e8356db/tests/android/app/build.gradle#L118-L123

(that was me solving this problem by upgrading it from a lower version to the one that went in RN63, perhaps a quick test hacking that in from someone reproducing this currently might help isolate things

brunolemos commented 3 years ago

@mikehardy I had tried resolutionStrategy to 0.9.0, just re-tried with 0.8.2 and unfortunately it also didn't have any effect on the error messages. Also tried downgrading/upgrading Flipper. But someone else please try as well.

a-eid commented 3 years ago

@mrousavy I'm not upgrading an old project, I'm creating a new one

npx react-native init RN064 --version 0.64.0-rc.0 sudo gem install cocoapods --pre seems to resolve the pod install issue.

however it still doesn't compile on ios, I think it's because I'm using xCode 11.5 or something. gonna update & try again.

Screen Shot 2020-11-24 at 3 30 15 PM

android compiles fine but doesn't actually launch the app, it exists immediately ..

Screen Shot 2020-11-24 at 10 13 32 AM

SaeedZhiany commented 3 years ago

I just looked at the changes between RN0.63.3 and RN0.64.0-rc.0 and figured out the minSDKVersion for android is upgraded from 16 to 21. it's a big change I think and I couldn't find its reason in other related threads. it seems this change is not even mentioned in the first commit of the current issue

kelset commented 3 years ago

@SaeedZhiany you are correct, I've added that plus the Node bump to the highlights and also linked the draft PR for the changelog so that folks can more easily check the changes for themselves.

mrousavy commented 3 years ago

Awesome work on this! I'm really excited for Hermes running smoothly on iOS devices.

Resolved So far, I've noticed two critical issues, and a minor inconvinience: ### [Critical] AppStore double-checking the min iOS version on 64-bit archives The Hermes framework, which gets bundled into your project when you enable hermes on iOS, only supports 64 bit architectures. As per Apple, "Apps that only support 64-bit devices must specify a deployment target of 8.0 or later.". The Hermes framework does not specify the `MinimumOSVersion` in it's `Info.plist`, and therefore uploading an app to AppStore/Testflight fails with the following output:
Fastlane logs ``` [11:13:59]: Going to upload updated app to App Store Connect [11:13:59]: This might take a few minutes. Please don't interrupt the script. [11:14:46]: [Transporter Error Output]: ERROR ITMS-90530: "Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '[My App].app/Frameworks/hermes.framework' is ''." [11:14:46]: [Transporter Error Output]: ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle [My App].app/Frameworks/hermes.framework is required." [11:14:46]: [Transporter Error Output]: ERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." [11:14:46]: Transporter transfer failed. [11:14:46]: [11:14:46]: ERROR ITMS-90530: "Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '[My App].app/Frameworks/hermes.framework' is ''." ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle [My App].app/Frameworks/hermes.framework is required." ERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." [11:14:46]: [iTMSTransporter] [2020-11-24 11:14:46 CET]
ERROR: ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle [My App].app/Frameworks/hermes.framework is required." [11:14:46]: [iTMSTransporter] [2020-11-24 11:14:46 CET]
ERROR: ERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." [11:14:46]: [iTMSTransporter] [2020-11-24 11:14:46 CET]
DBG-X: The error code is: 1102 [11:14:46]: [iTMSTransporter] [2020-11-24 11:14:46 CET]
INFO: Done performing authentication. [11:14:46]: [iTMSTransporter] [11:14:46]: [iTMSTransporter] [11:14:46]: [iTMSTransporter] [11:14:46]: [iTMSTransporter] Package Summary: [11:14:46]: [iTMSTransporter] [11:14:46]: [iTMSTransporter] 1 package(s) were not uploaded because they had problems: [11:14:46]: [iTMSTransporter] /var/folders/3r/gxn72hgj7vl59jrshs0wxh600000gn/T/d20201124-44941-z1gelj/1535370501.itmsp - Error Messages: [11:14:46]: [iTMSTransporter] ERROR ITMS-90530: "Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '[My App].app/Frameworks/hermes.framework' is ''." [11:14:46]: [iTMSTransporter] ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle [My App].app/Frameworks/hermes.framework is required." [11:14:46]: [iTMSTransporter] ERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." [11:14:46]: [iTMSTransporter] [2020-11-24 11:14:46 CET]
DBG-X: Returning 1 [11:14:46]: iTunes Transporter output above ^ [11:14:46]: ERROR ITMS-90530: "Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '[My App].app/Frameworks/hermes.framework' is ''." ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle [My App].app/Frameworks/hermes.framework is required." ERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." Return status of iTunes Transporter was 1: ERROR ITMS-90530: "Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '[My App].app/Frameworks/hermes.framework' is \nERROR ITMS-90208: "Invalid Bundle. The bundle [My App].app/Frameworks/hermes.framework does not support the minimum OS Version specified in the Info.plist." The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure. ```
Manually setting `MinimumOSVersion` in the hermes framework's `Info.plist` to `8.0` should only be considered a workaround, as Apple advises against using the `MinimumOSVersion` key ([source](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html)) I've created an issue for this at https://github.com/facebook/hermes/issues/420 ### [Critical] Could not get BatchedBridge crash in Release **EDIT:** That seems to be resolved since I made a fix for reanimated. See my PR here: https://github.com/software-mansion/react-native-reanimated/pull/1469 ~So after I hotfixed the hermes framework `Info.plist` in my `xcarchive` / `.app` and re-tried to upload it to Testflight, I noticed that my app doesn't launch anymore in release builds. Looks like the [run-loop in RCTCxxBridge.mm](https://github.com/facebook/react-native/blob/8663ec4f428efdd54bffe965460b1be26d780108/React/CxxBridge/RCTCxxBridge.mm#L312-L316) immediately crashes with the following error:~ ``` 2020-11-24 14:37:49.823341+0100 MyApp[2993:859629] [native] Could not get BatchedBridge, make sure your bundle is packaged correctly 2020-11-24 14:37:49.823811+0100 MyApp[2993:859629] *** Terminating app due to uncaught exception 'RCTFatalException: Could not get BatchedBridge, make sure your bundle is packaged correctly', reason: 'Could not get BatchedBridge, make sure your bundle is packaged correctly' *** First throw call stack: (0x199aac878 0x1ae002c50 0x1033ff584 0x103416374 0x103414974 0x103429ec4 0x103429c64 0x199a2849c 0x199a276e4 0x199a21e18 0x199a2121c 0x103411f70 0x19ae3fa34 0x1e2ec2b40 0x1e2ecb768) libc++abi.dylib: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'RCTFatalException: Could not get BatchedBridge, make sure your bundle is packaged correctly', reason: 'Could not get BatchedBridge, make sure your bundle is packaged correctly' terminating with uncaught exception of type NSException ``` ~btw; `global.__jsiExecutorDescription` is set to `''` on iOS debug, shouldn't this also say Hermes?~

Debug: Console

In debug builds, everything runs fine and stable on Hermes. I noticed that any console.log statements aren't being printed to the metro bundler console anymore đŸ€” Is this disabled per design?

tido64 commented 3 years ago

I tried this version in microsoft/react-native-test-app and got this build error in Xcode:

image

Patch ```diff diff --git a/example/package.json b/example/package.json index 351eac3..523f30f 100644 --- a/example/package.json +++ b/example/package.json @@ -24,10 +24,8 @@ "devDependencies": { "@babel/core": "^7.0.0", "mkdirp": "^0.5.1", - "react": "16.13.1", - "react-native": "0.63.3", - "react-native-macos": "0.63.1", - "react-native-test-app": "../", - "react-native-windows": "0.63.10" + "react": "17.0.1", + "react-native": "0.64.0-rc.0", + "react-native-test-app": "../" } } ```

I can't find the file either if I do find . -name FBReactNativeSpec.h. Am I missing some codegen step here? I didn't hit any issues during pod install.

% pod --version
1.10.0
kelset commented 3 years ago

Another observation worth surfacing here. I was checking the upgrade-helper instructions for 0.64 and noticed that it expects the NDK in the android build gradle:

ndkVersion = "20.1.5948944"

Questions: 1) Why is it present? If this is what we expect from a DX perspective we need to add documentation around adding the NDK

2) This is a different version from the one we use in core for building react-native - we use 19. I'm concerned this misalignment is going to create troubles.

cc @dulmandakh @alloy @fkgozali

sunnylqm commented 3 years ago

@kelset It's required by the recent version of gradle plugin. The NDK version must be specified even that you do not really use it.

kelset commented 3 years ago

@kelset It's required by newer version of gradle. A version must be specified even that you do not really use it.

Thanks for the insight @sunnylqm, could you send me the link to the documentation of gradle that says so? I wonder why the version added is neither latest (so 21) nor the one we use (19).

dulmandakh commented 3 years ago

@kelset we use NDK version 20. its in https://github.com/react-native-community/docker-android

sunnylqm commented 3 years ago

One of the discussion https://github.com/facebook/react-native/pull/29987 Related gradle plugin doc https://developer.android.com/studio/releases/gradle-plugin#default-ndk-version though it's not clearly explained

grabbou commented 3 years ago

@tido, make sure you have this in your Podfile.

pre_install do |installer|
   codegen_pre_install(installer)
end

This script is responsible for generating that missing file.

tido64 commented 3 years ago

This script is responsible for generating that missing file.

@grabbou: Thanks! I don't know how I managed to miss it while staring at the upgrade helper.

kelset commented 3 years ago

Hiding a bunch of comments that have been addressed.

(for NDK, it looks like I misunderstood which version we were supposed to use - NDK 20 is for the time being default for everything RN related - thanks @dulmandakh & @sunnylqm for the links and explanations)

tido64 commented 3 years ago

@grabbou: The script fails if you're not in the correct path when invoking pod install:

example % pod install --project-directory=ios
Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport
Analyzing dependencies
Downloading dependencies
internal/modules/cjs/loader.js:834
  throw err;
  ^

Error: Cannot find module '/~/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[!] An error occurred while processing the pre-install hook of the Podfile.

Could not generate Native Module schema

But if I navigate into ios first, it will succeed:

example % cd ios
ios % pod install
Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport
Analyzing dependencies
Downloading dependencies
Generating Pods project

NOTE
  `ReactTestApp.xcodeproj` was sourced from `react-native-test-app`
  All modifications will be overwritten next time you run `pod install`

Integrating client project
Pod installation complete! There are 54 dependencies from the Podfile and 45 total pods installed.

In the error case, it's looking for react-native-codegen in the parent folder's node_modules instead of current.

Bardiamist commented 3 years ago

Based on Upgrade helper, why devDependencies ( babel, eslint) not updated...

mrousavy commented 3 years ago

@a-eid do you have Swift code in your Project? I have a notification service extension written in Swift, and that's causing the same problems that you've posted for me right now. On Debug it works fine. I think this is an architecture/deployment target issue đŸ€”

grabbou commented 3 years ago

@tido64 something that could be fixed in a PR, by default, it runs from within iOS folder hence this case is probably not well supported.

Would you mind tweaking the Ruby script?

tido64 commented 3 years ago

@grabbou: I can try when I have some free cycles.

Regarding Android, I'm hitting the same issues as others have in this thread. Seems like some .so files are missing:

android % unzip -lv app/build/outputs/apk/debug/app-debug.apk | grep '\.so'
    9668  Defl:N     3108  68% 01-01-1981 01:01 b271447e  lib/x86/libimagepipeline.so
   13704  Defl:N     7377  46% 01-01-1981 01:01 def5f9b3  lib/x86/libnative-filters.so
 3669668  Defl:N  1659491  55% 01-01-1981 01:01 df43bfbe  lib/x86/libhermes.so
  595460  Defl:N   231829  61% 01-01-1981 01:01 62967281  lib/x86/libnative-imagetranscoder.so
android %
grabbou commented 3 years ago

We're investigating that right now and will try to publish a fix really soon. Meanwhile, feel free to experiment with iOS a bit more đŸ’Ș

mrousavy commented 3 years ago

@grabbou I've updated my comment above (https://github.com/react-native-community/releases/issues/214#issuecomment-732802130) to add more details, that's everything I noticed so far. Let me know if you want me to test anything. đŸ’Ș In the meantime I'd like to thank you guys for your hard work while still being quick in responses 👍

tido64 commented 3 years ago

Would you mind tweaking the Ruby script?

@grabbou: https://github.com/facebook/react-native/pull/30469

ReactNativ commented 3 years ago

The android version runs perfectly in debug mode using android studio emulator. However, the release version of the apk crashes immediately when launched.

npx react-native init RN064 --version 0.64.0-rc.0

Android version: 11

System: OS: Windows 10 CPU: (8) x64 Intel(R) Core(TM) i5 Memory: 669.34 MB / 7.92 GB Binaries: Node: 14.15.0 Yarn: 1.22.5 npm: 6.14.7 Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled Versions: 10.0.18362.0 IDEs: Android Studio: Version 4.0.0.0 Languages: Java: javac 12 Python: 3.8.3 npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.0-rc.0 => 0.64.0-rc.0

grabbou commented 3 years ago

Hopeful fix for Android: https://github.com/facebook/react-native/pull/30470, once confirmed to work, we will quickly release rc.1 (even today).

grabbou commented 3 years ago

0.64.0-rc.1 shipped with a fix for Android and CLI bump to 5.0.0 (that we have missed before). No other changes. I just built fresh new app with Android. Happy testing!

grabbou commented 3 years ago

@a-eid, we have been testing this release with Xcode 12 and if it fixed the issues for you, here's the answer! I'd recommend upgrading to be 100% sure.

kuasha420 commented 3 years ago

New JSX transform is not on by default. React Must be in scope. Is that intentional or should be fixed?

a-eid commented 3 years ago

@grabbou IOS builds fine after upgrading to xCode 12.2, android builds fine but exists immediately after launch.

Edit:

now android is working fine for me.

mrousavy commented 3 years ago

@a-eid could you try if iOS works with Hermes enabled in Release mode for you?

a-eid commented 3 years ago

I see that there a new RC version, I will be testing that,

@mrousavy Hermes was working on IOS just fine, I have not tested on release mode, I'll try that out today.

@mrousavy IOS doesn't build in release mode with hermes enabled.

Screen Shot 2020-11-25 at 3 08 14 PM

IOS doesn't build in release mode with hermes disabled. ( different error that the above one. )

Screen Shot 2020-11-25 at 3 18 03 PM

mrousavy commented 3 years ago

@grabbou So I've tried to build android, but my builds failed because the turbo module JSI JNI .so files were generated more than once:

- More than one file was found with OS independent path 'lib/x86_64/libturbomodulejsijni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

I temporarily fixed this, by adding this:

android {
     // ...

+    packagingOptions {
+        pickFirst '**/*.so'
+    }

     // ...
}

in my app/build.gradle (under the android { section). Since I'm not sure if that has any unwanted side-effects, I don't really feel comfortable with shipping an app like this, but it builds fine for now. (I couldn't get the app to actually run due to errors with reanimated - working on that! https://github.com/software-mansion/react-native-reanimated/pull/1469)

lorenzoangelini commented 3 years ago

I'm trying to upgrade to 0.64rc-0, but i have this error. Do other people have it too?

Screenshot 2020-11-26 at 00 22 48
kelset commented 3 years ago

Based on Upgrade helper, why devDependencies ( babel, eslint) not updated...

@Bardiamist I checked in the repo and it seems that those versions are in line with the rest of the codebase; maybe you could try to do a PR to update the ones in the template and we can check with FB if that's ok for them?

@lorenzoangelini have you done all the steps @mrousavy mentioned in his comment here?

lorenzoangelini commented 3 years ago

@kelset yes i followed every step but i get the same error. Are there any changes to xcode that I may not have made?

Bardiamist commented 3 years ago

Based on Upgrade helper, why devDependencies ( babel, eslint) not updated...

@Bardiamist I checked in the repo and it seems that those versions are in line with the rest of the codebase; maybe you could try to do a PR to update the ones in the template and we can check with FB if that's ok for them?

https://github.com/facebook/react-native/pull/30489

a-eid commented 3 years ago

@lorenzoangelini one way to be sure, is to install your package in a freshly installed RN0.64.1 project.

kelset commented 3 years ago

@lorenzoangelini looks like the issue is caused by lottie-react-native so I'd try to interface with the maintainers of that library and find out if on a fresh project that same issue is present (rc.1 + lottie). It could be that lottie needs to update something on their side.

lorenzoangelini commented 3 years ago

Hi @kelset , i created a new fresh project, and i installed "lottie-ios": "3.1.8" and "lottie-react-native": "^3.5.0", and i reproduced the bug.

rpavlovs commented 3 years ago

Getting same build error with lottie-ios on rc.0 as @lorenzoangelini. This happens with Hermes enabled only.

Polyrion commented 3 years ago

No error in building on real device or simulator on IOS or Android i successfully migrate the 0.63.3 to 0.64.0-rc.1 (with Hermes also) but when i want to do an Archive on any device (arm64) to publish on Testflight i got this error :

File /Users/Polyrion/Library/Developer/Xcode/DerivedData/greenapp-esyrbbmdczgfjnajidahxcpqtjox/Build/Intermediates.noindex/ArchiveIntermediates/greenapp/BuildProductsPath/Release-iphoneos/GreenApp.app/main.jsbundle does not exist. This must be a bug with'
error: File /Users/Polyrion/Library/Developer/Xcode/DerivedData/greenapp-esyrbbmdczgfjnajidahxcpqtjox/Build/Intermediates.noindex/ArchiveIntermediates/greenapp/BuildProductsPath/Release-iphoneos/GreenApp.app/main.jsbundle does not exist. This must be a bug with
+ echo 'React Native, please report it here: https://github.com/facebook/react-native/issues'
lfrodrigues commented 3 years ago

Not sure if this comment will make a difference as I understand why you want to remove support for the older versions of Android.

We develop apps for emerging markets. In some countries in Africa, we still have thousands of users in Android 4.4 (around 4% of the user base in some apps). If you remove support for older SDK, we and everyone else developing for emerging markets won't be able to upgrade and will be stuck in 0.63 for the foreseeable future.

For reference, here's the penetration for Africa: https://gs.statcounter.com/android-version-market-share/mobile-tablet/africa

Edit: I propose RN keeps support for SDK >= 4.4, I think it's a good balance between supporting devices in emerging markets and removing old APIs