getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.56k stars 331 forks source link

Multiple commands produce PrivacyInfo.xcprivacy #3599

Closed chrs1885 closed 6 months ago

chrs1885 commented 7 months ago

OS:

Platform:

SDK:

SDK version: 5.19.0

react-native version: 0.73.4

Are you using Expo?

Are you using sentry.io or on-premise?

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

-

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
});

I have the following issue:

Building the iOS app causes the following issue

Multiple commands produce '/Users/JohnDoe/Library/Developer/Xcode/DerivedData/AwesomeProject-ccrefsqqbzdwoefvcsygajfvyqlw/Build/Products/Debug-iphonesimulator/AwesomeProject.app/PrivacyInfo.xcprivacy'

Steps to reproduce:

  1. Create React Native project: npx react-native@latest init AwesomeProject
  2. Open AwesomeProject.xcworkspace
    • Create Privacy Manifest (New -> File)
    • Set target membership of the Privacy Manifest to AwesomeProject
  3. Build the app

Actual result:

-

Expected result:

Project builds, Privacy Manifest files get merged successfully.

krystofwoldrich commented 7 months ago

@chrs1885 Thank you for the message, I was able to reproduce this in our sample app. We will keep you updated on the fix.

krystofwoldrich commented 7 months ago

@brustolin The manually create PrivacyInfo.xcprivacy clashes with https://github.com/getsentry/sentry-cocoa/pull/3206

Do users have to set up something to merge the files? Or can we detect this automatically?

brustolin commented 6 months ago

This will be fixed with this PR

fatlinesofcode commented 6 months ago

when can we expect this to released for react native? its blocking us including a xcprivacy file in our app

kahest commented 6 months ago

@fatlinesofcode we will release a stable version of sentry-cocoa in the next few days, then we can bump the dependency and release a RN version with the fix.

I'm reopening this issue to track when the fix landed in RN.

cc @krystofwoldrich @philipphofmann

Evan-Fisher commented 6 months ago

Do you know where I could find when this will make it's way into @sentry/react-native? Version 5.19.2 seems to still point to 8.20.0.

akuznetsov-md commented 6 months ago

@sentry/react-native@5.19.2 with the following patch helped me workaround the issue

diff --git a/node_modules/@sentry/react-native/RNSentry.podspec b/node_modules/@sentry/react-native/RNSentry.podspec
index f9eafb6..1d0fc2f 100644
--- a/node_modules/@sentry/react-native/RNSentry.podspec
+++ b/node_modules/@sentry/react-native/RNSentry.podspec
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
   s.preserve_paths = '*.js'

   s.dependency 'React-Core'
-  s.dependency 'Sentry/HybridSDK', '8.20.0'
+  s.dependency 'Sentry/HybridSDK', '8.21.0'

   s.source_files = 'ios/**/*.{h,mm}'
   s.public_header_files = 'ios/RNSentry.h'
krystofwoldrich commented 6 months ago

@sentry/react-native@5.19.3 will include the sentry-cocoa bump and will be released today.

Evan-Fisher commented 6 months ago

@sentry/react-native@5.19.2 with the following patch helped me workaround the issue

diff --git a/node_modules/@sentry/react-native/RNSentry.podspec b/node_modules/@sentry/react-native/RNSentry.podspec
index f9eafb6..1d0fc2f 100644
--- a/node_modules/@sentry/react-native/RNSentry.podspec
+++ b/node_modules/@sentry/react-native/RNSentry.podspec
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
   s.preserve_paths = '*.js'

   s.dependency 'React-Core'
-  s.dependency 'Sentry/HybridSDK', '8.20.0'
+  s.dependency 'Sentry/HybridSDK', '8.21.0'

   s.source_files = 'ios/**/*.{h,mm}'
   s.public_header_files = 'ios/RNSentry.h'

I actually tried that, I get this Screenshot 2024-03-14 at 7 34 03 AM for some reason. Didn't spend much time trying to debug.

akuznetsov-md commented 6 months ago

@Evan-Fisher you need update Sentry/HybridSDK explicitly

pod update Sentry/HybridSDK
aliza-khu commented 6 months ago

@sentry/react-native@5.19.3 fix this issue.

krystofwoldrich commented 6 months ago

Fixed in https://github.com/getsentry/sentry-react-native/releases/tag/5.19.3, please upgrade to this or newer releases.

michtntbrighte commented 5 months ago

Hi, after upgrading to @sentry/react-native version 5.19.3 i have issues with the archiving part on fastlane (but archive works fine locally), it failed in my pipeline, and i've narrowed down that it only happens sentry-cocoa version after 8.21.0 is anyone having the same issue? thanks

delphinebugner commented 5 months ago

Worked for me after upgrading to 5.19.3, thanks @krystofwoldrich! 🌟

harisbaig100 commented 4 months ago

checking for install build only check box in copy bundle resources under build phases can help

julian-gargicevich commented 4 months ago

Getting this error after upgrading to expo SDK 51

a-eid commented 2 months ago

we don't use sentry and we're still facing this issue.

krystofwoldrich commented 2 months ago

Hi @julian-gargicevich, what version of @sentry/react-native are you using? Can you try it with the latest release?

krystofwoldrich commented 2 months ago

@michtntbrighte If the archive is still not working could you open a new issue with more details?

HarshitMadhav commented 2 months ago

@krystofwoldrich after updating sentry from 5.15.1 to the 5.19.3 version, issue is fixed but I am facing this issue after the update: caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403) when I regenerated the auth token again it works fine.