Skip to content

Issue with CocoaPods #1782

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

Closed
ickata opened this issue May 27, 2016 · 16 comments
Closed

Issue with CocoaPods #1782

ickata opened this issue May 27, 2016 · 16 comments
Assignees
Labels

Comments

@ickata
Copy link

ickata commented May 27, 2016

Hi,

tns doctor returns that there is an issue with CocoaPods:

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=Operation+not+permitted+-+curl&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!


[!] 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 `__PROJECT_NAME__` to `Pods/Target Support Files/Pods-__PROJECT_NAME__/Pods-__PROJECT_NAME__.debug.xcconfig` or include the `Pods/Target Support Files/Pods-__PROJECT_NAME__/Pods-__PROJECT_NAME__.debug.xcconfig` in your build configuration (`__PROJECT_NAME__/build-debug.xcconfig`).

[!] 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 `__PROJECT_NAME__` to `Pods/Target Support Files/Pods-__PROJECT_NAME__/Pods-__PROJECT_NAME__.release.xcconfig` or include the `Pods/Target Support Files/Pods-__PROJECT_NAME__/Pods-__PROJECT_NAME__.release.xcconfig` in your build configuration (`__PROJECT_NAME__/build-release.xcconfig`).

WARNING: There was a problem with CocoaPods
Verify that CocoaPods are configured properly.
There seem to be issues with your configuration.

My environment:

  • MacOSX El Capitan 10.11.5 (15F34)
  • NodeJS 5.14
  • Xcode 6.3.1 Build version 6D1002

Let me know if additional details are needed.

@enchev
Copy link
Contributor

enchev commented Jun 6, 2016

Hey @ickata,

Have you tried to call gem which cocoapods? What's the version?

@enchev enchev self-assigned this Jun 6, 2016
@ickata
Copy link
Author

ickata commented Jun 6, 2016

Hi @enchev ,

It looks like the version is 1.0.0:

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods.rb

@enchev
Copy link
Contributor

enchev commented Jun 6, 2016

Are you using our latest version 2.0.1?

@ickata
Copy link
Author

ickata commented Jun 6, 2016

Updated cocoapods to 1.0.1, problem persists.

tns doctor now returns that tns-ios needs upgrade (current version: 2.0.1, my version 2.0.0) however I'm not sure how to upgrade it. I'm using tns --version 2.0.1.

@enchev
Copy link
Contributor

enchev commented Jun 6, 2016

You can use platform update ios. Hey @rosen-vladimirov do you know what could be the issue here?

@ickata
Copy link
Author

ickata commented Jun 6, 2016

Here's what happens when I try to update ios platform:

[ickata ~/Desktop/Tables/tns/sample-Groceries] $ tns platform update ios
Version strings are not in the same format
# platform update
┌──────────────────────────┬─────────────────────────────────────────┐
│ Usage                    │ Synopsis                                │
│ Android latest runtime   │ $ tns platform update android           │
│ Android selected runtime │ $ tns platform update android@<Version> │
│ iOS latest runtime       │ $ tns platform update ios               │
│ iOS selected runtime     │ $ tns platform update ios@<Version>     │
└──────────────────────────┴─────────────────────────────────────────┘

Updates the NativeScript runtime for the specified platform. You must specify the target platform that you want to update.

### Attributes

    * <Platform> is the target mobile platform whose runtime you want to update. You can set the following target platforms.
       * android - Updates the Android runtime.
       * ios - Updates the iOS runtime.
    * <Version> is any available version of the respective platform runtime published in npm.

BTW same happens if I run tns platform add ios.

@rosen-vladimirov
Copy link
Contributor

hm, XCode 6.3.1 is not supported, we always require latest XCode version. It looks like there's a problem with some version comparison on our side.
@ickata , can you execute tns platform add ios --log trace and send us the output. However I strongly recommend you to use latest XCode version :)

@ickata
Copy link
Author

ickata commented Jun 6, 2016

OK, I updated XCode to 7.3.1. For some reason there was no update alert in App Store, so I had to manually update it.

I am experiencing the same problem, though. Here's the output from the log trace:

execFile: /usr/local/opt/android-sdk/platform-tools/adb "help"
spawn: /usr/local/opt/android-sdk/tools/android "--help"
Result when throw error is false:
{ stdout: '\n       Usage:\n       android [global options] action [action options]\n       Global options:\n  -s --silent     : Silent mode, shows errors only.\n  -v --verbose    : Verbose mode, shows errors, warnings and all messages.\n     --clear-cache: Clear the SDK Manager repository manifest cache.\n  -h --help       : Help on a specific command.\n\n                                                                    Valid\n                                                                    actions\n                                                                    are\n                                                                    composed\n                                                                    of a verb\n                                                                    and an\n                                                                    optional\n                                                                    direct\n                                                                    object:\n-    sdk              : Displays the SDK Manager window.\n-    avd              : Displays the AVD Manager window.\n-   list              : Lists existing targets or virtual devices.\n-   list avd          : Lists existing Android Virtual Devices.\n-   list target       : Lists existing targets.\n-   list device       : Lists existing devices.\n-   list sdk          : Lists remote SDK repository.\n- create avd          : Creates a new Android Virtual Device.\n-   move avd          : Moves or renames an Android Virtual Device.\n- delete avd          : Deletes an Android Virtual Device.\n- update avd          : Updates an Android Virtual Device to match the folders\n                        of a new SDK.\n- create project      : Creates a new Android project.\n- update project      : Updates an Android project (must already have an\n                        AndroidManifest.xml).\n- create test-project : Creates a new Android project for a test package.\n- update test-project : Updates the Android project for a test package (must\n                        already have an AndroidManifest.xml).\n- create lib-project  : Creates a new Android library project.\n- update lib-project  : Updates an Android library project (must already have\n                        an AndroidManifest.xml).\n- create uitest-project: Creates a new UI test project.\n- update adb          : Updates adb to support the USB devices declared in the\n                        SDK add-ons.\n- update sdk          : Updates the SDK by suggesting new platforms to install\n                        if available.\n',
  stderr: '',
  exitCode: 1 }

       Usage:
       android [global options] action [action options]
       Global options:
  -s --silent     : Silent mode, shows errors only.
  -v --verbose    : Verbose mode, shows errors, warnings and all messages.
     --clear-cache: Clear the SDK Manager repository manifest cache.
  -h --help       : Help on a specific command.

                                                                    Valid
                                                                    actions
                                                                    are
                                                                    composed
                                                                    of a verb
                                                                    and an
                                                                    optional
                                                                    direct
                                                                    object:
-    sdk              : Displays the SDK Manager window.
-    avd              : Displays the AVD Manager window.
-   list              : Lists existing targets or virtual devices.
-   list avd          : Lists existing Android Virtual Devices.
-   list target       : Lists existing targets.
-   list device       : Lists existing devices.
-   list sdk          : Lists remote SDK repository.
- create avd          : Creates a new Android Virtual Device.
-   move avd          : Moves or renames an Android Virtual Device.
- delete avd          : Deletes an Android Virtual Device.
- update avd          : Updates an Android Virtual Device to match the folders
                        of a new SDK.
- create project      : Creates a new Android project.
- update project      : Updates an Android project (must already have an
                        AndroidManifest.xml).
- create test-project : Creates a new Android project for a test package.
- update test-project : Updates the Android project for a test package (must
                        already have an AndroidManifest.xml).
- create lib-project  : Creates a new Android library project.
- update lib-project  : Updates an Android library project (must already have
                        an AndroidManifest.xml).
- create uitest-project: Creates a new UI test project.
- update adb          : Updates adb to support the USB devices declared in the
                        SDK add-ons.
- update sdk          : Updates the SDK by suggesting new platforms to install
                        if available.

Exec uname -a
 stdout: Darwin hristo-mb.bg.nc 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64

 stderr:
Exec npm -v
 stdout: 3.8.6

 stderr:
spawn: java "-version"
Exec node-gyp -v
 stdout:
 stderr: /bin/sh: node-gyp: command not found

Exec xcodebuild -version
 stdout: Xcode 7.3.1
Build version 7D1014

 stderr:
Exec gem which xcodeproj
 stdout: /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.1.0/lib/xcodeproj.rb

 stderr:
Exec pod --version
 stdout: 1.0.1

 stderr:
Exec '/usr/local/opt/android-sdk/platform-tools/adb' version
 stdout: Android Debug Bridge version 1.0.32
Revision 09a0d98bebce-android

 stderr:
spawn: /usr/local/opt/android-sdk/tools/android "-h"
Result when throw error is false:
{ stdout: '\n       Usage:\n       android [global options] action [action options]\n       Global options:\n  -s --silent     : Silent mode, shows errors only.\n  -v --verbose    : Verbose mode, shows errors, warnings and all messages.\n     --clear-cache: Clear the SDK Manager repository manifest cache.\n  -h --help       : Help on a specific command.\n\n                                                                    Valid\n                                                                    actions\n                                                                    are\n                                                                    composed\n                                                                    of a verb\n                                                                    and an\n                                                                    optional\n                                                                    direct\n                                                                    object:\n-    sdk              : Displays the SDK Manager window.\n-    avd              : Displays the AVD Manager window.\n-   list              : Lists existing targets or virtual devices.\n-   list avd          : Lists existing Android Virtual Devices.\n-   list target       : Lists existing targets.\n-   list device       : Lists existing devices.\n-   list sdk          : Lists remote SDK repository.\n- create avd          : Creates a new Android Virtual Device.\n-   move avd          : Moves or renames an Android Virtual Device.\n- delete avd          : Deletes an Android Virtual Device.\n- update avd          : Updates an Android Virtual Device to match the folders\n                        of a new SDK.\n- create project      : Creates a new Android project.\n- update project      : Updates an Android project (must already have an\n                        AndroidManifest.xml).\n- create test-project : Creates a new Android project for a test package.\n- update test-project : Updates the Android project for a test package (must\n                        already have an AndroidManifest.xml).\n- create lib-project  : Creates a new Android library project.\n- update lib-project  : Updates an Android library project (must already have\n                        an AndroidManifest.xml).\n- create uitest-project: Creates a new UI test project.\n- update adb          : Updates adb to support the USB devices declared in the\n                        SDK add-ons.\n- update sdk          : Updates the SDK by suggesting new platforms to install\n                        if available.\n',
  stderr: '',
  exitCode: 1 }
Exec mono --version
 stdout:
 stderr: /bin/sh: mono: command not found

Exec git --version
 stdout: git version 2.7.4 (Apple Git-66)

 stderr:
Exec gradle -v
 stdout:
 stderr: /bin/sh: gradle: command not found

Exec "/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/javac" -version
 stdout:
 stderr: javac 1.8.0_92

System information:
{ procInfo: 'nativescript/2.0.1',
  platform: 'darwin',
  os: 'Darwin hristo-mb.bg.nc 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64\n',
  shell: '/bin/bash',
  dotNetVer: null,
  procArch: 'x64',
  nodeVer: 'v5.11.1',
  npmVer: '3.8.6',
  javaVer: '1.8.0',
  nodeGypVer: null,
  xcodeVer: 'Xcode 7.3.1\nBuild version 7D1014\n',
  xcodeprojGemLocation: '/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.1.0/lib/xcodeproj.rb\n',
  itunesInstalled: true,
  cocoapodVer: '1.0.1',
  adbVer: 'Android Debug Bridge version 1.0.32',
  androidInstalled: true,
  monoVer: null,
  gitVer: '2.7.4 (Apple Git-66)',
  gradleVer: null,
  javacVersion: '1.8.0_92' }
Initializing analytics statuses.
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'CLI' with value 'platform'.
execFile: /usr/local/opt/android-sdk/platform-tools/adb "help"
Looking for project in '/Users/ickata/Desktop/Tables/tns/sample-Groceries'
Project directory is '/Users/ickata/Desktop/Tables/tns/sample-Groceries'.
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'CLI' with value 'platform|add'.
Exec which xcodebuild
 stdout: /usr/bin/xcodebuild

 stderr:
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //'
 stdout:
 stderr: Unknown option: n
Usage: head [-options] <url>...
    -m <method>   use method for the request (default is 'HEAD')
    -f            make request even if head believes method is illegal
    -b <base>     Use the specified URL as base
    -t <timeout>  Set timeout value
    -i <time>     Set the If-Modified-Since header on the request
    -c <conttype> use this content-type for POST, PUT, CHECKIN
    -a            Use text mode for content I/O
    -p <proxyurl> use this as a proxy
    -P            don't load proxy settings from environment
    -H <header>   send this HTTP header (you can specify several)

    -u            Display method and URL before any response
    -U            Display request headers (implies -u)
    -s            Display response status code
    -S            Display response status chain
    -e            Display response headers
    -d            Do not display content
    -o <format>   Process HTML content in various ways

    -v            Show program version
    -h            Print this message

    -x            Extra debugging output

Error: Version strings are not in the same format
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:535:15)
    at /usr/local/lib/node_modules/nativescript/lib/common/errors.js:123:33
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/services/commands-service.js:84:106
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/yok.js:208:124
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/services/commands-service.js:51:55
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/errors.js:123:33
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    - - - - -
    at Object.versionCompare (/usr/local/lib/node_modules/nativescript/lib/common/helpers.js:79:15)
    at /usr/local/lib/node_modules/nativescript/lib/services/ios-project-service.js:100:25
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/services/platform-service.js:61:47
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/services/platform-service.js:46:59
    at arrayEach (/usr/local/lib/node_modules/nativescript/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (/usr/local/lib/node_modules/nativescript/node_modules/lodash/index.js:3345:13)
    at /usr/local/lib/node_modules/nativescript/lib/services/platform-service.js:45:15
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
    at /usr/local/lib/node_modules/nativescript/lib/commands/add-platform.js:11:55
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:534:10)
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'CLI' with value 'help'.
List of registered commands: /?, appstore, appstore|upload, autocomplete, autocomplete|disable, autocomplete|enable, autocomplete|status, build, build|android, build|ios, create, debug, debug|android, debug|ios, deploy, dev-generate-help, dev-generate-messages, dev-post-install, dev-preuninstall, dev-test, dev-test|android, dev-test|ios, device, device|android, device|get-file, device|ios, device|list-applications, device|list-files, device|log, device|put-file, device|run, device|stop, device|uninstall, doctor, emulate, emulate|android, emulate|ios, error-reporting, help, info, init, install, livesync, platform, platform|*list, platform|add, platform|remove, platform|update, plugin, plugin|add, plugin|find, plugin|remove, plugin|search, prepare, publish, publish|ios, run, run|android, run|ios, test, test|android, test|init, test|ios, usage-reporting
Reading help for command 'platform|add'. FileName is 'platform-add.md'.
# platform add
┌──────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage                    │ Synopsis                                                                                                                                        │
│ Android latest runtime   │ $ tns platform add android [--framework-path <File Path>] [--symlink] [--sdk <API Level>] [--platform-template <Platform Template>]             │
│ Android selected runtime │ $ tns platform add android[@<Version>] [--framework-path <File Path>] [--symlink] [--sdk <API Level>] [--platform-template <Platform Template>] │
│ iOS latest runtime       │ $ tns platform add ios [--framework-path <File Path>] [--symlink]                                                                               │
│ iOS selected runtime     │ $ tns platform add ios[@<Version>] [--framework-path <File Path>] [--symlink] [--platform-template <Platform Template>]                         │
└──────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Configures the current project to target the selected platform.

### Options

    * --framework-path - Sets the path to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If --symlink is specified, <File Path> must point to directory in which the runtime is already extracted. If --symlink is not specified, <File Path> must point to a valid npm package.
    * --symlink - Creates a symlink to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If --frameworkPath is specified, creates a symlink to the specified directory. If --frameworkPath is not specified, creates a symlink to platform runtime installed with your current version of NativeScript.
    * --sdk - Sets the target Android SDK for the project.
    * --platform-template - Sets the platform template that will be used for the native application.

### Attributes

    * <API Level> is a valid Android API level. For example: 17, 19, MNC.
    * <File Path> is the complete path to a valid npm package or a directory that contains a NativeScript runtime for the selected platform.
    * <Platform Template> is a valid npm package, path to directory, .tgz or GitHub URL that contains a native Android or iOS template.
    * <Version> is any available version of the respective platform runtime published in npm.

Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track exception with message 'Version strings are not in the same format'.

@rosen-vladimirov
Copy link
Contributor

@ickata , thanks for the output. It looks like the following command fails on your machine:

Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //'
 stdout:
 stderr: Unknown option: n

Can you try executing it from the command line:

xcodebuild -version | head -n 1 

I'm really not sure why -n is not available on your machine.

@rosen-vladimirov
Copy link
Contributor

rosen-vladimirov commented Jun 6, 2016

Just to summarize the issue -
CLI is trying to get the version of XCode by executing xcodebuild -version | head -n 1 | sed -e 's/Xcode //'. This commands requires additional tools like head and sed to be installed on the machine. These tools are installed by default on Unix or Linux based OSes, but in fact it's not mandatory to have them.
We have to spawn xcodebuild -version and use regex to get the version after that, so we'll not rely on tools like head and sed.

@enchev , what do you think?

@enchev
Copy link
Contributor

enchev commented Jun 7, 2016

@rosen-vladimirov 👍

@ickata
Copy link
Author

ickata commented Jun 7, 2016

It looks like that this is a result of the Perl LWP module:
http://search.cpan.org/dist/libwww-perl/bin/lwp-request

This added a binary called head which screwed up the default bash command.

Thanks for the help last night!

@juanvillegas
Copy link

Any ideas how to fix this? I'm having exactly the same issue with the command "xcodebuild -version | head -n 1 | sed -e 's/Xcode //'" and its driving me crazy..

@ickata
Copy link
Author

ickata commented Nov 14, 2016

Hey @juanvillegas , do you know if you have XAMPP with mod-perl installed? Because that's was causing the error on my end. After I uninstalled XAMPP the problem was gone.

@sudhanshu-15
Copy link

NativeScript uses the sandbox-pod executable. This may prevent some pods from installing correctly. If you encounter such cases, you can switch to the regular pod executable:
+>
+> 1. Open the NativeScript CLI configuration file, usually located in /usr/local/lib/node_modules/nativescript/config/config.json.
+> 1. Change the value of USE_POD_SANDBOX to false.

This worked for me.

https://github.com/NativeScript/docs/pull/259/files

@codetinker
Copy link

I had almost similar problem. Run this command fixed my problem

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

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

No branches or pull requests

6 participants