question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apple M1: Folly errors "can't modify frozen String (FrozenError)"

See original GitHub issue

Description

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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

11reactions
knlshhcommented, Jan 25, 2022

I resolved this on a non-M1 Mac by replacing:

pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

with

pod 'RCT-Folly', :podspec => "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"

Depending on your React Native version (mine is the latest i.e. 0.67.1), the Podfile needs to be updated. If you’re following https://reactnative.dev/docs/integration-with-existing-apps like me, the Configuring CocoaPods dependencies section mentions that “The Podfile version changes depending on your version of react-native”. What I did was create a new React Native project built for 0.67.1 and saw its Podfile and cherry-picked whatever was needed into my existing iOS project’s Podfile and then continued from the pod install step.

Hope this helps!

8reactions
azazel404commented, Feb 25, 2022

I resolved this on a non-M1 Mac by replacing:

pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

with

pod 'RCT-Folly', :podspec => "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"

Depending on your React Native version (mine is the latest i.e. 0.67.1), the Podfile needs to be updated. If you’re following https://reactnative.dev/docs/integration-with-existing-apps like me, the Configuring CocoaPods dependencies section mentions that “The Podfile version changes depending on your version of react-native”. What I did was create a new React Native project built for 0.67.1 and saw its Podfile and cherry-picked whatever was needed into my existing iOS project’s Podfile and then continued from the pod install step.

Hope this helps!

im try but , make a new error , see the picture Screen Shot 2022-02-25 at 22 57 03

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native, installing cocoapods result: Folly can't modify ...
If Error : `force_encoding': can't modify frozen String (FrozenError) [Xcodeproj] Unknown object version (56). (RuntimeError). Solution :.
Read more >
pod install can't modify frozen string (frozenerror)
pod install fails, it seems the FrozenError and the BadURIError below to be the ... facebook/react-nativeApple M1: Folly errors "can't modify frozen String...
Read more >
Can't pod install on a react-native projet for iOs15
First time I tried to install Pod, I had a link error for FBReactNativeSpec but I fixed it in ... `force_encoding': can't modify...
Read more >
Michael Stelly
On new Apple M1 Macbook Pro, in the /ios folder of my react-native project, running "pod ... `force_encoding': can't modify frozen String (FrozenError)....
Read more >
FrozenError: can't modify frozen String: "" (#364619) - GitLab
... Gitlab::Email::FailureHandler.handle(receiver, error) ... (94 additional frame(s) were not displayed) can't modify frozen String: "".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found