Apple M1: Folly errors "can't modify frozen String (FrozenError)"
See original GitHub issueDescription
Report
System info
Important info:
Model Name: MacBook Pro
Model Identifier: MacBookPro18,1
Chip: Apple M1 Pro
What did you do?
Run pod install
from /ios
folder of my react native project
What did you expect to happen?
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Installing Folly (2018.10.22.00)
What happened instead?
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
CocoaPods Environment
Stack
CocoaPods : 1.11.2
Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
RubyGems : 3.0.3.1
Host : macOS 12.0.1 (21A559)
Xcode : 13.2.1 (13C100)
Git : git version 2.32.0 (Apple Git-132)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Installation Source
Executable Path: /usr/local/bin/pod
Plugins
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
Podfile
platform :ios, '11.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
install! 'cocoapods',
:deterministic_uuids => false
target 'App' do
# Pods for App
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'AppCenter/Push'
pod 'AppCenter/Crashes'
pod 'AppCenter/Analytics'
pod 'AppCenterReactNativeShared'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
target 'AppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'App-tvOS' do
# Pods for App-tvOS
target 'App-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Project that demonstrates the issue
relates only to installation
Version
0.64.1
Output of npx react-native info
System: OS: macOS 12.0.1 CPU: (10) x64 Apple M1 Pro Memory: 1.16 GB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn npm: 6.14.15 - ~/Documents/sams-fresh-app-reactnative/node_modules/.bin/npm Watchman: 2022.01.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 11.0.13 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
From the project root, cd ios && pod install
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10
Top GitHub Comments
I resolved this on a non-M1 Mac by replacing:
with
Depending on your React Native version (mine is the latest i.e.
0.67.1
), thePodfile
needs to be updated. If you’re following https://reactnative.dev/docs/integration-with-existing-apps like me, theConfiguring CocoaPods dependencies
section mentions that “ThePodfile
version changes depending on your version ofreact-native
”. What I did was create a new React Native project built for0.67.1
and saw itsPodfile
and cherry-picked whatever was needed into my existing iOS project’sPodfile
and then continued from thepod install
step.Hope this helps!
im try but , make a new error , see the picture