sentry-react-native: XCode Build Error - Sentry Cocoa 6.0.8

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 2.0.0

react-native version: 0.63.3

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

I have following issue:

My app is failing to build (release) on Xcode 12.1 since Sentry Cocoa 6.0.8 got released.

Steps to reproduce:

  • Generate a standalone RN app.
  • Integrate sentry-react-native
  • Build in release

Actual result:

/[...]/node_modules/@sentry/react-native/ios/RNSentry.m:151:54: No visible @interface for 'SentryClient' declares the selector 'fileManager'

Expected result:

App should build without error.

Workaround:

I was able to build my app by modifying node_modules/@sentry/react-native/ios/RNSentry.podspec:

- s.dependency 'Sentry', '~> 6.0.3'
+ s.dependency 'Sentry', '6.0.7'

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 24
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I was able to specify the Sentry version in my project Podfile then run pod update. This is probably the cleanest workaround until whatever is wrong is fixed.

target 'MyApp' do
    pod 'Sentry', '6.0.7'

    config = use_native_modules!

    ...
    
end

I have same error and workaround works for me

edit Podfile.lock (before was 6.0.8)

  - Sentry (6.0.7):
    - Sentry/Core (= 6.0.7)
  - Sentry/Core (6.0.7)

then npx pod-install

maybe it is not the cleanest way …

Sentry Cocoa 6.0.8 is supposed to be used with this PR https://github.com/getsentry/sentry-react-native/pull/1188 and wouldn’t work with prior versions.

I apologize for this, next time we should explicitly state which version of Cocoa instead of using ~>

Also, the recommended workaround would be what @nbolender suggests.

Thanks for the quick fix!

v2.0.1 works for me as well - although I did have to run pod update Sentry after upgrading from 2.0.0 to resolve transitive dependencies on Sentry and Sentry/Core 6.0.8

just wanted to share in case anyone else runs into the same issue when running pod install

This issue has been fixed in version 2.0.1. Please upgrade and don’t forget to run pod install!

@freedomzzzii @SahilPawar1994 @anthlasserre @sperezm97 Add pod 'Sentry', '6.0.7' to your Podfile file. Like this:

target 'MyApp' do
    pod 'Sentry', '6.0.7' # <-- Add this line

    config = use_native_modules!
    ...    
end

I had this same issue, I was using v.1.7.1 and after upgrading to 2.0.0, I am facing the issue “No visible @interface for ‘SentryClient’ declares the selector ‘fileManager’”

I simply delete the RNSentry folder from ios/Pods and then again I did pod install and it was working as expected.