sentry-react-native: Autolinking broken in 0.69

Due to https://github.com/react-native-community/cli/pull/1537 some things in your react-native.config.js have been deprecated and removed, thus failing autolinking schema validation (for example ios.sharedLibraries).

Steps to Reproduce

  1. Create a vanilla RN project with latest 0.69 RC with npx react-native init Example --version 0.69.0-rc.6.
  2. Add this package.
  3. Observe it not being autolinked.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Hi there! Just checking on that status of this? Should I not wait and just go w/ the workaround?

The patch from @marandaneto has been approved by @kamilogorek : https://github.com/getsentry/sentry-wizard/pull/173#pullrequestreview-1038889596

Manoel is back online tomorrow so we should see this patch merged, and a new release of sentry-wizard coming out soon. Sorry for the delay on this one folks.

@marandaneto no it’s unrelated, it’s because of the linked PR.

Going to be released as 5.0.0-alpha.0

Any update on release fix ?

I was able to apply the patch for the react-native.config.js file as noted in the workaround.

However I simply added these two lines:

export SENTRY_PROPERTIES=sentry.properties export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"

in the .xcode.env file and left the default shellScript in project.pbxproj

shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";

Everything seems happy so far…

@matinzd for now there’s a quick workaround: https://docs.sentry.io/platforms/react-native/troubleshooting/#react-native-069-and-higher

Do that and install pods again.

I can verify that Sentry is being removed while running pod install on 0.69.0.

Installing FBLazyVector 0.69.0 (was 0.68.2)
Installing FBReactNativeSpec 0.69.0 (was 0.68.2)
Installing Flipper-DoubleConversion 3.2.0.1 (was 3.2.0)
Installing Flipper-Glog 0.5.0.5 (was 0.5.0.4)
Installing RCTRequired 0.69.0 (was 0.68.2)
Installing RCTTypeSafety 0.69.0 (was 0.68.2)
Installing RNReanimated 2.8.0
Installing React 0.69.0 (was 0.68.2)
Installing React-Codegen 0.69.0 (was 0.68.2)
Installing React-Core 0.69.0 (was 0.68.2)
Installing React-CoreModules 0.69.0 (was 0.68.2)
Installing React-RCTActionSheet 0.69.0 (was 0.68.2)
Installing React-RCTAnimation 0.69.0 (was 0.68.2)
Installing React-RCTBlob 0.69.0 (was 0.68.2)
Installing React-RCTImage 0.69.0 (was 0.68.2)
Installing React-RCTLinking 0.69.0 (was 0.68.2)
Installing React-RCTNetwork 0.69.0 (was 0.68.2)
Installing React-RCTSettings 0.69.0 (was 0.68.2)
Installing React-RCTText 0.69.0 (was 0.68.2)
Installing React-RCTVibration 0.69.0 (was 0.68.2)
Installing React-bridging (0.69.0)
Installing React-callinvoker 0.69.0 (was 0.68.2)
Installing React-cxxreact 0.69.0 (was 0.68.2)
Installing React-jsi 0.69.0 (was 0.68.2)
Installing React-jsiexecutor 0.69.0 (was 0.68.2)
Installing React-jsinspector 0.69.0 (was 0.68.2)
Installing React-logger 0.69.0 (was 0.68.2)
Installing React-perflogger 0.69.0 (was 0.68.2)
Installing React-runtimeexecutor 0.69.0 (was 0.68.2)
Installing ReactCommon 0.69.0 (was 0.68.2)
Installing Yoga 1.14.0
Installing react-native-render-html (6.3.4)
Removing Sentry

@marandaneto just as an headsup, we are planning on releasing 0.69.0 this week