sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

SentryPrivate.modulemap not found

Open akshaysngt opened this issue 1 year ago • 7 comments

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [ ] Android

SDK:

  • [x] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 5.31.0

react-native version: 0.72.3

Are you using Expo?

  • [ ] Yes
  • [x] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] on-premise

I have the following issue:

After upgrading the XCode to 16.0, I am unable to run the app and getting below error Image

Actual result:

Build is failing for iOS app.

Expected result:

I should be able to run the app for iOS on XCode 16.0

akshaysngt avatar Sep 24 '24 20:09 akshaysngt

@akshaysngt thanks for reporting - did you try clearing build caches and the derived data for the iOS app before building?

cc @brustolin - maybe this rings a bell?

kahest avatar Sep 25 '24 08:09 kahest

cc @brustolin - maybe this rings a bell?

No, this is the first time I see this error.

brustolin avatar Sep 25 '24 10:09 brustolin

@kahest Yes even after clearing caches and derived data, facing the same issue.

akshaysngt avatar Sep 25 '24 16:09 akshaysngt

@akshaysngt thanks, we'll need to investigate this. Would you be able to provide a minimal reproducible example?

kahest avatar Sep 26 '24 07:09 kahest

This has come up before, but unfortunately no resolution (not reproducible in new projects).

https://github.com/getsentry/sentry-react-native/issues/3921

krystofwoldrich avatar Oct 02 '24 10:10 krystofwoldrich

Assigning myself for investigation since I remember seeing this one (or similar) a couple of weeks ago.

antonis avatar Oct 04 '24 10:10 antonis

Assigning myself for investigation since I remember seeing this one (or similar) a couple of weeks ago.

Checking back on this I encountered the .modulemap not found error only when I accidentally opened the .xcproject file instead of the .xcworkspace. Opening the Xcode workspace resolved the issue for me.

@akshaysngt If the issue still persists for you, could you confirm that you are opening the workspace that includes all the necessary dependencies and configurations.

antonis avatar Oct 07 '24 09:10 antonis

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Oct 29 '24 07:10 getsantry[bot]

Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed.

krystofwoldrich avatar Oct 29 '24 13:10 krystofwoldrich

Hi @krystofwoldrich, I'm still experiencing this issue. I've tried reinstalling everything from repo to Xcode itself, removing all caches, downgrading the version, etc. But I still get this error.

I'm running M1 Air on macOS 15.1 (24B83) with XCode on 16.1 (16B40). React Native version is 0.75, Sentry package is 6.1.0. Running NodeJS 22.11.0, Ruby 3.2.2 & Cocoapods 1.15.2.

The weird thing is it builds fine in XCode when I target my physical iPhone 14 Pro (18.1). Error only occurs when building for emulator (iPad 9th generation iOS 18.1).

I've looked at other issues and I believe just like this comment states: https://github.com/getsentry/sentry-react-native/issues/3921#issuecomment-2208543171 that it went wrong whilst migrating to the latest RN version. I used https://react-native-community.github.io/upgrade-helper migrating from 0.71 to 0.75. Also using @rnx-kit/align-deps to align the versioning. But I can't figure out what possible could have caused this.

I've given every info I possible can think of. I'm running out of ideas on what to do next. I'm going to try and see if creating a new RN project and copying the code is viable or not. This really is a huge blocker for us and would greatly appreciate if this could be looked at again.

aod avatar Nov 05 '24 15:11 aod

The weird thing is it builds fine in XCode when I target my physical iPhone 14 Pro (18.1). Error only occurs when building for emulator (iPad 9th generation iOS 18.1).

I had the same problem and handled to solve it:

  1. (this step may be optional) In the podfile, add this :
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  1. In the Build Settings of the project, add the following config "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; (both Debug and Release)

Image

And that should solve the problem. 🙏

LeoLeBras avatar Nov 21 '24 09:11 LeoLeBras

The weird thing is it builds fine in XCode when I target my physical iPhone 14 Pro (18.1). Error only occurs when building for emulator (iPad 9th generation iOS 18.1).

I had the same problem and handled to solve it:

  1. (this step may be optional) In the podfile, add this :

    installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end

  2. In the Build Settings of the project, add the following config "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; (both Debug and Release)

Image

And that should solve the problem. 🙏

Brilliant. That did solve it, tysm!

aod avatar Nov 21 '24 10:11 aod

@LeoLeBras and @aod Thank you for the suggestion and confirming it. This will be very useful for everyone else having the same issue.

krystofwoldrich avatar Nov 22 '24 09:11 krystofwoldrich

config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

OMG WHY DOES THIS WORK! Thanks for posting this. Saved me

gercamjr avatar Mar 04 '25 15:03 gercamjr