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

Encountered an unknown error (Must be in the root of the repo #5702

Closed
1 task done
evgenyneu opened this issue Aug 2, 2016 · 10 comments
Closed
1 task done

Encountered an unknown error (Must be in the root of the repo #5702

evgenyneu opened this issue Aug 2, 2016 · 10 comments

Comments

@evgenyneu
Copy link

evgenyneu commented Aug 2, 2016

Report

What did you do?

From Xcode 8 beta 4:

git clone https://github.com/evgenyneu/moa.git
cd moa
pod spec lint

What did you expect to happen?

Lint the spec correctly.

What happened instead?

Shows the error:

moa (7.0.0)
- ERROR | [iOS] unknown: Encountered an unknown error (Must be in the root of the repo (/Users/evgenii/.cocoapods/repos/master), instead in /Users/evgenii/Downloads/moa.) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

In addition

It replaces git remote with the following:

git remote -v
origin  https://github.com/CocoaPods/Specs.git (fetch)
origin  https://github.com/CocoaPods/Specs.git (push)

CocoaPods Environment

[in /Users/evgenii]

Stack

   CocoaPods : 1.1.0.beta.1
        Ruby : ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
    RubyGems : 2.4.5
        Host : Mac OS X 10.11.6 (15G31)
       Xcode : 8.0 (8S188o)
         Git : git version 2.8.4 (Apple Git-73)
Ruby lib dir : /Users/evgenii/.rbenv/versions/2.2.2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 01faaf50c28d007e460c8fe4bdb9b4be98ce5163

Installation Source

Executable Path: /Users/evgenii/.rbenv/versions/2.2.2/bin/pod

Plugins

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

Project that demonstrates the issue

https://github.com/evgenyneu/moa

@ianterrell
Copy link

I experienced this issue also. I "resolved it" by using Xcode 7: sudo xcode-select -s /Applications/Xcode.app

@segiddins
Copy link
Member

This is a duplicate of #5661, but thanks for the issue!

@rchatham
Copy link

rchatham commented Sep 16, 2016

I'm currently receiving this same error using the latest release of 1.0.1, Swift 3.0, and XCode 8!

Solved by updating ruby and then reinstalling the newest pre-release of cocoapods!

@guilhermeJay
Copy link

@rchatham using the @ianterrell answer resolved it for me. Did you try it?

@senchi
Copy link

senchi commented Sep 16, 2016

Command

/usr/local/bin/pod install

Report

  • What did you do?
  1. Clone my project repository
  2. Change working directory to project repository
  3. execute pod install
  • What did you expect to happen?
  1. pod to install my pods
  • What happened instead?

reported error that I'm in the wrong repository directory:

Stack

   CocoaPods : 1.0.1
        Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.6 (15G1004)
       Xcode : 8.0 (8A218a)
         Git : git version 2.8.4 (Apple Git-73)
Ruby lib dir : /usr/local/Cellar/ruby/2.3.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 2758e6fd5ec8ccdb80933d90f8de15c61c6a2cb6

Plugins

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

Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!

target 'cityFlitzer' do
pod 'ECSlidingViewController', '~> 2.0.3'
pod 'GoogleMaps'
pod 'AFNetworking'
pod 'FMDB'
pod 'Fabric'
pod 'Crashlytics'
pod 'SVProgressHUD'
pod "OpenInGoogleMaps"
pod 'MFSideMenu'
pod "Branch"
pod 'MPCoachMarks'
pod 'MZTimerLabel'
end

target 'cityFlitzerTests' do

end

target 'cityFlitzerUITests' do

end

Error

Pod::StandardError - Must be in the root of the repo (/Users/senchi/.cocoapods/repos/master), instead in /Users/senchi/repos/bookndrive-ios.
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/source.rb:403:in `ensure_in_repo!'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/source.rb:431:in `git_commit_hash'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:31:in `block in requires_update?'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:31:in `chdir'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:31:in `requires_update?'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.1/lib/cocoapods-core/master_source.rb:14:in `update'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:88:in `block (2 levels) in update'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:87:in `block in update'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:86:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:86:in `update'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/setup.rb:62:in `update_master_repo'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/setup.rb:25:in `block in run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/setup.rb:21:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:25:in `find_or_create_source_with_url'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:654:in `block in sources'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `map'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `sources'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:144:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/install.rb:37:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

In addition:

I've tried resolving the issue by executing sudo xcode-select --install, that should install missing tools if any, but that didn't work either!

I've tried also sudo xcode-select -s /Applications/Xcode.app but that didn't really do anything either.

@orta
Copy link
Member

orta commented Sep 16, 2016

@senchi - please use the 1.1.0 release candidate, 1.0.1 does not support Xcode 8

@senchi
Copy link

senchi commented Sep 16, 2016

@orta thanks for the prompt response!

Unfortunately, that didn't do the trick completely.. pod install now works with the RC, however it seems to create Aliases in the root of my repository and when I try to Build in Xcode it says that the dependencies are missing (e.g. 'AFNetworking.h' file not found)..

Normally, all my Pods are located in the Pods/ directory and then each Pod again has its own directory.. but now my git repo looks like this:

senchimac:bookndrive-ios senchi$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Podfile.lock
    modified:   cityFlitzer.xcodeproj/project.pbxproj

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    AFAutoPurgingImageCache.h
    AFHTTPSessionManager.h
    AFImageDownloader.h
    AFNetworkActivityIndicatorManager.h
    AFNetworkReachabilityManager.h
    AFNetworking.h
    AFSecurityPolicy.h
    AFURLRequestSerialization.h
    AFURLResponseSerialization.h
    AFURLSessionManager.h
    ANSCompatibility.h
    Answers.h
    BNCConfig.h
    BNCContentDiscoveryManager.h
    BNCDeviceInfo.h
    BNCEncodingUtils.h
    BNCError.h
    BNCLinkCache.h
    BNCLinkData.h
    BNCPreferenceHelper.h
    BNCServerInterface.h
    BNCServerRequest.h
    BNCServerRequestQueue.h
    BNCServerResponse.h
    BNCStrongMatchHelper.h
    BNCSystemObserver.h
    Branch.h
    BranchActivityItemProvider.h
    BranchApplyPromoCodeRequest.h
    BranchCSSearchableItemAttributeSet.h
    BranchCloseRequest.h
    BranchConstants.h
    BranchCreditHistoryRequest.h
    BranchDeepLinkingController.h
    BranchGetPromoCodeRequest.h
    BranchInstallRequest.h
    BranchLinkProperties.h
    BranchLoadActionsRequest.h
    BranchLoadRewardsRequest.h
    BranchLogoutRequest.h
    BranchOpenRequest.h
    BranchRedeemRewardsRequest.h
    BranchRegisterViewRequest.h
    BranchSDK.h
    BranchSetIdentityRequest.h
    BranchShortUrlRequest.h
    BranchShortUrlSyncRequest.h
    BranchSpotlightUrlRequest.h
    BranchUniversalObject.h
    BranchUserCompletedActionRequest.h
    BranchValidatePromoCodeRequest.h
    BranchView.h
    BranchViewHandler.h
    CLSAttributes.h
    CLSLogging.h
    CLSReport.h
    CLSStackFrame.h
    Crashlytics.h
    ECPercentDrivenInteractiveTransition.h
    ECSlidingAnimationController.h
    ECSlidingConstants.h
    ECSlidingInteractiveTransition.h
    ECSlidingSegue.h
    ECSlidingViewController.h
    FABAttributes.h
    FABKitProtocol.h
    FMDB.h
    FMDatabase.h
    FMDatabaseAdditions.h
    FMDatabasePool.h
    FMDatabaseQueue.h
    FMResultSet.h
    Fabric+FABKits.h
    Fabric.h
    GMSAddress.h
    GMSAddressComponent.h
    GMSAutocompleteFetcher.h
    GMSAutocompleteFilter.h
    GMSAutocompleteMatchFragment.h
    GMSAutocompletePrediction.h
    GMSAutocompleteResultsViewController.h
    GMSAutocompleteTableDataSource.h
    GMSAutocompleteViewController.h
    GMSCALayer.h
    GMSCameraPosition.h
    GMSCameraUpdate.h
    GMSCircle.h
    GMSCompatabilityMacros.h
    GMSCoordinateBounds.h
    GMSDeprecationMacros.h
    GMSGeocoder.h
    GMSGeometryUtils.h
    GMSGroundOverlay.h
    GMSIndoorBuilding.h
    GMSIndoorDisplay.h
    GMSIndoorLevel.h
    GMSMapLayer.h
    GMSMapView+Animation.h
    GMSMapView.h
    GMSMarker.h
    GMSMarkerLayer.h
    GMSMutablePath.h
    GMSOrientation.h
    GMSOverlay.h
    GMSPanorama.h
    GMSPanoramaCamera.h
    GMSPanoramaCameraUpdate.h
    GMSPanoramaLayer.h
    GMSPanoramaLink.h
    GMSPanoramaService.h
    GMSPanoramaView.h
    GMSPath.h
    GMSPlace.h
    GMSPlaceLikelihood.h
    GMSPlaceLikelihoodList.h
    GMSPlacePhotoMetadata.h
    GMSPlacePhotoMetadataList.h
    GMSPlacePicker.h
    GMSPlacePickerConfig.h
    GMSPlaceTypes.h
    GMSPlacesClient.h
    GMSPlacesErrors.h
    GMSPolygon.h
    GMSPolyline.h
    GMSProjection.h
    GMSServices.h
    GMSSyncTileLayer.h
    GMSTileLayer.h
    GMSUISettings.h
    GMSURLTileLayer.h
    GMSUserAddedPlace.h
    GoogleMaps.h
    MFSideMenu.h
    MFSideMenuContainerViewController.h
    MFSideMenuShadow.h
    MPCoachMarks.h
    MZTimerLabel.h
    OpenInGoogleMapsController.h
    PromoViewHandler.h
    SVIndefiniteAnimatedView.h
    SVProgressAnimatedView.h
    SVProgressHUD.h
    SVRadialGradientLayer.h
    UIActivityIndicatorView+AFNetworking.h
    UIButton+AFNetworking.h
    UIImage+AFNetworking.h
    UIImageView+AFNetworking.h
    UIKit+AFNetworking.h
    UIProgressView+AFNetworking.h
    UIRefreshControl+AFNetworking.h
    UIViewController+ECSlidingViewController.h
    UIViewController+MFSideMenuAdditions.h
    UIWebView+AFNetworking.h

no changes added to commit (use "git add" and/or "git commit -a")

@senchi
Copy link

senchi commented Sep 17, 2016

@orta - all good now!
I've had to delete the Podfile.lock so it gets recreated and now all good.. I hope you'll get this RC out soon :)

@tomredman
Copy link

sudo gem install cocoapods -v 1.1.0.rc.2 for any ceiling cats

@zafersss
Copy link

@tomredman Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants