Skip to content

Error running pod install, undefined local variable or method 'continue' for #<Pod::Podfile:0x00000001095c1188 @defined_in_file=#<Pathname:/path/to/ios/Podfile> #104118

@byytelope

Description

@byytelope

Steps to Reproduce

  1. Initialize new flutter app.
  2. Add any pub dependency.
  3. Run on iOS simulator.

I have tried reinstalling and upgrading both ruby and cocoapods but nothing seems to work. Not sure if this is a flutter problem but figured I will report here because I am not familiar with ruby at all.

Logs

Logs
Launching lib/main.dart on iPhone 13 in debug mode...
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 `path_provider_ios` from `.symlinks/plugins/path_provider_ios/iOS`
    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
    Comparing resolved specification to the sandbox manifest
      A Flutter
      A path_provider_ios
    Downloading dependencies
    -> Installing Flutter (1.0.0)
    -> Installing path_provider_ios (0.0.1)
      - Running pre install hooks
      - Running pre integrate hooks
    Generating Pods project
      - Creating Pods project
      - Installing files into Pods project
        - Adding source files
        - Adding frameworks
        - Adding libraries
        - Adding resources
        - Adding development pod helper files
        - Linking headers
      - Installing Pod Targets
        - Installing target `Flutter` iOS 9.0
        - Installing target `path_provider_ios` iOS 9.0
          - Generating module map file at `Pods/Target Support Files/path_provider_ios/path_provider_ios.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/path_provider_ios/path_provider_ios-umbrella.h`
          - Generating Info.plist file at `Pods/Target Support Files/path_provider_ios/path_provider_ios-Info.plist`
          - Generating dummy source at `Pods/Target Support Files/path_provider_ios/path_provider_ios-dummy.m`
      - Installing Aggregate Targets
        - Installing target `Pods-Runner` iOS 12.0
          - Generating Info.plist file at `Pods/Target Support Files/Pods-Runner/Pods-Runner-Info.plist`
          - Generating module map file at `Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h`
          - Generating dummy source at `Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m`
      - Generating deterministic UUIDs
      - Stabilizing target UUIDs
      - Running post install hooks
    [!] An error occurred while processing the post-install hook of the Podfile.
    undefined local variable or method `continue' for #<Pod::Podfile:0x00000001095c1188 @defined_in_file=#<Pathname:/Users/mohamedshadhan/Dev/Flutter/test_app/ios/Podfile>, @internal_hash={}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>, @post_install_callback=#<Proc:0x00000001095e22c0 /Users/mohamedshadhan/Dev/Flutter/test_app/ios/Podfile:37>, @installation_options=#<Pod::Installer::InstallationOptions:0x0000000109690dc0 @clean=true, @deduplicate_targets=true, @deterministic_uuids=true, @integrate_targets=true, @lock_pod_sources=true, @warn_for_multiple_pod_sources=true, @warn_for_unused_master_specs_repo=true, @share_schemes_for_development_pods=false, @disable_input_output_paths=false, @preserve_pod_file_structure=false, @generate_multiple_pod_projects=false, @incremental_installation=false, @skip_pods_project_generation=false>>
          continue if xcframework_file.start_with?(".") # Hidden file, possibly on external disk.
          ^^^^^^^^
    /Users/mohamedshadhan/Tools/flutter/packages/flutter_tools/bin/podhelper.rb:63:in `block (2 levels) in flutter_additional_ios_build_settings'
    /Users/mohamedshadhan/Tools/flutter/packages/flutter_tools/bin/podhelper.rb:62:in `each_child'
    /Users/mohamedshadhan/Tools/flutter/packages/flutter_tools/bin/podhelper.rb:62:in `block in flutter_additional_ios_build_settings'
    /Users/mohamedshadhan/Tools/flutter/packages/flutter_tools/bin/podhelper.rb:51:in `each'
    /Users/mohamedshadhan/Tools/flutter/packages/flutter_tools/bin/podhelper.rb:51:in `flutter_additional_ios_build_settings'
    /Users/mohamedshadhan/Dev/Flutter/test_app/ios/Podfile:39:in `block (3 levels) in from_ruby'
    /Users/mohamedshadhan/Dev/Flutter/test_app/ios/Podfile:38:in `each'
    /Users/mohamedshadhan/Dev/Flutter/test_app/ios/Podfile:38:in `block (2 levels) in from_ruby'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile.rb:196:in `post_install!'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:945:in `run_podfile_post_install_hook'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:933:in `block in run_podfile_post_install_hooks'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in `message'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:932:in `run_podfile_post_install_hooks'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:331:in `block (2 levels) in create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:330:in `block in create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:309:in `create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:301:in `generate_pods_project'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:180:in `integrate'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:167:in `install!'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/bin/pod:25:in `load'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/bin/pod:25:in `<main>'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:947:in `rescue in run_podfile_post_install_hook'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:944:in `run_podfile_post_install_hook'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:933:in `block in run_podfile_post_install_hooks'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in `message'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:932:in `run_podfile_post_install_hooks'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:331:in `block (2 levels) in create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:330:in `block in create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:309:in `create_and_save_projects'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:301:in `generate_pods_project'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:180:in `integrate'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:167:in `install!'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/bin/pod:25:in `load'
    /Users/mohamedshadhan/.rbenv/versions/3.1.2/bin/pod:25:in `<main>'
Error running pod install
Error launching application on iPhone 13.
Exited
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-US)
    • Flutter version 3.0.0 at /Users/mohamedshadhan/Tools/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee4e09cce0 (9 days ago), 2022-05-09 16:45:18 -0700
    • Engine revision d1b9a6938a
    • Dart version 2.17.0
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mohamedshadhan/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.67.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • BF7F1A43-DB60-455F-B272-B23DF8ADD4A8 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 12.3.1 21E258 darwin-arm
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions