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

pod install suggests running expensive flutter build ios when engine artifacts are missing #72737

Closed
MaruQuarky opened this issue Dec 21, 2020 · 21 comments · Fixed by #75351
Closed
Assignees
Labels
P2 Important issues not at the top of the work list platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@MaruQuarky
Copy link

Steps to reproduce the issue:

  1. Upgrade to the latest Flutter beta (1.25.0-8.1.pre)
  2. Ensure the cache directory is empty (as it would be in a fresh CI environment): rm -rf ~/flutter/bin/cache
  3. In any Flutter project that includes cocoapods, run pod install in the ios directory.

Error encountered:

Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.

/Users/{User}/Developer/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework must exist. If you're running pod install manually, make sure flutter build ios is executed first

/Users/{User}/Developer/flutter/packages/flutter_tools/bin/podhelper.rb:42:in `flutter_additional_ios_build_settings'
/Users/{User}/Flutter Project/cocoapods_sample/ios/Podfile:39:in `block (3 levels) in from_ruby'
/Users/{User}/Flutter Project/cocoapods_sample/ios/Podfile:38:in `each'
/Users/{User}/Flutter Project/cocoapods_sample/ios/Podfile:38:in `block (2 levels) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:897:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:885:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:884:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:329:in `block (2 levels) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:328:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:307:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:299:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:178:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:166:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/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.10.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Note: I've masked the /Users/{User}/ in the error message.

Flutter Doctor:

[✓] Flutter (Channel beta, 1.25.0-8.1.pre, on Mac OS X 10.15.7 19H15 darwin-x64, locale en)
    • Flutter version 1.25.0-8.1.pre at /Users/{User}/Developer/flutter
    • Framework revision 8f89f6505b (2 days ago), 2020-12-15 15:07:52 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/{User}/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.10.0

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

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

[✓] Connected device (2 available)
    • sdk gphone x86 arm (mobile)         • emulator-5554                        • android-x86 • Android 11 (API 30) (emulator)
    • iPhone SE (2nd generation) (mobile) • 88C21973-CEC1-4AE5-B9B7-6F8399C6F8D4 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

! Doctor found issues in 1 category.

Although this could be resolved by running flutter build ios before running pod install, this isn’t a great solution for some CI environments due to the reason that it significantly slows down the CI build.

It seems that this change was made here: #71495. Do you have any recommendations to be able to upgrade? Thanks.

@MaruQuarky MaruQuarky added the team-infra Owned by Infrastructure team label Dec 21, 2020
@pedromassangocode
Copy link

Hi @MaruQuarky
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this, you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

@pedromassangocode pedromassangocode removed the team-infra Owned by Infrastructure team label Dec 22, 2020
@maxlapides
Copy link

@pedromassangocode I actually think this is an issue with Flutter itself. I think it should be possible to run pod install in the ios directory of a Flutter project without first running flutter build ios. This was not previously required, and it seems strange that it is now required.

@pedromassangocode
Copy link

Hi @maxlapides
Can provide a version (flutter doctor -v) of Flutter where this was not required?

@maxlapides
Copy link

This is an issue on Flutter 1.25.0-8.1.pre. It is not an issue on Flutter 1.24.0-10.2.pre.

@pedromassangocode
Copy link

Hi @maxlapides
Just tried running the commands bellow and I was not able to reproduce the issue on Flutter 1.25.0-8.1.pre.

flutter create myapp
cd myapp/ios
pod install

You can see the logs bellow.

Logs
pedromassango@MacBook-Pro-de-MacBook Desktop % flutterb doctor -v
[✓] Flutter (Channel beta, 1.25.0-8.1.pre, on Mac OS X 10.15.7 19H2 darwin-x64,
    locale en)
    • Flutter version 1.25.0-8.1.pre at
      /Users/pedromassango/dev/SDKs/flutter_beta
    • Framework revision 8f89f6505b (13 days ago), 2020-12-15 15:07:52 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

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

[✓] Android Studio (version 4.1)
    • 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
      1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 52.1.5
    • Dart plugin version 203.5981.152

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

[✓] Connected device (3 available)
    • Redmi 5 Plus (mobile)              • 0258ff700005  • android-arm64  •
      Android 8.1.0 (API 27)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    •
      Android 10 (API 29) (emulator)
    • Chrome (web)                       • chrome        • web-javascript •
      Google Chrome 87.0.4280.88

• No issues found!
pedromassango@MacBook-Pro-de-MacBook Desktop % clear

pedromassango@MacBook-Pro-de-MacBook Desktop % flutterb create xyz
Creating project xyz...
  xyz/integration_test/driver.dart (created)
  xyz/integration_test/app_test.dart (created)
  xyz/ios/Runner.xcworkspace/contents.xcworkspacedata (created)
  xyz/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
  xyz/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
  xyz/ios/Runner/Info.plist (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  (created)
  xyz/ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
  xyz/ios/Runner/Base.lproj/Main.storyboard (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.p
  list (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xc
  settings (created)
  xyz/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
  xyz/ios/Flutter/Debug.xcconfig (created)
  xyz/ios/Flutter/Release.xcconfig (created)
  xyz/ios/Flutter/AppFrameworkInfo.plist (created)
  xyz/ios/.gitignore (created)
  xyz/test/widget_test.dart (created)
  xyz/xyz.iml (created)
  xyz/.gitignore (created)
  xyz/web/favicon.png (created)
  xyz/web/index.html (created)
  xyz/web/manifest.json (created)
  xyz/web/icons/Icon-192.png (created)
  xyz/web/icons/Icon-512.png (created)
  xyz/.metadata (created)
  xyz/android/app/src/profile/AndroidManifest.xml (created)
  xyz/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/drawable/launch_background.xml (created)
  xyz/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/values-night/styles.xml (created)
  xyz/android/app/src/main/res/values/styles.xml (created)
  xyz/android/app/src/main/res/drawable-v21/launch_background.xml (created)
  xyz/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/AndroidManifest.xml (created)
  xyz/android/app/src/debug/AndroidManifest.xml (created)
  xyz/android/gradle/wrapper/gradle-wrapper.properties (created)
  xyz/android/gradle.properties (created)
  xyz/android/.gitignore (created)
  xyz/android/settings.gradle (created)
  xyz/android/app/build.gradle (created)
  xyz/android/app/src/main/kotlin/com/example/xyz/MainActivity.kt (created)
  xyz/android/build.gradle (created)
  xyz/android/xyz_android.iml (created)
  xyz/pubspec.yaml (created)
  xyz/README.md (created)
  xyz/ios/Runner/Runner-Bridging-Header.h (created)
  xyz/ios/Runner/AppDelegate.swift (created)
  xyz/ios/Runner.xcodeproj/project.pbxproj (created)
  xyz/lib/main.dart (created)
  xyz/.idea/runConfigurations/main_dart.xml (created)
  xyz/.idea/libraries/Dart_SDK.xml (created)
  xyz/.idea/libraries/KotlinJavaRuntime.xml (created)
  xyz/.idea/modules.xml (created)
  xyz/.idea/workspace.xml (created)
Running "flutter pub get" in xyz...                                 8.3s
Wrote 80 files.

All done!
In order to run your application, type:

  $ cd xyz
  $ flutter run

Your application code is in xyz/lib/main.dart.

pedromassango@MacBook-Pro-de-MacBook Desktop % cd xyz 
pedromassango@MacBook-Pro-de-MacBook xyz % cd ios 
pedromassango@MacBook-Pro-de-MacBook ios % pod install
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing integration_test (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

[!] Automatically assigning platform `iOS` with version `9.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`.

[!] A license was specified in podspec `integration_test` but the file does not exist - /Users/pedromassango/Desktop/xyz/ios/.symlinks/plugins/integration_test/LICENSE

[!] Unable to read the license file `../LICENSE` for the spec `integration_test (0.0.1)`

[!] Unable to read the license file `../LICENSE` for the spec `integration_test (0.0.1)`

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
pedromassango@MacBook-Pro-de-MacBook ios % 

@funyaliga
Copy link

The same is the problem after I upgraded to 1.25.0-8.1.pre

.<

@dees91
Copy link

dees91 commented Dec 29, 2020

Hi @pedromassangocode
I have same issue on 1.25.0-8.1.pre:

Logs
Piotrs-MacBook-Pro:ios dees91$ flutter doctor -v
[✓] Flutter (Channel beta, 1.25.0-8.1.pre, on Mac OS X 10.14.6 18G103 darwin-x64, locale en-US)
    • Flutter version 1.25.0-8.1.pre at /Users/dees91/Programs/flutter
    • Framework revision 8f89f6505b (2 weeks ago), 2020-12-15 15:07:52 -0800
    • Engine revision 92ae191c17
    • Dart version 2.12.0 (build 2.12.0-133.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/dees91/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.3

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

[✓] Android Studio
    • Android Studio at /Applications/Android Studio 4.2 Preview.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.7+10-b765.53)

[✓] Android Studio (version 4.1)
    • 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 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

[✓] Connected device (2 available)
    • iPhone 11 Pro (mobile) • 0169A104-EA89-46C0-8C95-DCC26281BFEA • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 87.0.4280.88

• No issues found!
Piotrs-MacBook-Pro:ios dees91$ pod --version
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/highline-1.7.10.gemspec:20.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/multipart-post-2.0.0.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/rouge-2.0.7.gemspec:18.
1.9.3
Piotrs-MacBook-Pro:ios dees91$  gem list --local | grep cocoapods
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/highline-1.7.10.gemspec:20.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/multipart-post-2.0.0.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/rouge-2.0.7.gemspec:18.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/highline-1.7.10.gemspec:20.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/multipart-post-2.0.0.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/rouge-2.0.7.gemspec:18.
cocoapods (1.9.3)
cocoapods-core (1.10.0, 1.9.3)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.5.0)
cocoapods-try (1.2.0)
Piotrs-MacBook-Pro:ios dees91$ flutter create xyz
Creating project xyz...
  xyz/integration_test/driver.dart (created)
  xyz/integration_test/app_test.dart (created)
  xyz/ios/Runner.xcworkspace/contents.xcworkspacedata (created)
  xyz/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
  xyz/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
  xyz/ios/Runner/Info.plist (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
  xyz/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (created)
  xyz/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (created)
  xyz/ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
  xyz/ios/Runner/Base.lproj/Main.storyboard (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
  xyz/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
  xyz/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
  xyz/ios/Flutter/Debug.xcconfig (created)
  xyz/ios/Flutter/Release.xcconfig (created)
  xyz/ios/Flutter/AppFrameworkInfo.plist (created)
  xyz/ios/.gitignore (created)
  xyz/test/widget_test.dart (created)
  xyz/xyz.iml (created)
  xyz/.gitignore (created)
  xyz/web/favicon.png (created)
  xyz/web/index.html (created)
  xyz/web/manifest.json (created)
  xyz/web/icons/Icon-192.png (created)
  xyz/web/icons/Icon-512.png (created)
  xyz/.metadata (created)
  xyz/android/app/src/profile/AndroidManifest.xml (created)
  xyz/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/drawable/launch_background.xml (created)
  xyz/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/res/values-night/styles.xml (created)
  xyz/android/app/src/main/res/values/styles.xml (created)
  xyz/android/app/src/main/res/drawable-v21/launch_background.xml (created)
  xyz/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
  xyz/android/app/src/main/AndroidManifest.xml (created)
  xyz/android/app/src/debug/AndroidManifest.xml (created)
  xyz/android/gradle/wrapper/gradle-wrapper.properties (created)
  xyz/android/gradle.properties (created)
  xyz/android/.gitignore (created)
  xyz/android/settings.gradle (created)
  xyz/android/app/build.gradle (created)
  xyz/android/app/src/main/kotlin/com/example/xyz/MainActivity.kt (created)
  xyz/android/build.gradle (created)
  xyz/android/xyz_android.iml (created)
  xyz/pubspec.yaml (created)
  xyz/README.md (created)
  xyz/ios/Runner/Runner-Bridging-Header.h (created)
  xyz/ios/Runner/AppDelegate.swift (created)
  xyz/ios/Runner.xcodeproj/project.pbxproj (created)
  xyz/lib/main.dart (created)
  xyz/.idea/runConfigurations/main_dart.xml (created)
  xyz/.idea/libraries/Dart_SDK.xml (created)
  xyz/.idea/libraries/KotlinJavaRuntime.xml (created)
  xyz/.idea/modules.xml (created)
  xyz/.idea/workspace.xml (created)
Running "flutter pub get" in xyz...                              2,416ms
Wrote 80 files.

All done!
In order to run your application, type:

  $ cd xyz
  $ flutter run

Your application code is in xyz/lib/main.dart.
Piotrs-MacBook-Pro:ios dees91$ cd xyz/ios
Piotrs-MacBook-Pro:ios dees91$ pod install
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/highline-1.7.10.gemspec:20.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/multipart-post-2.0.0.gemspec:17.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from /Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/rouge-2.0.7.gemspec:18.
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing integration_test (0.0.1)
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each_child' for #<Dir:0x007fa81a45fa00>
Did you mean?  each_slice

/Users/dees91/Programs/flutter/packages/flutter_tools/bin/podhelper.rb:50:in `block in flutter_additional_ios_build_settings'
/Users/dees91/Programs/flutter/packages/flutter_tools/bin/podhelper.rb:47:in `each'
/Users/dees91/Programs/flutter/packages/flutter_tools/bin/podhelper.rb:47:in `flutter_additional_ios_build_settings'
/Users/dees91/Desktop/dd/ios/xyz/ios/Podfile:39:in `block (3 levels) in from_ruby'
/Users/dees91/Desktop/dd/ios/xyz/ios/Podfile:38:in `each'
/Users/dees91/Desktop/dd/ios/xyz/ios/Podfile:38:in `block (2 levels) in from_ruby'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:857:in `run_podfile_post_install_hook'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:845:in `block in run_podfile_post_install_hooks'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:145:in `message'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:844:in `run_podfile_post_install_hooks'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:325:in `block (2 levels) in create_and_save_projects'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:324:in `block in create_and_save_projects'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:303:in `create_and_save_projects'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:295:in `generate_pods_project'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:174:in `integrate'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:162:in `install!'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Users/dees91/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/Users/dees91/.rbenv/versions/2.4.1/bin/pod:23:in `load'
/Users/dees91/.rbenv/versions/2.4.1/bin/pod:23:in `<main>'

[!] Automatically assigning platform `iOS` with version `9.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`.

[!] A license was specified in podspec `integration_test` but the file does not exist - /Users/dees91/Desktop/dd/ios/xyz/ios/.symlinks/plugins/integration_test/LICENSE

[!] Unable to read the license file `../LICENSE` for the spec `integration_test (0.0.1)`

[!] Unable to read the license file `../LICENSE` for the spec `integration_test (0.0.1)`

@pedromassangocode
Copy link

Could anyone facing this issue please provide the steps to reproduce the issue and the output of flutter doctor -v?
Thank you

@ReniDelonzek
Copy link

Hello, I have the same problem.
The problem is caused because the function Dir.new (configuration_engine_dir).each_child that is inside the file podhelper.rb was introduced only in ruby ​​2.5, while the version of it on my machine for example is still in 2.0

There should be some validation on the side of the flutter to avoid problems in this regard

This bug was introduced in this pull


[✓] Flutter (Channel dev, 1.26.0-1.0.pre, on Mac OS X 10.15.7 19H114 darwin-x64, locale pt-BR)
    • Flutter version 1.26.0-1.0.pre at /Users/reni/Downloads/Programas/flutter
    • Framework revision 63062a6443 (2 weeks ago), 2020-12-13 23:19:13 +0800
    • Engine revision 4797b06652
    • Dart version 2.12.0 (build 2.12.0-141.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/reni/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • ANDROID_HOME = /Users/reni/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.0

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

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (3 available)
    • iPhone de Reni (mobile) • 9d9df96b4054c89b98dc5b7257cbefa2a359850c • ios            • iOS 12.4.8
    • macOS (desktop)         • macos                                    • darwin-x64     • Mac OS X 10.15.7 19H114 darwin-x64
    • Chrome (web)            • chrome                                   • web-javascript • Google Chrome 87.0.4280.88

• No issues found!```

@dees91
Copy link

dees91 commented Dec 29, 2020

@ReniDelonzek You are right! After upgrading ruby to 2.7.1 problem's gone.

rbenv install -l
rbenv install 2.7.1
rbenv global 2.7.1

Thanks, your comment was very helpful 👍

@pedromassangocode
Copy link

@ReniDelonzek
As you can see in the OP logs, there is a message that says:

/Users/{User}/Developer/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework must exist. If you're running pod install manually, make sure flutter build ios is executed first

So I think there is nothing the Flutter team can do about it!

@ReniDelonzek
Copy link

@pedromassangocode

I cannot guarantee that the original problem is caused by the ruby ​​version either. I got to this problem through the pull request that interfered with the function I mentioned.

If necessary, the new issue can be opened for this, since by the comments I was not the only one to face this. There must be at least official documentation indicating that the ruby ​​version must be updated (since the minimum version that the pod requires is 2.0.0) and no clear error message is indicated

@pedromassangocode
Copy link

pedromassangocode commented Dec 31, 2020

If necessary, the new issue can be opened for this, since by the comments I was not the only one to face this. There must be at least official documentation indicating that the ruby ​​version must be updated (since the minimum version that the pod requires is 2.0.0) and no clear error message is indicated

That makes sense, feel free to open a new issue for that and making sure the issue template is well filled.

@maxlapides
Copy link

maxlapides commented Jan 22, 2021

@pedromassangocode I'm sorry for the delayed response. I have steps to reproduce the original issue (which I believe is unrelated to the installed Ruby version):

  1. flutter create mypodtestapp
  2. Add firebase_core: ^0.7.0 to pubspec.yaml
  3. flutter pub get
  4. Add platform :ios, '10.0' to the top of ios/Podfile
  5. cd ios && pod install && cd .. (generates Podfile.lock)
  6. rm -rf ~/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework (simulates the original scenario where a CI VM just installed Flutter for the first time and cloned the project repo for the first time)
  7. cd ios && pod install

@pedromassangocode
Copy link

  • Add firebase_core: ^0.7.0 to pubspec.yaml

Please make sure your sample code does not use any third-party package/plugin.

I'm sorry for the delayed response. I have steps to reproduce the original issue (which I believe is unrelated to the installed Ruby version)

See #72737 (comment)

@maxlapides
Copy link

@pedromassangocode It doesn't matter what the third-party package is, the important thing is that there is at least one cocoapod added to your project.

This didn't used to be an issue with Flutter, but since this PR it is now an issue. Therefore, I believe there is something that the Flutter team can do. I think if this issue isn't addressed before it lands on stable, there will be more issues from others who have their CI environment set up similarly.

@pedromassangocode
Copy link

Hi @maxlapides
Just in case you have not read my comments above: what I'm trying to say is that this is not an issue, but a new behavior introduced by #71495.

Screen Shot 2021-01-26 at 11 18 25

@maxlapides
Copy link

I understand that this is new behavior. I think that there was an oversight when developing this new behavior. The oversight is that it is now impossible to run pod install on a fresh environment without first running flutter build, which we do not want to run for pull request builds that simply need to run the linter and static analyzer. I think the Flutter team should put some more thought into this new behavior and consider other mechanisms to get these generated files in place.

@jmagman
Copy link
Member

jmagman commented Feb 3, 2021

The problem is caused because the function Dir.new (configuration_engine_dir).each_child that is inside the file podhelper.rb was introduced only in ruby ​​2.5, while the version of it on my machine for example is still in 2.0

@ReniDelonzek That's a different problem than the one reported, I filed #75347 to track this. Thanks!

@maxlapides The behavior to move the Flutter.framework linking logic was actually introduced in https://github.com/flutter/flutter/pull/70224/files#diff-c8af58e191012b46ec91e8b663a53c9ab82f6ecfed9d8408da7013ed01b1469aR35-R36. You can read the description in that PR for all the bugs and weirdness fixed by that change. In your CI script you can run flutter precache --ios. I'll update the error message to suggest that much cheaper command. Reopening.

@jmagman jmagman reopened this Feb 3, 2021
@jmagman jmagman self-assigned this Feb 3, 2021
@jmagman jmagman changed the title Error on new Flutter beta (1.25.0-8.1.pre) when running pod install prior to running flutter build ios pod install suggests running expensive flutter build ios when engine artifacts are missing Feb 3, 2021
@jmagman jmagman added P2 Important issues not at the top of the work list platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Feb 3, 2021
@jmagman jmagman added this to Awaiting triage in Tools - command line usability review via automation Feb 3, 2021
@maxlapides
Copy link

@jmagman Thanks so much for the flutter precache --ios tip! That does the trick. I agree updating the error message is a good resolution :)

@github-actions
Copy link

github-actions bot commented Aug 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 Important issues not at the top of the work list platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Development

Successfully merging a pull request may close this issue.

7 participants