sentry-react-native: Circle CI MacOS Intel, Fastlane build failing - module 'SentryPrivate' not found

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 5.7.1

react-native version: 0.67.5

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
    environment: "dev",
    tracesSampleRate: 1.0,
    integrations: [new Sentry.ReactNativeTracing()],
});

I have following issue:

When building Sentry for IOS on Circle CI using Fastlane I have the following error that prevents me to finish a successful project build. But on my personal laptop with m2 apple chip, it builds ok.

Steps to reproduce:

  • Circle CI MacOS runner resource_class: macos.x86.medium.gen2
  • xcode: 14.2.0
  • fastlane: 2.206.2
  • node 16.20.1
  • @sentry/react-native": “^5.7.1”. – in package.json

Actual result:

❌  /Users/distiller/ios/ios/Pods/Sentry/Sources/Sentry/include/SentrySwift.h:4:9: module 'SentryPrivate' not found

@import SentryPrivate;
                                  ^


▸ Compiling SentryViewHierarchy.m
    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'My_Project' from project 'My_Project')
    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'My_Project' from project 'My_Project')
    Run script build phase 'Upload Debug Symbols to Sentry' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'My_Project' from project 'My_Project')
    Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'My_Project' from project 'My_Project')
    Run script build phase '[CP-User] [RNFB] Crashlytics Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'My_Project' from project 'My_Project')
    Run script build phase '[CP-User] Config codegen' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'react-native-config' from project 'Pods')
** ARCHIVE FAILED **

Expected result: Build should not be failing because of module ‘SentryPrivate’ not found

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 31 (15 by maintainers)

Most upvoted comments

@pavlobu that’s good to hear, thanks for reporting back!

@krystofwoldrich , great! It really worked. So I just had to remove xcargs line in my Fastlane file and now the build succeeds. Thank you very much!

@pavlobu No additional flags, but removing the OTHER_CFLAGS makes the build succeed.

@pavlobu Thank you for the details.

@krystofwoldrich here is the minimum required project with configs that reproduce the issue with module 'SentryPrivate' not found during a Fastlane build for IOS: https://github.com/pavlobu/my-app-rn-sentry

We are investigating the issue.

We have noticed that the project archives without the extra C flags OTHER_CFLAGS="-Wno-documentation". Is Fastlane adding it?

@krystofwoldrich that’s great that you could reproduce this issue! I will mention again that this command fails when I add Sentry only. When I was integrating other third-party dependencies with cocoapods such as Stripe and Mapbox, I didn’t have any module not found errors and the compilation finished successfully.