react-native
react-native copied to clipboard
No visible error is shown on iOS Bridgeless when there is an error before `AppRegistry.registerComponent`
Description
When bridgeless is enabled on iOS and there is a problem happening before AppRegistry.registerComponent is called, the simulator should display an error message. Instead, a blank screen is shown and there is no error in the console. See attached screenshot for more context.
Remarks:
- Issue reproduced by simply commenting out
AppRegistry.registerComponentinindex.js - Works as expected on Android
Steps to reproduce
- Install deps with
yarn install - Install pods (with new arch enabled):
bundle install cd ios RCT_NEW_ARCH_ENABLED=1 bundle exec pod install - Build & run the app through
yarn ios - Observe:
- no error log in console
- blank screen instead of error screen
React Native Version
0.74.1
Affected Platforms
Runtime - iOS
Areas
Bridgeless - The New Initialization Flow
Output of npx react-native info
System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Pro
Memory: 135.03 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.12.2
path: ~/Library/Caches/fnm_multishells/82159_1715689347220/bin/node
Yarn:
version: 3.6.4
path: ~/Library/Caches/fnm_multishells/82159_1715689347220/bin/yarn
npm:
version: 10.5.0
path: ~/Library/Caches/fnm_multishells/82159_1715689347220/bin/npm
Watchman:
version: 2023.09.25.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.2
path: /Users/jbroma/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11255304
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /Users/jbroma/.jenv/shims/javac
Ruby:
version: 2.7.6
path: /Users/jbroma/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.1
wanted: 0.74.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
n/a
Reproducer
https://github.com/jbroma/bridgeless-app-registry-invariant
Screenshots and Videos
With bridgeless enabled:
With bridgeless disabled:
seeing the same issue.
I can get some error output via the console of Xcode
This issue was fixed in PR #44739