getsentry/sentry-react-native

SentryPrivate.modulemap not found

Closed this issue ยท 12 comments

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @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
  • No

Are you using sentry.io or on-premise?

  • 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 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?

cc @brustolin - maybe this rings a bell?

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

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

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

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

#3921

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

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.

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 ๐Ÿฅ€

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.

aod commented

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: #3921 (comment) 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.

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. ๐Ÿ™

aod commented

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!