Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrozenError in colored2 gem while running pod install in CocoaPods 1.16.2 #12710

Open
jerrypaulsam opened this issue Dec 1, 2024 · 0 comments

Comments

@jerrypaulsam
Copy link

jerrypaulsam commented Dec 1, 2024

I'm encountering a FrozenError when trying to run pod install with CocoaPods 1.16.2. The error occurs during the execution of the colored2 gem, specifically in the ascii_decorator.rb file. The error message is as follows:

/Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2/ascii_decorator.rb:67:in `decorate': can't modify frozen String: "" (FrozenError)
from /Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:26:in `surround_with_color'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:62:in `block (3 levels) in included'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface/error_report.rb:14:in `report'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:66:in `report_error'
from /Users/local/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
from /Users/local/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
from /Users/local/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/pod:25:in `load'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/pod:25:in `<main>'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `eval'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `<main>'
/Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2/ascii_decorator.rb:67:in `decorate': can't modify frozen String: "" (FrozenError)
from /Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:26:in `surround_with_color'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/colored2-3.1.2/lib/colored2.rb:51:in `block (3 levels) in included'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/validator.rb:131:in `validate'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:191:in `block in validate_podspec'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/config.rb:41:in `with_changes'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:190:in `validate_podspec'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/abstract_external_source.rb:178:in `store_podspec'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/path_source.rb:17:in `block in fetch'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:997:in `fetch_external_source'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:976:in `block (2 levels) in fetch_external_sources'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:975:in `each'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:975:in `block in fetch_external_sources'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:974:in `fetch_external_sources'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in `analyze'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in `install!'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in `run'
from /Users/local/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
from /Users/local/.rvm/gems/ruby-3.2.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/pod:25:in `load'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/pod:25:in `<main>'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `eval'
from /Users/local/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `<main>'

Steps to reproduce:

I am using Ruby 3.2.0 and CocoaPods 1.16.2. I run the command pod install on my project. The error happens during the installation process.

What I've tried:

I tried uninstalling and reinstalling the colored2 gem. I attempted updating CocoaPods to the latest version, but the issue persists. I tried clearing the CocoaPods cache (pod cache clean --all), but that didn’t help.

System Information:

Ruby version: 3.1.0 (installed via RVM)

CocoaPods version: 1.16.2

colored2 gem version: 3.1.2

macOS version: 14.6.1 (23G93)

Can anyone help me understand why this error occurs, and how I can resolve it?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant