10
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running pod install... CocoaPods' output: ↳ CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update

Error output from CocoaPods: ↳ WARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `installation_root'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:226:in `podfile_path'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/user_interface/error_report.rb:30:in `report'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:166:in `installation_root'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:226:in `podfile_path'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/config.rb:205:in `podfile'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command/install.rb:46:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'

Error running pod install Error launching application on iPhone 12 Pro Max.

enter image description here

enter image description here

rvndsngwn
  • 417
  • 2
  • 5
  • 11

7 Answers7

16

It seems that is a sort of bug/incombatibility issue in Cocoapods v 1.11.0

To fix the issue, I followed these steps and it worked like a charm: https://stackoverflow.com/a/69076515/16881741

Briefly, follow these steps:

  1. In your terminal, in ios folder type

    gem list --local | grep cocoapods

  2. Take note of what is the output of the previous command. It looks like that (please ignore the version near the various entry, this is my output and I already use the version 1.10.1):

cocoapods (1.10.1) cocoapods-core (1.10.1) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.5.1) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0)

  1. One by one, launch the command sudo gem uninstall X substituting the "X" with the name of the cocoapods component, without the version. At the end you should obtain this:

sudo gem uninstall cocoapods sudo gem uninstall cocoapods-core sudo gem uninstall cocoapods-deintegrate sudo gem uninstall cocoapods-downloader sudo gem uninstall cocoapods-plugins sudo gem uninstall cocoapods-search sudo gem uninstall cocoapods-trunk sudo gem uninstall cocoapods-try

Be sure to have included all the component listed in the point n.1 to avoid dirty status

  1. Use the command sudo gem install cocoapods -v 1.10.1 To obtain the correct version.

All kudos to Esteban Lopez, the author of the answer I linked at the top.

Picchio
  • 425
  • 1
  • 7
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 10 '21 at 23:09
  • Thank you for helping, I'm already using version 1.11.0, CocoaPods : 1.11.0 Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20] RubyGems : 3.0.3 Host : macOS 11.5.2 (20G95) Xcode : 12.5.1 (12E507) Git : git version 2.23.0 Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib Repositories : trunk - CDN - https://cdn.cocoapods.org/ – rvndsngwn Sep 13 '21 at 02:05
  • Please downgrade from 1.11.0 and use version 1.10.1 – Picchio Sep 22 '21 at 14:58
  • Thank you so much, this answer worked for me – yobo zorle Nov 10 '21 at 05:43
  • Working like charm. Thanks. please update answer with 'sudo gem install cocoapods -v 1.10.2' – Tushar Lathiya Sep 19 '22 at 06:54
16

This issues appeared in Cocoapods 1.11.0 and as many already noticed rolling back to 1.10.2 fixes the issue. But the original issue comes from wrong locale set in the terminal. It has to be a UTF-8-based locale.

The second answer in here solved the issue for me.

As stated, just run

export LC_ALL=en_US.UTF-8

in your terminal, and the error should go away. Consider adding this to your .zshrc file so that it happens automatically in every session.

2

open terminal export LC_ALL=en_US.UTF-8 this will solve your issue.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 22 '23 at 18:20
1

Try pod install with default terminal.

rvndsngwn
  • 417
  • 2
  • 5
  • 11
0

This worked for me:

flutter clean,
delete /iOS/Pods,
delete /iOS/Podfile.lock,
flutter build ios.

my Mac version info:

   CocoaPods : 1.11.0
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.5.2 (20G95)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.23.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
rvndsngwn
  • 417
  • 2
  • 5
  • 11
  • NOTE: In all M1 machines, Android Studio & IntelliJ Idea terminal does not compile the pod install command yet. but all other terminals do it. I don't know the why. This is my observation. – rvndsngwn Mar 31 '22 at 05:51
0

Ran the same project on VCode and it worked successfully, guess the issue was with my Android Studio.

yobo zorle
  • 348
  • 3
  • 8
  • In all M1 machines, Android Studio & IntelliJ Idea terminal does not compile the pod install command yet. but all other terminals do it. I don't know the why. This is my observation. – rvndsngwn Mar 31 '22 at 05:50
0

Upgrade Ruby is another way to resolve this issue.

crystalztl
  • 21
  • 4