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

Multiple commands produce PrivacyInfo.xcprivacy

Open chrs1885 opened this issue 1 year ago • 5 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.19.0

react-native version: 0.73.4

Are you using Expo?

  • [ ] Yes
  • [x] No

Are you using sentry.io or on-premise?

  • [x] sentry.io (SaaS)
  • [ ] 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://[email protected]/...'
  // 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.

chrs1885 avatar Feb 14 '24 16:02 chrs1885

@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 avatar Feb 16 '24 13:02 krystofwoldrich

@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?

krystofwoldrich avatar Feb 16 '24 13:02 krystofwoldrich

This will be fixed with this PR

brustolin avatar Feb 19 '24 07:02 brustolin

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

fatlinesofcode avatar Feb 28 '24 03:02 fatlinesofcode

@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

kahest avatar Feb 28 '24 08:02 kahest

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.

Evan-Fisher avatar Mar 14 '24 04:03 Evan-Fisher

@sentry/[email protected] 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'

akuznetsov-md avatar Mar 14 '24 08:03 akuznetsov-md

@sentry/[email protected] will include the sentry-cocoa bump and will be released today.

krystofwoldrich avatar Mar 14 '24 10:03 krystofwoldrich

@sentry/[email protected] 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.

Evan-Fisher avatar Mar 14 '24 14:03 Evan-Fisher

@Evan-Fisher you need update Sentry/HybridSDK explicitly

pod update Sentry/HybridSDK

akuznetsov-md avatar Mar 14 '24 15:03 akuznetsov-md

@sentry/[email protected] fix this issue.

aliza-khu avatar Mar 15 '24 08:03 aliza-khu

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

krystofwoldrich avatar Mar 15 '24 09:03 krystofwoldrich

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

michtntbrighte avatar Apr 03 '24 03:04 michtntbrighte

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

delphinebugner avatar Apr 03 '24 14:04 delphinebugner

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

harisbaig100 avatar May 08 '24 09:05 harisbaig100

Getting this error after upgrading to expo SDK 51

julian-gargicevich avatar May 09 '24 16:05 julian-gargicevich

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

a-eid avatar Jun 20 '24 11:06 a-eid

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

krystofwoldrich avatar Jun 20 '24 12:06 krystofwoldrich

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

krystofwoldrich avatar Jun 20 '24 12:06 krystofwoldrich

@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.

HarshitMadhav avatar Jul 09 '24 12:07 HarshitMadhav