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

Long pod install step should indicate progress #8983

Closed
eseidelGoogle opened this issue Mar 23, 2017 · 13 comments
Closed

Long pod install step should indicate progress #8983

eseidelGoogle opened this issue Mar 23, 2017 · 13 comments
Assignees
Labels
c: regression It was better in the past than it is now platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@eseidelGoogle
Copy link
Contributor

flutter run silently hangs on the command line.

If I open ios/Runner.xcworkspace and build there, I get:
clang: error: no such file or directory: '/src/bug5823/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m'
clang: error: no input files

@eseidelGoogle eseidelGoogle added c: regression It was better in the past than it is now platform-ios iOS applications specifically labels Mar 23, 2017
@eseidelGoogle
Copy link
Contributor Author


[✓] Flutter (on Mac OS X 10.12.3 16D32, channel master)
    • Flutter at /src/flutter
    • Framework revision 179b47d4fc (5 months ago), 2016-10-19 16:17:55
    • Engine revision 61fc1d6e31
    • Tools Dart version 1.23.0-dev.9.0

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at /Users/eseidel/Library/Android/sdk
    • Platform android-25, build-tools 25.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_112-release-b05)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.2.1, Build version 8C1002
    • ios-deploy 1.9.1
    • CocoaPods version 1.2.0

[✓] Android Studio (version 2.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Gradle version 2.14.1
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b05)

[✓] IntelliJ IDEA Community Edition (version 2016.3.4)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.11.1

[✓] Connected devices
    • Eric's iPhone • 245efaebda74df40169418839fff2a8368bcaae5 • ios • iOS 10.2.1 (14D27)
    • iPhone 6s     • FF0E5127-3490-4297-9313-C4776D7950D4     • ios • iOS 10.0 (simulator)

@eseidelGoogle
Copy link
Contributor Author

My actual revision is 2599967. I have a local commit for my personal cert.

@cbracken
Copy link
Member

cbracken commented Mar 23, 2017

I bet this is the CocoaPods pod install step. Can you run flutter run --verbose to verify?

The first time you run pod install, CocoaPods downloads their entire ~400MB repo of package specs from github. If the first pod install you ever run happens to be via a flutter command, you may end up with a 5 minute bootstrap.

At a minimum we should output a message informing the user. I'll file a bug.

@sethladd
Copy link
Contributor

Should we have a benchmark that measures "time to create a new app", so we don't accidentally regress it?

@eseidelGoogle
Copy link
Contributor Author

eseidelGoogle commented Mar 23, 2017

Yup. It's pod install. Can we detect this case and log or something?

[ +532 ms] Exit code 0 from: pod --version
[        ] 1.2.0
[        ] [ios/] pod install

@cbracken
Copy link
Member

Steps to Reproduce

On a macOS machine:

  1. Delete your ~/.cocoapods repo: rm -rf ~/.cocoapods.
  2. flutter create foobar
  3. cd foobar
  4. Open iOS simulator.
  5. flutter run

You'll get a 5-10 minute hang with no progress message as CocoaPods pulls down close to 400MB of specs, but no progress message indicating what's happening.

For people using CocoaPods, this one-time bootstrapping step is probably unavoidable, but we should output a message indicating that this is going on. As @eseidelGoogle notes, maybe just stream CocoaPods output?

@cbracken
Copy link
Member

/cc @jakobr-google

@cbracken cbracken added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 23, 2017
@cbracken cbracken changed the title Clean flutter create fails to build Long pod install step should indicate progress Mar 23, 2017
@eseidelGoogle
Copy link
Contributor Author

Well, it takes about 20m, but it does work. :)

I think we should consider making this an explicit install step instead of having it implicit in flutter run. It's a really poor user experience to have you first run on Mac take 20mins. :(

@jakobr-google
Copy link
Contributor

#8999 has part of this. We should update the 'setup' webpage as well.

jakobr-google added a commit to jakobr-google/website that referenced this issue Mar 27, 2017
CocoaPods needs to download the master spec repo, which can take quite a
while. Adding a `pod setup` step to the installation instructions, so
users take the hit during install, instead of on the first build.

Fixes flutter/flutter#8983.
jakobr-google added a commit to jakobr-google/website that referenced this issue Mar 27, 2017
CocoaPods needs to download the master spec repo, which can take quite a
while. Adding a `pod setup` step to the installation instructions, so
users take the hit during install, instead of on the first build.

Moved CocoaPods installation steps to a separate section, since they are
needed for Simulator builds as well.

Fixes flutter/flutter#8983.
jakobr-google added a commit to flutter/website that referenced this issue Mar 27, 2017
CocoaPods needs to download the master spec repo, which can take quite a
while. Adding a `pod setup` step to the installation instructions, so
users take the hit during install, instead of on the first build.

Moved CocoaPods installation steps to a separate section, since they are
needed for Simulator builds as well.

Fixes flutter/flutter#8983.
@jakobr-google jakobr-google self-assigned this Mar 27, 2017
@xster
Copy link
Member

xster commented Apr 28, 2017

Read some background which was interesting.
CocoaPods/CocoaPods#4989

Seems like it was an explicit choice to clone the entire git tree instead of a shallow working directory clone to avoid continuous costs on each pod update. But I suspect it's going to cost more and more as a first step as time goes on. Unfortunately I don't see any open issues in https://github.com/cocoapods/cocoapods/issues to rework their CDN mechanism in general...

@braysonjohn148
Copy link

After an hour i get this:
0 0 150k 0 0:16:28 0:16:28 --:--:-- 156k 100 144M 100 144M
[ +879 ms] Error running pod install [ +96 ms] Error launching application on iPhone 8 Plus. [ +13 ms] "flutter run" took 4,481,655ms

You are in 'detached HEAD' state. You can look around, make experimental
                             changes and commit them, and you can discard any commits you make in this
                             state without impacting any branches by performing another checkout

@MASKADEV
Copy link

really too much

Automatically signing iOS for device deployment using specified development team in Xcode project: **********
Running pod install... 1874.0s
Running Xcode build... ⡿

@github-actions
Copy link

github-actions bot commented Aug 5, 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 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: regression It was better in the past than it is now platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

7 participants