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 setup` does not work for Cocoapods 1.8.0 #41253

Closed
wliumelb opened this issue Sep 25, 2019 · 20 comments · Fixed by #41491

Comments

@wliumelb
Copy link

commented Sep 25, 2019

I was doing a fresh Flutter installation on a new Mac.

Following the instructions of Flutter doctor to install cocoapods with sudo gem install cocoapods, Cocoapods 1.8.0 was installed.
Then after running pod setup, nothing happened, and cocoapods was still not initialised.

The solution was to remove cocoapods with sudo gem uninstall cocoapods and then install Cocoapods 1.7.5 with sudo gem install cocoapods -v 1.7.5, then pod setup.

I know this is probably a Cocoapods issue, but the flutter doctor instructions need to change so new users can get Flutter to work without any trouble.

@stuartmorgan

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

It looks like our initialization check is looking for the local repo, but 1.8.0 uses the CDN by default which doesn't require it, so it's likely that pod setup is no longer pulling it down.

We'll need to figure out how we want to handle this (assuming that is indeed what's going on). We should likely switch our Podspec template to use the CDN, but we'll need to see what is needed to handle projects with an existing Podspec (e.g., does Cocoapods now fetch it on demand when it encounters a Podspec using it?) and update the setup check accordingly, or we'll need to migrate existing Podspecs.

/cc @jmagman

@blackholegalaxy

This comment has been minimized.

Copy link

commented Sep 27, 2019

Same here with 1.8.1. pod setup does nothing. Rollbacking to 1.7.5 was a successful workaround.

@davidcavazos

This comment has been minimized.

Copy link

commented Sep 27, 2019

I'm also getting this issue with 1.8.1, I can also confirm installing cocoapods 1.7.5 fixes it. Make sure to uninstall previous versions or it won't work! :)

  1. sudo gem uninstall cocoapods

    If using brew, run this too: brew uninstall cocoapods

  2. sudo gem install cocoapods -v 1.7.5
  3. pod setup
  4. flutter doctor -v

Maybe there should be a (temporary) note in the docs in the iOS setup while this is fixed.

Edit: version 1.8.1 is now working as expected so no need for this workaround, see #41491

@jmagman

This comment has been minimized.

Copy link
Member

commented Sep 27, 2019

We'll need to figure out how we want to handle this (assuming that is indeed what's going on). We should likely switch our Podspec template to use the CDN, but we'll need to see what is needed to handle projects with an existing Podspec (e.g., does Cocoapods now fetch it on demand when it encounters a Podspec using it?) and update the setup check accordingly, or we'll need to migrate existing Podspecs.

It uses the CDN by default as of 1.8.0. What would need to be migrated in the Podfile (assuming you meant Podfile and not podspec)?

@jmagman

This comment has been minimized.

Copy link
Member

commented Sep 27, 2019

Maybe there should be a (temporary) note in the docs in the iOS setup while this is fixed.

flutter/website#3041

@stuartmorgan

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2019

What would need to be migrated in the Podfile (assuming you meant Podfile and not podspec)?

Turns out nothing; I was thinking of the release notes mentioning changing the source:

- source 'https://github.com/CocoaPods/Specs.git'
+ source 'https://cdn.cocoapods.org/'

and assumed we had that in our Podfile. But I was just remembering seeing the commented-out CDN source line.

So does that mean all we need to do here is make 1.8 the minimum and remove the check that the local repo is checked out (and the corresponding instructions)?

@jmagman

This comment has been minimized.

Copy link
Member

commented Sep 27, 2019

So does that mean all we need to do here is make 1.8 the minimum and remove the check that the local repo is checked out (and the corresponding instructions)?

Check out #41491. I skipped the local check then the version is >= 1.8. I removed the pod setup instructions from the installer comment, but they will pod setup instructions if they run again with an installed, uninitialized version < 1.8.

@jeyj31

This comment has been minimized.

Copy link

commented Sep 28, 2019

Hi everyone,

I'm currently trying to install flutter on my macOS but I can't install the CocoaPods even with your advices and all things I could find on internet

someone could please help me ?

attached, the screenshot of my terminal

Capture d’écran 2019-09-28 à 15 19 07

@blackholegalaxy

This comment has been minimized.

Copy link

commented Sep 28, 2019

Hi everyone,

I'm currently trying to install flutter on my macOS but I can't install the CocoaPods even with your advices and all things I could find on internet

As stated in #41253 (comment) you have to uninstall any previous version of cocoapods and install specific 1.7.5 version. You also ensure you didn't have any version installed through homebrew which could interfer with the gem one.

@jeyj31

This comment has been minimized.

Copy link

commented Sep 29, 2019

Ok and for uninstall home-brew there is the same command ?

@blackholegalaxy

This comment has been minimized.

Copy link

commented Sep 29, 2019

Ok and for uninstall home-brew there is the same command ?

brew uninstall cocoapods

@paulgillingwater

This comment has been minimized.

Copy link

commented Sep 30, 2019

Hi everyone,

I'm currently trying to install flutter on my macOS but I can't install the CocoaPods even with your advices and all things I could find on internet

someone could please help me ?

attached, the screenshot of my terminal

Capture d’écran 2019-09-28 à 15 19 07

I had exactly the same problem and solved it as follows: (assuming you installed two versions of Cocoapod):

sudo gem uninstall cocoapods

Select gem to uninstall:

  1. cocoapods-1.7.5
  2. cocoapods-1.8.1
  3. All versions

2
Successfully uninstalled cocoapods-1.8.1
Smackbook:development paul$ pod setup
Setting up CocoaPods master repo
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git --progress -- master
Cloning into 'master'...
remote: Enumerating objects: 299, done.
remote: Counting objects: 100% (299/299), done.
remote: Compressing objects: 100% (285/285), done.

@coldix

This comment has been minimized.

Copy link

commented Oct 5, 2019

Thanks Paul, I had the same problem, this fixed it :)
cocoapods-fix

@davidair

This comment has been minimized.

Copy link

commented Oct 7, 2019

Folks, please avoid downgrading CocoaPods to work around a "flutter doctor" issue - CocoaPods 1.8+ usage of CDN is a fantastic feature and an outstanding performance optimization. Unless something is broken, try using the latest version (also, #41491 has the fix for Flutter).

@jmagman

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

Folks, please avoid downgrading CocoaPods to work around a "flutter doctor" issue - CocoaPods 1.8+ usage of CDN is a fantastic feature and an outstanding performance optimization. Unless something is broken, try using the latest version (also, #41491 has the fix for Flutter).

It's not just a flutter doctor issue, it's a flutter build/run issue. When the local repo isn't present pod install is skipped. 1eb1e22 is in v1.10.7, so once that hits stable the -v 1.7.5 instruction and note can be removed.

@blackholegalaxy

This comment has been minimized.

Copy link

commented Oct 7, 2019

Since the MR to fix that on 1.8+ detection, maybe it could be useful to include that as hotfix in current/next stable.

DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Oct 8, 2019
@superHS

This comment has been minimized.

Copy link

commented Oct 10, 2019

thanks,,,i fixed it

@jmagman

This comment has been minimized.

Copy link
Member

commented Oct 11, 2019

Since the MR to fix that on 1.8+ detection, maybe it could be useful to include that as hotfix in current/next stable.

We're evaluating hotfixing this to stable.

@kwight

This comment has been minimized.

Copy link

commented Oct 13, 2019

If people are feeling confident, another option is to run the dev channel for now, which has received the fix in #41491 mentioned by @davidair .

flutter channel dev
flutter upgrade
@samchang8826

This comment has been minimized.

Copy link

commented Oct 13, 2019

If people are feeling confident, another option is to run the dev channel for now, which has received the fix in #41491 mentioned by @davidair .

flutter channel dev
flutter upgrade

After I switch to dev branch, I got a lots of issues
so my suggestion is create fake folder under ~/.cocoapods/respos/master , it's fast and easy solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.