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

First time build issue #6158

Closed
dswilson4 opened this issue Apr 11, 2023 · 17 comments · Fixed by #7114
Closed

First time build issue #6158

dswilson4 opened this issue Apr 11, 2023 · 17 comments · Fixed by #7114
Labels
release-7.11.0 Issue or pull request that will be included in release 7.11.0 Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking team-mobile-platform

Comments

@dswilson4
Copy link

Description

Was building locally for the first time today but am running into issues that I'm looking to see if others have also encountered recently.

Technical Details

Environment

  • Mac OS: Ventura 13.3.1
  • Xcode version 14.3 & Command line tools 14.3
  • IOS Device: Iphone 12 pro, IOS 16.4 (latest)
  1. The first error with the build I’m seeing is :
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems the newest version of Ventura has this issue where the arc folder is no longer present where expected, here’s a relevant thread with the resolution I’ve followed (copy previous libarclite_iphonesimulator.a file into new arc folder): https://developer.apple.com/forums/thread/727527

  1. After resolving the first issue, I’m seeing this build error error with yoga in React Native 0.66.5:
node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp:2232:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
node->getLayout().hadOverflow() |

This issue was raised in early February tracked here in FB’s RN repo: facebook/yoga#1224

The issue was fixed in April 2022, but versions of RN > 0.66. Should developers instead use an older version of XCode assuming the intended Metamask RN version is 0.66.5?

Alternative

I also tried uninstalling Xcode 14 and installing Xcode 13 instead, but it is incompatible with Ventura OS. Does anybody else see any of the above issues when trying to build on a clean machine and test on an IOS simulator?

@YDisa
Copy link

YDisa commented Apr 12, 2023

I am on the same issue.

After the xcode update,
My client's old app doesn't build
(Builded before update)

Can you share the contents that have been confirmed so far?


xcode : Version 14.3 (14E222b)
react-native : 0.66.2

@dswilson4
Copy link
Author

@YDisa I haven't made any progress so far

@wantaekchoi
Copy link

wantaekchoi commented Apr 26, 2023

I am on the same issue too.

  • Ventura 13.3.1 / Xcode 14.3 (14E222b) (same env)

@roti-c137
Copy link

Temporary fix is to click on the error to auto navigate to the file and line of code, and make the fix as suggested

@wantaekchoi
Copy link

Temporary fix is to click on the error to auto navigate to the file and line of code, and make the fix as suggested

I tried fixing the issue by changing | -> || in Yoga.cpp:2232:9 (ref: facebook/react-native@52d8a79 (facebook/yoga@f174de7).

However, I encountered another error:

.../Pods.build/Debug-iphonesimulator/YogaKit.build/Objects-normal/arm64/YogaKit.swiftinterface:6:19: error: underlying Objective-C module 'YogaKit' not found
@_exported import YogaKit

Do you have any suggestions for me?

@det-joe
Copy link

det-joe commented May 29, 2023

Mac OS: Ventura 13.2.1
Xcode version 14.3
スクリーンショット 2023-05-29 17 58 02

Same issue here, fixed the | -> || but got YogaKit not found issue like @wantaekchoi

@ZainaliSyed
Copy link

xcode : Version 14.3 (14E222b)
react-native : 0.66.2

I am also facing error either running via xcode or using yarn start:ios

Screenshot 2023-06-06 at 5 12 59 PM

Screenshot 2023-06-06 at 5 14 00 PM

@vsradical
Copy link

Bumping this issue for support. I've tried the suggestions in this post and #6418
Nothing has yet to work.

Does anybody have any work-arounds to temporarily get this working on an iphone with the latest iOS version?

@anaamolnar anaamolnar added team-mobile-client Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking labels Jun 21, 2023
@sethkfman
Copy link
Contributor

We are looking into the issue. The current recommendation is to revert back to Xcode 14.2.

@leotm I know you were looking into this issue. Did you have any progress?

@leotm
Copy link
Contributor

leotm commented Jun 22, 2023

thanks for looking into this ^ ran into similar (looking slightly ahead in the future)

tl;dr so far

  • unrelated to Flipper (despite pod deps on YogaKit and Yoga)
  • unrelated to project/YogaKit Swift 4/5 module interfaces (warnings)
  • unrelated to Xcode Project Document Format 12/13/14/15-compat
  • YogaKit/yoga not found persists on Xcode 15 beta 1
  • stick to Xcode 14.2 till we find a resolution to https://developer.apple.com/forums/thread/728161

next steps

  • test Xcode 15 beta 2 (released Jun 21)
    • YogaKit/yoga not found persists
  • test Xcode 15 beta 3 4
  • test Xcode 15 beta 7
  • test without Flipper
  • test Xcode 15 beta 8 (released Aug 29)
  • RN 0.71.6 reproducer to identify/isolate offending code
  • upgrade to 0.71.13 (released Aug 22) and test
    • requires branching off 0.71.6 PR (or when merged to main then upgrading
  • upgrade to RN 0.72.4 (released Aug 14)
  • check next major ver RN 0.73
  • continued monitoring/deep-dive RE https://developer.apple.com/forums/thread/728161

@bradherman
Copy link

Getting same issue in Xcode 15 beta 5

@leotm
Copy link
Contributor

leotm commented Aug 31, 2023

notes from fresh investigation on main 9ccfbc3

download Xcode 15b8 (3.35 GB), extract, xcode-select --switch /Applications/Xcode-beta.app, xcodebuild -license accept, xcodebuild -runFirstLaunch

building on: iPhone 14 Pro (iOS 16.1) and iOS SE (3rd generation) (iOS 15.4)

build error: iOS 17.0 is not installed
run Xcode and GET iOS 17 (7.5 GB)

Screenshot 2023-08-31 at 16 52 25

note similar issue from the error

bump ios/branch-ios-sdk: IPHONEOS_DEPLOYMENT_TARGET = 8.0; to 12.0 to fix
ideally upgrade https://github.com/BranchMetrics/ios-branch-deep-linking-attribution with react-native-branch

Screenshot 2023-08-31 at 16 52 02

bump ios/mixpanel-iphone: IPHONEOS_DEPLOYMENT_TARGET = 8.0; to 12.0 to fix
ideally upgrade https://github.com/mixpanel/mixpanel-iphone
and consider mixpanel-react-native (dev docs)

Screenshot 2023-08-31 at 16 55 11

noting similar issue from the error

update Pods config to fix

Screenshot 2023-08-31 at 17 01 32

now we get our original error
https://developer.apple.com/forums/thread/728161

Screenshot 2023-08-31 at 17 03 26

i think at this point the next safest best would be to upgrade to RN 0.71.13 (cc @jpcloureiro) and re-test

then if to no avail repro on RN 0.71.13 minimising deps

also curious @cipolleschi if there's anything obvious we're missing

update: nvm it's an easy upgrade (noting only Yoga Pod checksum change, YogaKit remains on 1.18.1), but the issue persists

update: ran another fresh build without flipper and the original error no longer persists 🎉
since YogaKit is now completely excluded from Podfile.lock

but now onto a new error with Sentry
Screenshot 2023-08-31 at 17 54 14

not fixed bumping @sentry deps since no Pod lockfile RNSentry/Sentry/SentryPrivate changes

TODO bump node_modules/@sentry/react-native > s.ios.deployment_target = "11.0" to 12.0
TODO revise project IPHONEOS_DEPLOYMENT_TARGET = 11.0

draft pr

@claudioitalian12
Copy link

not fixed bumping @sentry deps since no Pod lockfile RNSentry/Sentry/SentryPrivate changes

TODO bump node_modules/@sentry/react-native > s.ios.deployment_target = "11.0" to 12.0
TODO revise project IPHONEOS_DEPLOYMENT_TARGET = 11.0

I have try to do this last step but not working, where i need change IPHONEOS_DEPLOYMENT_TARGET = 11.0?

@leotm
Copy link
Contributor

leotm commented Oct 2, 2023

thanks for checking ^ was referring to ios/MetaMask.xcodeproj/project.pbxproj > IPHONEOS_DEPLOYMENT_TARGET = 11.0 might need a bump to 12.0 some point since Xcode 15 stable release, but isn't causing 'SentryPrivate' not found

and noticed node_modules/@sentry/react-native/ios/RNSentry.xcodeproj/project.pbxproj on IPHONEOS_DEPLOYMENT_TARGET = 7.0 and node_modules/@sentry/react-native/RNSentry.podspec on s.ios.deployment_target = "11.0" which appear unrelated (checked bumping to 12.0)

nb: also unversioned ios/Pods/Pods.xcodeproj/project.pbxproj IPHONEOS_DEPLOYMENT_TARGETs appear unrelated

@leotm
Copy link
Contributor

leotm commented Oct 2, 2023

in the draft pr

spotted conflicts to resolve related to Sentry, so reverted my changes (a7ec533 interestingly no pod changes at the time on Xcode 15 beta 8) and pulled in main (accepting incoming changes including #7277) to update the pr branch

since then noticing on Xcode 15 stable

Screenshot 2023-10-02 at 3 57 48 pm

is no longer fixed by facebook/react-native#37748 (comment), but updating unary_function to __unary_function works

then 0d199d7 and acb6d40 needed reverting to fix CI (postinstall git submodule update --init final step 5)

after that ran into another error #7114 (comment) fixed in a09d517

but then Branch and MixPanel IPHONEOS_DEPLOYMENT_TARGET bumps are required again (versioned via gitsubmodule commits), but appear problematic with our CI postinstall step, so there may be a better way to upgrade these

now encountering the same SentryPrivate' not found error, but this time with the warning has been resolved

Screenshot 2023-10-02 at 4 04 42 pm

@claudioitalian12
Copy link

okay work but maybe is a my local problem, the main.jsonbundle is not created:
simulator_screenshot_8A891C86-1BF4-42EF-B63C-8CF6E556A5B4

@leotm
Copy link
Contributor

leotm commented Oct 6, 2023

thanks for checking again @claudioitalian12 ^

raised the issue earlier

and got to a working solution thanks to @krystofwoldrich

detailed here getsentry/sentry-react-native#3322 (comment)

with final few TODO's noted we have remaining to tackle

leotm added a commit that referenced this issue Oct 30, 2023
**Description**

Xcode 14.2+ support (notable Xcode 15)
-
#6158 (comment)

TODO
- [x] Fix Branch build error
- Fork Branch repo, bump `IPHONEOS_DEPLOYMENT_TARGET`s from 8 to 12,
update git submodule
- [x] Fix MixPanel build error
- Fork MixPanel repo, `IPHONEOS_DEPLOYMENT_TARGET`s from 8 to 12, update
git submodule
- [x] Upgrade RN from 0.71.6 to 0.71.13
- [x] Refactor Podfile
- [x] Raise/fix Sentry build issue
- [x] Update `react-native.config.js` to support `NO_FLIPPER` env var
- [x] Fix Yoga/YogaKit build error (disable Flipper natively)
- [x] Fix Xcode 15 build error: Unable to load ...frameworks-Debug-input-files.xcfilelist
- [x] Bump BitRise stack from osx-xcode-14.2.x-ventura to osx-xcode-15.0.x
- [x] Upgrade RN from 0.71.13 to 0.71.14 (for additional Xcode 15 compat)
- [x] Upgrade Detox for additional Xcode 15 compat
- [x] Fix BitRise osx-xcode-15.0.x smoke tests
  - Bump Detox config iOS sim from iPhone 12 Pro to iPhone 13 Pro
- [x] Test older Xcode 14.2
- [x] Disable Flipper in release-mode
- [x] Fix Flipper debug-mode tech debt
- [x] Reenable Flipper
- [x] Update build scripts for iPhone 13 Pro
- [x] Update docs for Xcode 15.0.1 and iPhone 13 Pro
- [x] Bump Browserstack iPhone 12 Pro devices to iPhone 13 Pro
- [x] Remove stale Device util static method isIphone12
- [x] Bump metro devDep from 0.72.3 to 0.73.10
- [x] Test i386 arch (comes with iPhone 15, requires creating iPhone 13 Pro sim)

_Xcode 15 beta 8 tested up to a7ec533, then Xcode 15 stable since_

`start:ios` must be run before running via Xcode 15, or `cp
node_modules/@metamask/mobile-provider/dist/index.js
app/core/InpageBridgeWeb3.js` can optionally be run

_Xcode updates: https://developer.apple.com/documentation/updates/xcode_

**Issue**

fixes #6158

and brew warning ⚠️

<img width="576" alt="Xcode 14 2 warning"
src="https://github.com/MetaMask/metamask-mobile/assets/1881059/059988b2-e90c-4400-8f6a-e015391d4d48">

---------

Co-authored-by: João Loureiro <1649425+jpcloureiro@users.noreply.github.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
@metamaskbot metamaskbot added the release-7.11.0 Issue or pull request that will be included in release 7.11.0 label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-7.11.0 Issue or pull request that will be included in release 7.11.0 Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking team-mobile-platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.