react-native icon indicating copy to clipboard operation
react-native copied to clipboard

No visible error is shown on iOS Bridgeless when there is an error before `AppRegistry.registerComponent`

Open jbroma opened this issue 1 year ago • 1 comments

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.registerComponent in index.js
  • Works as expected on Android

Steps to reproduce

  1. Install deps with yarn install
  2. Install pods (with new arch enabled):
    bundle install
    cd ios
    RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
    
  3. Build & run the app through yarn ios
  4. 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: image

With bridgeless disabled: image

jbroma avatar May 14 '24 12:05 jbroma

seeing the same issue.

I can get some error output via the console of Xcode

imWildCat avatar May 15 '24 20:05 imWildCat

This issue was fixed in PR #44739

alanleedev avatar Jun 04 '24 20:06 alanleedev