react-native: After updating from 0.72.1 to 0.72.2 I can't make a build (Xcode 14.2)

Update: please refer to this comment for status and workarounds.


Description

I run “RCT_NEW_ARCH_ENABLED=1 bundle exec pod install” and success install pods. After that, I try to make a build, but I get an error “/Users/{user}/IdeaProjects/{project}/ios/Pods/Headers/Public/glog/glog/logging.h:512:1 Import of module ‘glog.glog.log_severity’ appears within namespace ‘google’”

React Native Version

0.72.2

Output of npx react-native info

System: OS: macOS 13.4.1 CPU: (4) x64 Intel® Core™ i5-7600K CPU @ 3.80GHz Memory: 23.88 MB / 24.00 GB Shell: version: “5.9” path: /bin/zsh Binaries: Node: version: 18.10.0 path: ~/.nvm/versions/node/v18.10.0/bin/node Yarn: version: 3.6.1 path: ~/.yarn/bin/yarn npm: version: 9.6.7 path: ~/.nvm/versions/node/v18.10.0/bin/npm Watchman: version: 2022.10.31.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.11.3 path: /Users/vlad/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 22.2 - iOS 16.2 - macOS 13.1 - tvOS 16.1 - watchOS 9.1 Android SDK: Android NDK: 23.0.7344513-beta4 IDEs: Android Studio: Flamingo 2022.2.1 Patch 1 Flamingo 2022.2.1 Patch 1 Xcode: version: 14.2/14C18 path: /usr/bin/xcodebuild Languages: Java: version: 11.0.17 path: /Users/vlad/.jenv/shims/javac Ruby: version: 2.7.6 path: /Users/vlad/.rbenv/shims/ruby npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.2 wanted: 0.72.2 react-native-macos: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: true

Steps to reproduce

  1. Run “RCT_NEW_ARCH_ENABLED=1 bundle exec pod install” and success install pods.
  2. Run “react-native run-ios” or make a build from xCode
  3. Get error “/Users/{user}/IdeaProjects/{project}/ios/Pods/Headers/Public/glog/glog/logging.h:512:1 Import of module ‘glog.glog.log_severity’ appears within namespace ‘google’”

Snack, code example, screenshot, or link to a repository

image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 16 (5 by maintainers)

Most upvoted comments

we’ve been looking into this and it looks like it’s something specific to Xcode 14.2 - on latest Xcode 14.3.1 everything is building fine.

The problem now is that some CIs like GitHub Actions do still default to Xcode 14.2 in their images 😓

Current workarounds:

  • upgrade your setup / CI to Xcode 14.3.1 (for example, for GitHub Actions macos-13 images with Xcode 14.3.1 are available)
  • stay on 0.72.1

We’ll try to figure out a solution quickly, most likely we’ll revert the commit and publish 0.72.3.

We didn’t catch this because CircleCI’s CI is already on Xcode 14.3

Hi 👋 It looks like my first commit to React Native was also my first regression 😅

Totally fine by me to revert my change in the next version until we come up with a better solution, I believe there are way more people still using XCode 14.2 than people using the new architecture in projects with Swift modules.

Hey folks 👋

Update: I was able to repro locally that in the 0.72-stable branch even RNTester (on JSC+new arch) was failing to build with this problem: Screenshot 2023-07-12 at 11 13 03

And I was also able to verify that it was fixed by reverting the commit: Screenshot 2023-07-12 at 11 17 56

So I went ahead and rolled out a new patch, 0.72.3, with just the revert 👍

I’ve also created a separate discussion to track how to better avoid having this type of regressions go unnoticed: https://github.com/react-native-community/discussions-and-proposals/discussions/687

and left a comment on the PR https://github.com/facebook/react-native/pull/38121 so that once Riccardo is back next week he has full info on the situation and we can figure out if there’s a way to reapply it in a way that it can work with versions lower than 14.3.

@kelset yes, it works, thanks =)

thanks @louiszawadzki 👍

I’m testing locally that reverting the commit actually addresses the problem, after which I’ll do 0.72.3 with the revert and we can look into how to address this more properly next week (once Riccardo is back).

as a sidenote, just so that I stop losing track of this link, Apple’s policy is that you need to use Xcode 14.1 or higher atm.

I’m getting this issue while build the app, I’m using Xcode 14.3.1, RN version 0.72.2, M1 Mac

This is most likely unrelated to the bug raised in this issue that’s specific to Xcode 14.2. Please, create a new issue with proper reproduction steps 🙏

@kelset thanks so much for your reply!