Skip to content

react-native-macos@canary randomly fails installing #1630

Closed
@tido64

Description

@tido64

Environment

System:
    OS: macOS 12.6.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 25.69 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.18.1 - /private/var/folders/j0/5zfnwvyd4sb15smylklx03m00000gn/T/xfs-cb70e761/node
    Yarn: 3.1.1 - /private/var/folders/j0/5zfnwvyd4sb15smylklx03m00000gn/T/xfs-cb70e761/yarn
    npm: 8.19.2 - ~/.local/bin/npm
    Watchman: 2022.12.26.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/tido/.gem/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK:
      API Levels: 31, 33
      Build Tools: 30.0.3, 31.0.0, 33.0.0
      System Images: android-33 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: ^7.0.3 => 7.0.4
    react: 17.0.2 => 17.0.2
    react-native: ^0.68 => 0.68.5
    react-native-macos: canary => 0.0.0-af7baddd2
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce the bug

  1. Create an app with this specific react-native-macos version: 0.0.0-af7baddd2
  2. Run pod install

Expected Behavior

pod install should succeed.

Actual Behavior

pod install fails

[!] CocoaPods could not find compatible versions for pod "FBLazyVector":
  In Podfile:
    FBLazyVector (from `../node_modules/react-native-macos/Libraries/FBLazyVector`)

None of your spec sources contain a spec satisfying the dependency: `FBLazyVector (from `../node_modules/react-native-macos/Libraries/FBLazyVector`)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Reproducible Demo

Additional context

I've traced this to a version check bug (?) in CocoaPods. Essentially, it's trying to find specs that fulfill the requirement >= 0, finds none, then fails with the error message above. Interestingly, if we just prefix the SHA with a number, e.g. 0.0.0-af7baddd2 -> 0.0.0-2af7baddd2, pod install will succeed.

If we look at upstream, react-native nightlies are published using 0.0.0-<timestamp>-<sha>. I don't know if this was intentional or not, but it at least doesn't trigger the issue. It would be nice if react-native-macos could do the same.

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