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

Circle CI MacOS Intel, Fastlane build failing - module 'SentryPrivate' not found #3186

Closed
5 of 11 tasks
pavlobu opened this issue Jul 13, 2023 · 31 comments
Closed
5 of 11 tasks

Comments

@pavlobu
Copy link

pavlobu commented Jul 13, 2023

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

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Jul 14, 2023

Hi,
thank you for the message,
do you let @sentry/react-native initialize sentry-cocoa? Or do you initialize sentry-cocoa yourself?

Could you share your app/ios/Podfile?

@pavlobu
Copy link
Author

pavlobu commented Jul 14, 2023

Hi thanks for your interest on this issue,
The @sentry/react-native initialized sentry-cocoa itself.

After yarn install all dependencies I just do

cd ios
pod install

and all Sentry dependencies for IOS are installed then by themselves.

Here is my ios/Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '16.2'
#<Mapbox should be outside of target scope
$RNMapboxMapsImpl = 'mapbox'
#Mapbox>
target 'MyProject' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  ) 

  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text', :modular_headers => true

  # react-native-permissions permission handlers
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"

  #<Mapbox
#   pod 'rnmapbox-maps', :path => '../node_modules/@rnmapbox/maps', :inhibit_warnings => false
  #Mapbox>

  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  target 'MyProjectTests' do
    inherit! :complete
    # Pods for testing
  end

  pre_install do |installer|
    #<Mapbox
    $RNMapboxMaps.pre_install(installer)
    #Mapbox>
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  # use_native_modules!
  use_flipper!()
  #   'Flipper-Folly' => '2.5.3', 
  #   'Flipper' => '0.87.0', 
  #   'Flipper-RSocket' => '1.3.1' 
  # })
  post_install do |installer|
    #  # Apple Silicon builds require a library path tweak for Swift library discovery or "symbol not found" for swift things
    # installer.aggregate_targets.each do |aggregate_target| 
    #   aggregate_target.user_project.native_targets.each do |target|
    #     target.build_configurations.each do |config|
    #       config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)']
    #     end
    #   end
    #   aggregate_target.user_project.save
    # end

    #  # Flipper requires a crude patch to bump up iOS deployment target, or "error: thread-local storage is not supported for the current target"
    # # I'm not aware of any other way to fix this one other than bumping iOS deployment target to match react-native (iOS 11 now)
    react_native_post_install(installer)
   
    #<Mapbox
    $RNMapboxMaps.post_install(installer)
    #Mapbox>
 # # ...but if you bump iOS deployment target, Flipper barfs again "Time.h:52:17: error: typedef redefinition with different types"
    # # We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1
    # # https://github.com/facebook/flipper/issues/834 - 84 comments and still going...
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_12_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
    installer.pods_project.targets.each do |target|      
        if target.name == "RCT-Folly"
          target.build_configurations.each do |config|
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FOLLY_HAVE_CLOCK_GETTIME=1']
          end
        end
      end
   installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.2'
       end
    end
    # installer.pods_project.targets.each do |target|
    #   target.build_configurations.each do |config|
    #     config.build_settings.delete "IPHONEOS_DEPLOYMENT_TARGET"
    #   end
    # end
  end
end

@krystofwoldrich
Copy link
Member

@pavlobu Do you see in the CI logs pod install logs Sentry being installed?

You should see all three of these:

Installing RNSentry
Installing Sentry
Installing SentryPrivate

@pavlobu
Copy link
Author

pavlobu commented Jul 14, 2023

@krystofwoldrich
yes, I see this on install cocoapds step:

Installing RNSentry (5.7.1)
...
Installing Sentry (8.8.0)
Installing SentryPrivate (8.8.0)

also I see this on install cocoapods step in logs
Auto-linking React Native modules for target MyProject: ... RNSentry ...

@krystofwoldrich
Copy link
Member

@brustolin @philipphofmann Do you have an idea what could cause this error in CI, or what to check? #3186 (comment)

@philipphofmann
Copy link
Member

Please run pod repo update before pod install and let me know if it helps.

@pavlobu
Copy link
Author

pavlobu commented Jul 17, 2023

Please run pod repo update before pod install and let me know if it helps.

Hi,
I've tried to add this pod repo update
before pod install

but the error didn't disappear and is the same

@philipphofmann
Copy link
Member

Did it work in previous versions, @pavlobu? If yes, what's the last version you could build your project with Fastlane?

@brustolin, do you have any idea what could cause this?

@pavlobu
Copy link
Author

pavlobu commented Jul 18, 2023

@philipphofmann No it didn't work in previous versions. This is a very first integration of Sentry in my project. The local build succeeds and I manage to send some crash statistics to Sentry and see it. But circle ci build never passes.

The project buils successfully with the same version of Fastlane when I remove Sentry

@brustolin
Copy link
Contributor

But on my personal laptop with m2 apple chip, it builds ok.

This is by using Fastlane build locally or when you build the project manually?

@pavlobu
Copy link
Author

pavlobu commented Jul 18, 2023

But on my personal laptop with m2 apple chip, it builds ok.

This is by using Fastlane build locally or when you build the project manually?

Hi,
No, locally I build with Xcode and it works

Also I've used my older Intel chip-based Macbook, the project builds on it too in Xcode without problems

@brustolin
Copy link
Contributor

I see. Would you mind trying building the project with Fastlane instead of Xcode locally?
And, if possible, sharing fastlane output with us.

@pavlobu
Copy link
Author

pavlobu commented Jul 18, 2023

I can't run Fastlane locally because I don't have some configs and app store certificates in order to do so.
The circle ci pipeline is configured to have these certificates during the build.

I managed to successfully add many other cocoapods dependencies, such as Stripe and Mapbox, and there were no issues with them during the build.

Here is a complete output of Fastlane build in Circle CI:
fastlante-build.log

Here is my ios/fastlane/Fastfile that runs this build step in the pipeline, then it fails

# update_fastlane
ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'false'

default_platform(:ios)
# xcodes(version: "14.2.0")

platform :ios do
 before_all do
    setup_circle_ci
  end


  desc "Builds, achieves and uploads ipa to TestFlight"
    lane :testflight do
      match(type: "appstore")
      app_store_connect_api_key
      increment_build_number(
        build_number: app_store_build_number(
          version: "1.0.20",
          initial_build_number:0,
          live: false,
          app_identifier: "com.myproject.app") + 1,
        xcodeproj: "MyProject.xcodeproj"
      )
      gym(
        xcargs: "OTHER_CFLAGS=-Wno-documentation",
        scheme: "MyProject",
        export_options: {
            method: "app-store",
            provisioningProfiles: {
              "com.myproject.app" => "match AppStore com.myproject.app"
            }
          }
      )
      upload_to_testflight(
        skip_submission: true,
        skip_waiting_for_build_processing: true
      )
    end
end

@pavlobu
Copy link
Author

pavlobu commented Jul 18, 2023

can it be a problem of something basic like linking the dependency after it's been installed?

@brustolin
Copy link
Contributor

can it be a problem of something basic like linking the dependency after it's been installed?

This is the first time this problem has shown up. We haven't found a reason yet.

@pavlobu
Copy link
Author

pavlobu commented Jul 26, 2023

is there any possible fix for this issue? I have my trial period running out for Sentry and I'm still tentative if I should use it in the project because it doesn't compile

@brustolin
Copy link
Contributor

Hello @pavlobu. Did you changed any settings on the project to compile external frameworks as statics?

@pavlobu
Copy link
Author

pavlobu commented Jul 26, 2023

@brustolin hi,
no I didn't do such changes

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Jul 28, 2023

@pavlobu Would you be able to set up a minimal reproducible example that we could debug?

@pavlobu
Copy link
Author

pavlobu commented Aug 2, 2023

@krystofwoldrich sure I will prepare a reproducible example repo and will notify you when it's ready.

So far, I found that the problem is in the xcodebuild command that fails to find SentryPrivate module. Fastlane is using xcodebuild to generate releasable artifacts for AppStore.

here is the example of the command that fails the build from ./ios dir:

xcodebuild -workspace ./MyApp.xcworkspace -scheme MyApp -configuration Debug -destination 'generic/platform=iOS' -archivePath /Users/user/Library/Developer/Xcode/Archives/2023-08-02/MyApp\ 2023-08-02\ 11.11.14.xcarchive OTHER_CFLAGS="-Wno-documentation" archive

this command fails with the same error event when it's run by me in terminal, outside of fastlane job

@krystofwoldrich
Copy link
Member

@pavlobu Thanks for the update this helps a lot with debugging. I've tried a similar command with our sample app and got the same error.

The command:

xcodebuild -workspace ./sampleNewArchitecture.xcworkspace -scheme sampleNewArchitecture -configuration Debug -destination 'generic/platform=iOS' -archivePath ../SampleAppTest.xcarchive OTHER_CFLAGS="-Wno-documentation" archive

The Error:

CompileC /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Objects-normal/arm64/SentryViewHierarchyIntegration.o /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Sentry/Sources/Sentry/SentryViewHierarchyIntegration.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Sentry' from project 'Pods')
    cd /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos16.4-20E238-.sdkstatcache -target arm64-apple-ios11.0 -fmessage-length\=166 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -std\=gnu11 -fobjc-arc -fmodules -fmodules-cache-path\=/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -iquote /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Sentry-generated-files.hmap -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Sentry-own-target-headers.hmap -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Sentry-all-non-framework-target-headers.hmap -ivfsoverlay /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/all-product-headers.yaml -iquote /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Sentry-project-headers.hmap -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/BuildProductsPath/Debug-iphoneos/Sentry/include -I/Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Headers/Private -I/Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Headers/Private/Sentry -I/Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Headers/Public -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/DerivedSources-normal/arm64 -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/DerivedSources/arm64 -I/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/DerivedSources -F/Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/BuildProductsPath/Debug-iphoneos/Sentry -Wno-documentation -include /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Target\ Support\ Files/Sentry/Sentry-prefix.pch -MMD -MT dependencies -MF /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Objects-normal/arm64/SentryViewHierarchyIntegration.d --serialize-diagnostics /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Objects-normal/arm64/SentryViewHierarchyIntegration.dia -c /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Sentry/Sources/Sentry/SentryViewHierarchyIntegration.m -o /Users/krystofwoldrich/Library/Developer/Xcode/DerivedData/sampleNewArchitecture-dtnzzmpchfyuyyajisnbghavfleb/Build/Intermediates.noindex/ArchiveIntermediates/sampleNewArchitecture/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Sentry.build/Objects-normal/arm64/SentryViewHierarchyIntegration.o
In file included from /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Sentry/Sources/Sentry/SentryViewHierarchyIntegration.m:13:
In file included from /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Sentry/Sources/Sentry/include/SentryMetricKitIntegration.h:8:
/Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/ios/Pods/Sentry/Sources/Sentry/include/SentrySwift.h:4:9: fatal error:
      module 'SentryPrivate' not found
@import SentryPrivate;
 ~~~~~~~^~~~~~~~~~~~~
1 error generated.

@pavlobu
Copy link
Author

pavlobu commented Aug 2, 2023

@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.

@krystofwoldrich
Copy link
Member

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?

@pavlobu
Copy link
Author

pavlobu commented Aug 2, 2023

@krystofwoldrich, sounds good!

adding OTHER_CFLAGS="-Wno-documentation" is up to us and it can be adjusted in gym step in xcargs of Fastlane file. We can also add extra xcargs in fastlane if we need.
More info on fatlane gym and it's available options is here: https://docs.fastlane.tools/actions/gym/

my current Fastlane file that triggers xcodebuild with gym is like this:

ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'false'

default_platform(:ios)

platform :ios do
 before_all do
    setup_circle_ci
  end


  desc "Builds, achieves and uploads ipa to TestFlight"
    lane :testflight do
      gym(
        xcargs: "OTHER_CFLAGS=-Wno-documentation",
        scheme: "MyAppTestSentry",
        export_options: {
            method: "app-store",
            provisioningProfiles: {
              "com.myapptestsentry.app" => "match AppStore com.myapptestsentry.app"
            }
          }
      )
      upload_to_testflight(
        skip_submission: true,
        skip_waiting_for_build_processing: true
      )
    end
end

@pavlobu
Copy link
Author

pavlobu commented Aug 2, 2023

we can add other xcargs like this:

OTHER_CFLAGS="-Wno-documentation" LD_HEADERS_PATH="/path/to/headers"

all this is added to xcodebuild command as arguments during a fastlane run

@pavlobu
Copy link
Author

pavlobu commented Aug 2, 2023

@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

@krystofwoldrich
Copy link
Member

@pavlobu Thank you for the details.

@pavlobu
Copy link
Author

pavlobu commented Aug 10, 2023

hi, does anyone have ideas on how we can get rid of module 'SentryPrivate' not found while using xcodebuild? any additional flags we can add to this command?

@krystofwoldrich
Copy link
Member

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

@pavlobu
Copy link
Author

pavlobu commented Aug 11, 2023

@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!

@kahest
Copy link
Member

kahest commented Aug 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

6 participants