sentry-react-native: SentryBinaryImageCache.h File not Found On RN 0.71.4

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 5.9.0

react-native version: 0.71.4

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue] N/A

Configuration:

(@sentry/react-native)

Sentry.init({ 
  dsn: 'https://_____@_____.ingest.sentry.io/_____', 
});

I have following issue: After running npx @sentry/wizard@latest -s -i reactNative, I see that everything successfully completes. However, when I run npm run ios, I get the following errors:

❌  /Users/sebastianfrohm/repos/native_app/node_modules/@sentry/react-native/ios/RNSentry.mm:14:9: 'Sentry/SentryBinaryImageCache.h' file not found

#import <Sentry/SentryBinaryImageCache.h>

Seems like there is a missing file which I am unsure how to link. I am happy to provide more information/configs/et al. Any information or advice would be great. Android works fine! Thank you!

Steps to reproduce:

  • Run npx @sentry/wizard@latest -s -i reactNative
  • Complete process
  • Run npm run ios
  • Notice failures.

Actual result:

❌  /Users/sebastianfrohm/repos/native_app/node_modules/@sentry/react-native/ios/RNSentry.mm:14:9: 'Sentry/SentryBinaryImageCache.h' file not found

#import <Sentry/SentryBinaryImageCache.h>

Expected result:

npm run ios does not throw errors.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 5
  • Comments: 17 (5 by maintainers)

Most upvoted comments

It is not related to the version of RN but to the latest Sentry RN version (5.9.0) @Chahatchugh you need to update Podfiles (pod install --repo-update or pod update Sentry/HybridSDK) If you have already done this, don’t forget to set a tilde on @sentry/react-native version range to avoid yarn or npm from downloading the next minor version. Like this: "@sentry/react-native": "~5.8.1"

@Biplovkumar thanks for reporting - this is intentional. We recently added this warning to make you aware that Sentry.wrap is called before Sentry.init in your app, which can have side effects. You can resolve this by adapting your app’s code. You can also opt to ignore this warning if you know that your app works correctly. The warning will of course only show up in local development.

Thanks @TomCorvus @kahest. Now 5.9.1 Version is working fine with Compile, Build and Archive.

@Biplovkumar This is a fix on 5.9.0 version. Init must be called before wrap.

Check this: https://github.com/getsentry/sentry-react-native/releases/tag/5.9.0

Same issue here on RN 0.71.7. No issues when using version 5.8.1