Skip to content

run-ios bug: Try/catch removed from warnAboutManuallyLinkedLibs.ts causing exceptions to propagate/crash #1435

Description

@Saadnajmi

Environment

System:
  OS: macOS 11.4
  CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Memory: 921.95 MB / 16.00 GB
  Shell: 3.2.57 - /bin/bash
Binaries:
  Node: 16.4.0 - /usr/local/bin/node
  Yarn: 1.22.10 - /usr/local/bin/yarn
  npm: 7.18.1 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
  CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
  Android SDK:
    API Levels: 28, 29, 30
    Build Tools: 28.0.3, 29.0.3, 30.0.1
    System Images: android-30 | Google APIs Intel x86 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 4.1.2 4.1.2
  Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
  Java: 11.0.1 - /usr/bin/javac
npmPackages:
  @react-native-community/cli: Not Found
  react: 17.0.1 => 17.0.1 
  react-native: 0.64.1 => 0.64.1 
  react-native-macos: ^0.63.0 => 0.63.36 
npmGlobalPackages:
  *react-native*: Not Found

Description

This refers to microsoft/react-native-test-app#375

I was working on moving a community module to use React Native Test App to manage the test app of a community module (https://github.com/react-native-menu/menu), and ran into an error running run-ios. After investigation, it seems the issue happened upstream beginning in #1270 .

A try-catch was removed from packages/platform-ios/src/link/warnAboutManuallyLinkedLibs.ts, causing the exception to bubble up and crash. This seems like an error, because an Android fix shouldn't have broken something downstream for iOS.

Reproducible Demo

A little bit contrived since I reproed this using a downstream module, but:

git clone git@github.com:react-native-menu/menu.git
cd menu
mv example/ example2/ # This is to just move the existing test app out of the way temporarily
yarn add react-native-test-app --dev
yarn init-test-app
# The options I chose
# ✔ What is the name of your test app? … MenuExample
# ✔ Which platforms do you need test apps for? › Android, iOS
# ✔ Where should we create the new project? … example
yarn
yarn build:ios
pod install --project-directory=ios
yarn ios

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions