sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

iOS Use of undeclared identifier

Open ajouve opened this issue 2 years ago • 30 comments

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [ ] Android

SDK:

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

SDK version: 5.23.0

react-native version: 0.73.7

Are you using Expo?

  • [ ] Yes
  • [x] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] on-premise

I have the following issue:

When I am trying to run or archive on xcode I have the following errors

- node_modules/@sentry/react-native/ios/RNSentry.mm:565:27 Use of undeclared identifier 'kSentryLevelFatal'
- node_modules/@sentry/react-native/ios/RNSentry.mm:567:27 Use of undeclared identifier 'kSentryLevelWarning'
- node_modules/@sentry/react-native/ios/RNSentry.mm:569:27 Use of undeclared identifier 'kSentryLevelError'
- node_modules/@sentry/react-native/ios/RNSentry.mm:571:27 Use of undeclared identifier 'kSentryLevelDebug'
- node_modules/@sentry/react-native/ios/RNSentry.mm:573:27 Use of undeclared identifier 'kSentryLevelInfo'; did you mean 'sentryLevel'?

I tried to remove node_modules, package-lock.json, ios/Pods, ios/Podfile.lock, then reinstall, install pods and clear cache on xcode and I still have the same issue

I also tried with module version 5.22.0, 5.22.1, 5.22.2 and 5.22.3 and I have the same issue

Steps to reproduce:

  • Step 1: npx @sentry/wizard -s -i reactNative
  • Step 2: install pods
  • Step 3: Build or archive

Actual result:

Errors

Expected result:

Should build

ajouve avatar Jun 05 '24 18:06 ajouve

Just updated to 5.23.0 and I am now getting these errors.

Have done a fresh yarn install and pod install --repo-update

dpyeates avatar Jun 06 '24 14:06 dpyeates

Having the same issue using 5.23.0: CleanShot 2024-06-06 at 16 53 08@2x

Removed the node_modules, Pods and Podfile.lock

did pod install --repo-update

slauzinho avatar Jun 06 '24 15:06 slauzinho

At first glance, it looks like this may be the culprit: https://github.com/getsentry/sentry-cocoa/pull/3963

uzegonemad avatar Jun 06 '24 17:06 uzegonemad

5.20.0 worked for me after clean yarn cache.

1 - delete yarn.lock 2 - delete podfile.lock 3 - yarn cache clean 4 - yarn 5 - pod install

w1ll-dev avatar Jun 06 '24 17:06 w1ll-dev

updates?

lazaro-contato avatar Jun 06 '24 20:06 lazaro-contato

@sentry/[email protected] is okay

attarchi avatar Jun 06 '24 22:06 attarchi

@Binishatk try to delete Podfile.lock file then run pod install

Already tried, does not work

Binishatk avatar Jun 07 '24 01:06 Binishatk

"@sentry/react-native": "5.22.3",

Work for me

Binishatk avatar Jun 07 '24 01:06 Binishatk

Hello everyone, this bug was introduced in https://github.com/getsentry/sentry-react-native/releases/tag/5.23.0.

Please use https://github.com/getsentry/sentry-react-native/releases/tag/5.22.3 on iOS until the fix is released.

The bug was fixed in https://github.com/getsentry/sentry-react-native/pull/3854 and will be released shortly.

krystofwoldrich avatar Jun 07 '24 10:06 krystofwoldrich

https://github.com/getsentry/sentry-react-native/releases/tag/5.23.1 was released

krystofwoldrich avatar Jun 07 '24 12:06 krystofwoldrich