react-native: Priavacy Policy aggregation errors on get_privacyinfo_file_path
Description
When upgraded from RN 0.73.8 to RN 0.74.1 pod install gives error on get_privacyinfo_file_path
Steps to reproduce
Update from RN 0.73.8 with PrivacyManifest to RN 0.74.1
React Native Version
0.74.1
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.4.1
CPU: (12) arm64 Apple M2 Pro
Memory: 114.86 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.7.3
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.22
path: ~/Desktop/Projects/App/node_modules/.bin/yarn
npm:
version: 10.5.0
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.04.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/tomaszlorenc/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK:
API Levels:
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
- "33"
- "33"
- "34"
Build Tools:
- 30.0.3
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
System Images:
- android-26 | Google APIs ARM 64 v8a
- android-28 | Google ARM64-V8a Play ARM 64 v8a
- android-29 | Google Play ARM 64 v8a
- android-31 | Google APIs ARM 64 v8a
- android-33-ext4 | Google Play ARM 64 v8a
- android-33-ext5 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11709847
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.7.6
path: /Users/tomaszlorenc/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.74.1
wanted: 0.74.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: false
Stacktrace or Logs
[!] An error occurred while processing the post-install hook of the Podfile.
undefined method `end_with?' for nil:NilClass
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `block in get_privacyinfo_file_path'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `each'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `find'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `get_privacyinfo_file_path'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:10:in `add_aggregated_privacy_manifest'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/react_native_pods.rb:301:in `react_native_post_install'
/Users/username/Desktop/Projects/nameA/App/ios/Podfile:52:in `block (3 levels) in from_ruby'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1013:in `run_podfile_post_install_hook'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1001:in `block in run_podfile_post_install_hooks'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in `message'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1000:in `run_podfile_post_install_hooks'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:337:in `block (2 levels) in create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:336:in `block in create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in `integrate'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `install!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/username/.rbenv/versions/2.7.6/bin/pod:23:in `load'
/Users/username/.rbenv/versions/2.7.6/bin/pod:23:in `<main>'
Reproducer
https://github.com/lorenc-tomasz/rn-reproduction
Screenshots and Videos
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 21 (8 by maintainers)
Commits related to this issue
- chore: support apple privacy manifest downgrade to react-native 0.74 while waiting on: https://github.com/facebook/react-native/issues/44437 — committed to salah-ghanim/react-native-maps by deleted user 3 years ago
- Include Apple privacy manifest (#5057) * feat: support apple privacy manifest for compliance with Apple privacy requirements * chore: downgrade example to react-native 0.74 while waiting on: ... — committed to react-native-maps/react-native-maps by salah-ghanim 3 years ago
- Include Apple privacy manifest (#5057) * feat: support apple privacy manifest for compliance with Apple privacy requirements * chore: downgrade example to react-native 0.74 while waiting on: ... — committed to DavidLee0501/React-Native-Map by DavidLee0501 3 years ago
- Include Apple privacy manifest (#5057) * feat: support apple privacy manifest for compliance with Apple privacy requirements * chore: downgrade example to react-native 0.74 while waiting on: ... — committed to PietroMorato/mobile-map by salah-ghanim 3 years ago
- Include Apple privacy manifest (#5057) * feat: support apple privacy manifest for compliance with Apple privacy requirements * chore: downgrade example to react-native 0.74 while waiting on: ... — committed to pereira534/reactnative-google-maps by pereira534 3 years ago
Mine patch file:
Version 0.74.2 of React Native is out with all the fixes to the privacy manifest. Patches for versions 0.73 and 0.72 will come in the next few days with similar fixes!
@david-cahill Likely next week. We have been busy working on the React Conf the past two weeks, so we could not dedicate any time to anything else, unfortunately. This week we have internal events plus the AppJS conf that are going to slow down the releases a bit. Next week we should be back to normal.
@aleqsio @cipolleschi can you look at this, please? 😃
I think we’re looking to merge https://github.com/facebook/react-native/pull/44410 to fix this issue, no?
We have a fix ready with #44400. It has landed already in main, we need to release patched versions of React Native.
I’ll keep the issue open for discoverability.
@cipolleschi Thank you for your answer. I eventually got tired of trying to fix it so I tried to update RN itself to 0.75.3 at that time, cleaned everything and after fixing a couple of issues related to the upgrade it did work.
I am seeing the same error, and this has not been fixed by the linked PRs, so here is another one for this specific issue (manifest without a
NSPrivacyAccessedAPITypeskey): https://github.com/facebook/react-native/pull/44628I can confirm it’s happening for me, latest Xcode and MacOs.