Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating from 0.72.1 to 0.72.2 I can't make a build (Xcode 14.2) #38294

Closed
endyinthesun opened this issue Jul 11, 2023 · 17 comments
Closed
Labels
Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Tool: Xcode

Comments

@endyinthesun
Copy link

endyinthesun commented Jul 11, 2023

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(R) Core(TM) 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
@endyinthesun endyinthesun added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jul 11, 2023
@github-actions github-actions bot added the Platform: iOS iOS applications. label Jul 11, 2023
@radko93
Copy link
Contributor

radko93 commented Jul 11, 2023

I can confirm this issue.
Seems like this is causing it a4a0655#diff-03375f42ecf9939e747c9ea89e3fe3357c73e942778c32c957f84d143f4293f5R142

@kelset
Copy link
Contributor

kelset commented Jul 11, 2023

Thanks for surfacing!
yeah it seems that it might be caused by this change in that commit by @louiszawadzki (looks like there was some specific reason #38121 (comment) )

  pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec", :modular_headers => true

I wonder why it doesn't happen with RNTester iOS 🤔 that's what we test the new arch things against.

@radko93 / @endyinthesun can either of you repro with a vanilla/react-native init'd project?

@radko93
Copy link
Contributor

radko93 commented Jul 11, 2023

This actually only happened when archiving the build, not running locally. I'm not using new arch.

@kelset kelset added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 11, 2023
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide either:

@endyinthesun
Copy link
Author

endyinthesun commented Jul 11, 2023

@kelset I've tried to create a new app with "npx react-native init awesome_proj" and I've got the same result

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jul 11, 2023
@kelset
Copy link
Contributor

kelset commented Jul 11, 2023

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

@kelset kelset added Tool: Xcode and removed Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jul 11, 2023
@kelset kelset changed the title After updating from 0.72.1 to 0.72.2 I can't make a build (ios) After updating from 0.72.1 to 0.72.2 I can't make a build (Xcode 14.2) Jul 11, 2023
@kelset kelset removed the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 11, 2023
@endyinthesun
Copy link
Author

@kelset thanks so much for your reply!

@saravana-mitrah

This comment was marked as off-topic.

@fortmarek
Copy link
Contributor

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 🙏

@louiszawadzki
Copy link
Contributor

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.

@kelset
Copy link
Contributor

kelset commented Jul 12, 2023

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.

@kelset
Copy link
Contributor

kelset commented Jul 12, 2023

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: react-native-community/discussions-and-proposals#687

and left a comment on the PR #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
Copy link
Contributor

kelset commented Jul 12, 2023

@endyinthesun can you just let me know if with 0.72.3 the problem is solved for you too and we can close this?

@endyinthesun
Copy link
Author

@kelset yes, it works, thanks =)

@numandev1
Copy link
Contributor

numandev1 commented Sep 10, 2023

@kelset I am using react-native@0.72.4 and getting this error from GitHub action

import of module 'glog.glog.log_severity' appears within namespace 'google'

#include "glog/log_severity.h"

Screenshot 2023-09-11 at 2 49 22 AM

you can also check GitHub action https://github.com/numandev1/react-native-compressor/actions/runs/6139549466/job/16657563747?pr=176

@chinalwb
Copy link

If anyone comes here because of integrating react-native-google-signin prebuild in Expo , I did it by do NOT prebuild, and just go ahead to run eas build -p ios --profile development , I am using EXPO SDK 50, therefore it picks up proper XCode and do the build without a problem!

@herhu
Copy link

herhu commented Jul 15, 2024

Hello, I know is closed but first the things is use Xcode 14.2 because is the last version compatible with the last version of MacBook Monterey (12.7.5) so which version of React Native is the compatible with this one ? or how to fix the pods of the last version of react to make it run ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Tool: Xcode
Projects
None yet
Development

No branches or pull requests

9 participants