CocoaPods requires your terminal to be using UTF-8 encoding and it aborts to run pod

Created on 20 Dec 2016  ยท  8Comments  ยท  Source: CocoaPods/CocoaPods

Report

What did you do?

I try to run set of pod commands through Perl script that runs on build machine.

/usr/local/bin/pod spec lint /Users/appsflyer/workspace/ios_sdk_framework_test/templates/AppsFlyerFWTestBuild.podspec.json --verbose
    WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
   ...

I even added new CLI cat ~/.profile and output is:

export LANG=en_US.UTF-8
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*`

I also tried:

$ env | grep LANG
LANG=en_US.UTF-8

but script continues to drop this warning that actually blocks /pod spec lint to run

What did you expect to happen?

should test my pod framework before deploy

What happened instead?

command CLI fails

CocoaPods Environment

โ„น Please replace this with the output of pod env.

$ pod env | pbcopy gives me nothing but pod env output:

### Stack

CocoaPods : 1.1.1
Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin16]
RubyGems : 2.5.1
Host : Mac OS X 10.12.2 (16C68)
Xcode : 8.2 (8C38)
Git : git version 2.10.1 (Apple Git-78)
Ruby lib dir : /Users/appsflyer/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ eab8d4f7266a90b9c17491acf9304fb87d19348e

### Installation Source

Executable Path: /Users/appsflyer/.rvm/gems/ruby-2.3.0/bin/pod

### Plugins


cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.1
cocoapods-try         : 1.1.0

awaiting input

Most helpful comment

@af-fess okay then my guess is that your ~/.profile isn't actually being source'd when you startup a new terminal. So, LANG might be set, but it's not being inherited by new processes in your terminal. To fix this, you might want to find either your ~/.bash_profile (for bash) or ~/.zshrc (for zsh) and add the export line that you put in your ~/.profile in one of those other ones instead. Again, it depends on the shell you're using, but it's likely one of those.

Since this isn't a CocoaPods issue in terms of something we can patch CocoaPods to fix, I'm going to close this one out. Best of luck, and have a great day!

All 8 comments

@af-fess can you try running your pod command like so:

<pod command> LANG=en_US.UTF-8

Also, can you tell me which shell you're using?

@benasher44 yes, with $ LANG=en_US.UTF-8 <pod command> it works

@af-fess okay then my guess is that your ~/.profile isn't actually being source'd when you startup a new terminal. So, LANG might be set, but it's not being inherited by new processes in your terminal. To fix this, you might want to find either your ~/.bash_profile (for bash) or ~/.zshrc (for zsh) and add the export line that you put in your ~/.profile in one of those other ones instead. Again, it depends on the shell you're using, but it's likely one of those.

Since this isn't a CocoaPods issue in terms of something we can patch CocoaPods to fix, I'm going to close this one out. Best of luck, and have a great day!

great!

I have this problem although it doesn't abort

echo $LANG
en_US.UTF-8

pod --version
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:

export LANG=en_US.UTF-8

1.5.3

echo $?
0

set
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.iwunqGM5UA/Render
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_REMATCH=([0]="n")
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="57" [3]="1" [4]="release" [5]="x86_64-apple-darwin18")
BASH_VERSION='3.2.57(1)-release'
BLOCKSIZE=1k
COLUMNS=140
DIRSTACK=()
DISPLAY=/private/tmp/com.apple.launchd.IolQiyOf6v/org.macosforge.xquartz:0
EUID=501
EXINIT='set showmode ignorecase ruler tabstop=4 mesg verbose exrc'
GREP_COLOR=34
GREP_OPTIONS='--color -d skip'
GROUPS=()
HISTFILE=/Volumes/DATA/dgerman/.bash_history
HISTFILESIZE=1000
HISTIGNORE=ls:lt:w:df:du:vil:taill
HISTORYymd_hms=.bash_hist.190105_120826
HISTSIZE=1000
HISTTIMEFORMAT='%F %T '
HOME=/Volumes/DATA/dgerman
HOSTNAME=smacpro
HOSTTYPE=x86_64
IFS=$' tn'
LANG=en_US.UTF-8
LC_ALL=C
LESS='-X --LONG-PROMPT -P file:%f %Pb% help,forward,back,quit, / (search)'
LINES=36
LOGNAME=dgerman
MACHTYPE=x86_64-apple-darwin18
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=darwin18
PAGER=less
PATH=/opt/local/bin:/opt/local/sbin:/Volumes/DATA/dgerman/.bin:/Library/Developer/CommandLineTools/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/opt/X11/bin:/usr/libexec:/Volumes/DATA/dgerman/.gem/ruby/2.3.0/bin
PIPESTATUS=([0]="0")
PPID=60623
PROMPT_COMMAND=update_terminal_cwd
PS1='$(split_pwd) > '
PS2=' + '
PS4='+ '
PWD=/Volumes/DATA/dgerman
RWS=Real-World-Systems.com
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:history:interactive-comments:monitor:vi
SHELL_SESSION_DID_HISTORY_CHECK=1
SHELL_SESSION_DID_INIT=1
SHELL_SESSION_DIR=/Volumes/DATA/dgerman/.bash_sessions
SHELL_SESSION_FILE=/Volumes/DATA/dgerman/.bash_sessions/2828D7BA-88DF-4DE4-96DA-5F6F142F0CCA.session
SHELL_SESSION_HISTFILE=/Volumes/DATA/dgerman/.bash_sessions/2828D7BA-88DF-4DE4-96DA-5F6F142F0CCA.history
SHELL_SESSION_HISTFILE_NEW=/Volumes/DATA/dgerman/.bash_sessions/2828D7BA-88DF-4DE4-96DA-5F6F142F0CCA.historynew
SHELL_SESSION_HISTFILE_SHARED=/Volumes/DATA/dgerman/.bash_history
SHELL_SESSION_TIMESTAMP_FILE=/Volumes/DATA/dgerman/.bash_sessions/_expiration_check_timestamp
SHLVL=1
SSH_AGENT_PID=60641
SSH_AUTH_SOCK=/var/folders/rr/jvwb6c9j2h18lzc28kzws_940000gn/T//ssh-rqDngB6oklap/agent.60640
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=421.1
TERM_SESSION_ID=2828D7BA-88DF-4DE4-96DA-5F6F142F0CCA
TIMEFORMAT=' %1R wall time; %U user; %S sys; %P%% '
TMPDIR=/var/folders/rr/jvwb6c9j2h18lzc28kzws_940000gn/T/
UID=501
USER=dgerman
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0

uname -ap
Darwin smacpro 18.2.0 Darwin Kernel Version 18.2.0: Fri Dec 14 18:43:36 PST 2018;
root:xnu-4903.240.10~4/RELEASE_X86_64 x86_64 i386

Mac OS Mojave 10.14.3 Beta(18D32a)

csrutil status
System Integrity Protection status: disabled.

cat newprocess

echo $LANG: $LANG
echo $$:$$

./newprocess
$LANG: en_US.UTF-8
$$:68400

Here is a solution:
add export LC_ALL="en_US.UTF-8" to your ~/.zshrc or ~/.bashrc
https://github.com/CocoaPods/CocoaPods/issues/1036#issuecomment-20675439

How to solve this

CocoaPods' output:
โ†ณ
Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `razorpay_flutter` from `.symlinks/plugins/razorpay_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_f_9_d.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

โ€•โ€•โ€• MARKDOWN TEMPLATE โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

### Command

```
/usr/local/bin/pod install --verbose
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.9.3
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15.3 (19D76)
       Xcode : 11.3.1 (11C504)
         Git : git version 2.21.1 (Apple Git-122.3)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
```

### Plugins

```
cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0
```

### Podfile

```ruby
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  generated_key_values = {}
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) do |line|
    next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
    plugin = line.split(pattern=separator)
    if plugin.length == 2
      podname = plugin[0].strip()
      path = plugin[1].strip()
      podpath = File.expand_path("#{path}", file_abs_path)
      generated_key_values[podname] = podpath
    else
      puts "Invalid plugin specification: #{line}"
    end
  end
  generated_key_values
end

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  # Flutter Pod

  copied_flutter_dir = File.join(__dir__, 'Flutter')
  copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
  copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
  unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
    # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
    # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
    # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.

    generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
    unless File.exist?(generated_xcode_build_settings_path)
      raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
    end
    generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
    cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];

    unless File.exist?(copied_framework_path)
      FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
    end
    unless File.exist?(copied_podspec_path)
      FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
    end
  end

  # Keep pod path relative so it can be checked into Podfile.lock.
  pod 'Flutter', :path => 'Flutter'

  # Plugin Pods

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.each do |name, path|
    symlink = File.join('.symlinks', 'plugins', name)
    File.symlink(path, symlink)
    pod name, :path => File.join(symlink, 'ios')
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'YES'
    end
  end
end
```

### Error

```
ArgumentError - invalid byte sequence in US-ASCII
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:287:in `split'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:287:in `block in ensure_versions_file_loaded'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:286:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:286:in `reduce'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:286:in `ensure_versions_file_loaded'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:208:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```

โ€•โ€•โ€• TEMPLATE END โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=invalid+byte+sequence+in+US-ASCII&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - Pod install fails on invalid byte sequence while having LANG=en_US.UTF-8 in profile
   https://github.com/CocoaPods/CocoaPods/issues/5780 [closed] [9 comments]
   2 weeks ago

 - error getting while installing pod in flutter
   https://github.com/CocoaPods/CocoaPods/issues/9757 [closed] [7 comments]
   01 Jun 2020

 - Pod Install failed
   https://github.com/CocoaPods/CocoaPods/issues/9222 [closed] [3 comments]
   14 Oct 2019

and 16 more at:
https://github.com/cocoapods/cocoapods/search?q=invalid%20byte%20sequence%20in%20US-ASCII&type=Issues&utf8=โœ“

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
    
Comparing resolved specification to the sandbox manifest
  A AppAuth
  A FBSDKCoreKit
  A FBSDKLoginKit
  A Firebase
  A FirebaseAnalytics
  A FirebaseAuth
  A FirebaseCore
  A FirebaseCoreDiagnostics
  A FirebaseInstallations
  A FirebaseInstanceID
  A FirebaseMessaging
  A Flutter
  A GTMAppAuth
  A GTMSessionFetcher
  A GoogleAppMeasurement
  A GoogleDataTransport
  A GoogleMaps
  A GoogleSignIn
  A GoogleUtilities
  A PromisesObjC
  A Protobuf
  A Reachability
  A Stripe
  A app_settings
  A connectivity
  A firebase_auth
  A firebase_core
  A firebase_messaging
  A flutter_facebook_login
  A geolocator
  A google_maps_flutter
  A google_sign_in
  A image_picker
  A location
  A location_permissions
  A nanopb
  A path_provider
  A permission_handler
  A shared_preferences
  A stripe_payment
  A webview_flutter

Downloading dependencies

-> Installing AppAuth (1.4.0)
  > Copying AppAuth from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/AppAuth/1.4.0-3
  1bce` to `Pods/AppAuth`

-> Installing FBSDKCoreKit (5.15.1)
  > Copying FBSDKCoreKit from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FBSDKCoreKit/5.
  15.1-1d5ac` to `Pods/FBSDKCoreKit`

-> Installing FBSDKLoginKit (5.15.1)
  > Copying FBSDKLoginKit from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FBSDKLoginKit/5
  .15.1-f1ea8` to `Pods/FBSDKLoginKit`

-> Installing Firebase (6.34.0)
  > Copying Firebase from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/Firebase/6.34.0
  -c23a3` to `Pods/Firebase`

-> Installing FirebaseAnalytics (6.9.0)
  > Copying FirebaseAnalytics from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseAnalyti
  cs/6.9.0-3bb09` to `Pods/FirebaseAnalytics`

-> Installing FirebaseAuth (6.9.2)
  > Copying FirebaseAuth from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseAuth/6.
  9.2-c92d4` to `Pods/FirebaseAuth`

-> Installing FirebaseCore (6.10.4)
  > Copying FirebaseCore from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseCore/6.
  10.4-d3a97` to `Pods/FirebaseCore`

-> Installing FirebaseCoreDiagnostics (1.7.0)
  > Copying FirebaseCoreDiagnostics from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseCoreDia
  gnostics/1.7.0-770ac` to `Pods/FirebaseCoreDiagnostics`

-> Installing FirebaseInstallations (1.7.0)
  > Copying FirebaseInstallations from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseInstall
  ations/1.7.0-466c7` to `Pods/FirebaseInstallations`

-> Installing FirebaseInstanceID (4.8.0)
  > Copying FirebaseInstanceID from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseInstanc
  eID/4.8.0-bd3ff` to `Pods/FirebaseInstanceID`

-> Installing FirebaseMessaging (4.7.1)
  > Copying FirebaseMessaging from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/FirebaseMessagi
  ng/4.7.1-5eca4` to `Pods/FirebaseMessaging`

-> Installing Flutter (1.0.0)

-> Installing GTMAppAuth (1.1.0)
  > Copying GTMAppAuth from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GTMAppAuth/1.1.
  0-197a8` to `Pods/GTMAppAuth`

-> Installing GTMSessionFetcher (1.5.0)
  > Copying GTMSessionFetcher from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GTMSessionFetch
  er/1.5.0-b3503` to `Pods/GTMSessionFetcher`

-> Installing GoogleAppMeasurement (6.9.0)
  > Copying GoogleAppMeasurement from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GoogleAppMeasur
  ement/6.9.0-a6a3a` to `Pods/GoogleAppMeasurement`

-> Installing GoogleDataTransport (7.5.1)
  > Copying GoogleDataTransport from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GoogleDataTrans
  port/7.5.1-f56af` to `Pods/GoogleDataTransport`

-> Installing GoogleMaps (3.9.0)
  > Copying GoogleMaps from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GoogleMaps/3.9.
  0-4b534` to `Pods/GoogleMaps`

-> Installing GoogleSignIn (5.0.2)
  > Copying GoogleSignIn from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GoogleSignIn/5.
  0.2-7137d` to `Pods/GoogleSignIn`

-> Installing GoogleUtilities (6.7.2)
  > Copying GoogleUtilities from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/GoogleUtilities
  /6.7.2-7f2f5` to `Pods/GoogleUtilities`

-> Installing PromisesObjC (1.2.11)
  > Copying PromisesObjC from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/PromisesObjC/1.
  2.11-8c196` to `Pods/PromisesObjC`

-> Installing Protobuf (3.14.0)
  > Copying Protobuf from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/Protobuf/3.14.0
  -0cde8` to `Pods/Protobuf`

-> Installing Reachability (3.2)
  > Copying Reachability from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/Reachability/3.
  2-33e18` to `Pods/Reachability`

-> Installing Stripe (21.1.0)
  > Copying Stripe from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/Stripe/21.1.0-0
  06b5` to `Pods/Stripe`

-> Installing app_settings (3.0.0+1)

-> Installing connectivity (0.0.1)

-> Installing firebase_auth (0.0.1)

-> Installing firebase_core (0.0.1)

-> Installing firebase_messaging (0.0.1)

-> Installing flutter_facebook_login (0.0.1)

-> Installing geolocator (5.3.2+2)

-> Installing google_maps_flutter (0.0.1)

-> Installing google_sign_in (0.0.1)

-> Installing image_picker (0.0.1)

-> Installing location (0.0.1)

-> Installing location_permissions (3.0.0+1)

-> Installing nanopb (1.30906.0)
  > Copying nanopb from
  `/Users/theninehertz/Library/Caches/CocoaPods/Pods/Release/nanopb/1.30906.
  0-59317` to `Pods/nanopb`

-> Installing path_provider (0.0.1)

-> Installing permission_handler (5.0.1+1)

-> Installing shared_preferences (0.0.1)

-> Installing stripe_payment (1.0.0)

-> Installing webview_flutter (0.0.1)
  - Running pre install hooks
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local
  because checking is only perfomed in repo update

โ€•โ€•โ€• MARKDOWN TEMPLATE
โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

### Command

```
/usr/local/bin/pod install --verbose
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.8.4
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580)
        [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15 (19A583)
       Xcode : 11.1 (11A1027)
         Git : git version 2.21.0 (Apple Git-122)
Ruby lib dir :
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @
4d970b4be83288615cc1ae845a7a515f11eddeb0
               trunk - CDN - https://cdn.cocoapods.org/
```

### Plugins

```
cocoapods-clean       : 0.0.1
cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0
```

### Podfile

```ruby
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter
build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..',
  'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're
    running pod install manually, make sure flutter pub get is executed
    first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}.
  Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin',
'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
```

### Error

```
NoMethodError - undefined method `size' for nil:NilClass
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:455:i
n `populate_mach_header'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:233:i
n `populate_fields'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:55:in
`initialize_from_bin'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/macho_file.rb:33:in
`new_from_bin'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:365:in
`block in populate_machos'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:364:in
`each'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:364:in
`populate_machos'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:156:in
`populate_fields'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho/fat_file.rb:95:in
`initialize'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho.rb:31:in `new'
/Library/Ruby/Gems/2.6.0/gems/ruby-macho-1.4.0/lib/macho.rb:31:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:457:in `dynamic_binary?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:171:in `block in vendored_dynamic_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:170:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:170:in `vendored_dynamic_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:179:in `vendored_static_frameworks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sandbox/file_acc
essor.rb:266:in `vendored_static_artifacts'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:82:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:82:in `flat_map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:82:in `block (2 levels) in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:74:in `block in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:73:in
`verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/xcode/
target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:590
:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:158
:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.
rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in
`run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in
`run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top
(required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```

โ€•โ€•โ€• TEMPLATE END
โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60size%27+
for+nil%3ANilClass&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly
submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - NoMethodError - undefined method `size' for nil:NilClass
   https://github.com/CocoaPods/CocoaPods/issues/10273 [open] [1 comment]
   a day ago

 - NoMethodError - undefined method `each' for nil:NilClass
   https://github.com/CocoaPods/CocoaPods/issues/9239 [closed] [8 comments]
   4 days ago

 - NoMethodError - undefined method `size' for nil:NilClass
   https://github.com/CocoaPods/CocoaPods/issues/8377 [closed] [19 comments]
   13 Oct 2020

and 6 more at:
https://github.com/cocoapods/cocoapods/search?q=undefined%20method%20%60size
%27%20for%20nil&type=Issues&utf8=โœ“

Error output from CocoaPods:
โ†ณ
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/un
iversal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir
/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin in
PATH, mode 040777

[!] Automatically assigning platform `iOS` with version `11.0` on target
`Runner` because no platform was specified. Please specify a platform for
this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install

Anyone faced this issue.please help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marzapower picture marzapower  ยท  3Comments

pallaviMN picture pallaviMN  ยท  3Comments

5SMNOONMS5 picture 5SMNOONMS5  ยท  3Comments

Curtis-Halbrook picture Curtis-Halbrook  ยท  3Comments

intelliot picture intelliot  ยท  3Comments