Home > Net >  Sentry on React Native: Building for iOS breaks with "property 'options' not found on
Sentry on React Native: Building for iOS breaks with "property 'options' not found on

Time:12-03

I am using CircleCI to build for iOS (and Android) and recently, the iOS build fails with these error messages:

Compiling RNSentry.m

❌  /Users/distiller/project/node_modules/@sentry/react-native/ios/RNSentry.m:107:79: property 'options' not found on object of type 'PrivateSentrySDKOnly'

    if (appIsActive && !sentHybridSdkDidBecomeActive && (PrivateSentrySDKOnly.options.enableAutoSessionTracking || PrivateSentrySDKOnly.options.enableOutOfMemoryTracking)) {
               ^



❌  /Users/distiller/project/node_modules/@sentry/react-native/ios/RNSentry.m:107:137: property 'options' not found on object of type 'PrivateSentrySDKOnly'

    if (appIsActive && !sentHybridSdkDidBecomeActive && (PrivateSentrySDKOnly.options.enableAutoSessionTracking || PrivateSentrySDKOnly.options.enableOutOfMemoryTracking)) {
                                                                              ^



❌  /Users/distiller/project/node_modules/@sentry/react-native/ios/RNSentry.m:155:39: property 'getSdkName' not found on object of type 'PrivateSentrySDKOnly'

        @"name": PrivateSentrySDKOnly.getSdkName,
                                                                                                                                        ^



❌  /Users/distiller/project/node_modules/@sentry/react-native/ios/RNSentry.m:195:34: property 'options' not found on object of type 'PrivateSentrySDKOnly'

        if (PrivateSentrySDKOnly.options.debug

It has once worked to build for iOS, and I think this has something to do with the version of Sentry; I think I tried to update the Sentry version to 4.9.0, only to find that 4.9.0 has some serious issues (I think). I am not smart enough to dechiffer exactly what the conclusions here are, but I think it relates:

enter image description here

also yarn.lock

enter image description here

but still, the builds fails with the same error.

UPDATE 2

I check podfile.* and I see stuff like:

 podfile.lock:

  - RNSentry (3.4.2):
    - React-Core
    - Sentry (= 7.11.0)
  - RNSnackbar (2.4.0):
    - React-Core
  - RNSVG (9.13.6):
    - React
  - Sentry (7.11.0):
    - Sentry/Core (= 7.11.0)
  - Sentry/Core (7.11.0)

The file podfile does not contain "sentry" at all.

CodePudding user response:

Looks like it is your problem:

https://github.com/getsentry/sentry-react-native/pull/2599/files

Try to upgrade react native sentry to 4.10.1

  • Related