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

For cordova-ios@6.2.0: Failed to install 'cordova-background-geolocation-lt': Error: pod: Command failed with exit code 1 #1359

Closed
shahdeep1989 opened this issue Jul 28, 2022 · 5 comments

Comments

@shahdeep1989
Copy link

When I tried to install plugin it was giving error for iOS. I have added plugin entry on config.xml and tried to add iOS platform. And that provided below error.

Your Environment

  • Plugin version: Latest

  • Platform: iOS

  • OS version: MacOS Big Sur Version: 11.6.5

  • Device manufacturer / model:
    MacBookPro

  • Cordova version (cordova -v):
    11.0.0

  • Cordova platform version (cordova platform ls):
    Installed platforms:
    android 10.1.2
    Available platforms:
    browser ^6.0.0
    electron ^3.0.0
    ios ^6.2.0
    osx ^6.0.0

  • Plugin config provided to #ready: config.xml

<plugin name="cordova-background-geolocation-lt" spec="https://github.com/transistorsoft/cordova-background-geolocation-lt.git">
        <variable name="LICENSE" value="********************************************" />
        <variable name="GOOGLE_API_VERSION" value="16.0.0" />
        <variable name="APPCOMPAT_VERSION" value="27.0.1" />
        <variable name="BACKGROUND_MODE_LOCATION" value="location" />
</plugin>

Expected Behavior

Plugin should install properly.

Actual Behavior

Failed to install plugin.

Steps to Reproduce

  1. Added below code in config.xml
<plugin name="cordova-background-geolocation-lt" spec="https://github.com/transistorsoft/cordova-background-geolocation-lt.git">
        <variable name="LICENSE" value="********************************************" />
        <variable name="GOOGLE_API_VERSION" value="16.0.0" />
        <variable name="APPCOMPAT_VERSION" value="27.0.1" />
        <variable name="BACKGROUND_MODE_LOCATION" value="location" />
</plugin>
  1. cordova platform add ios@6.2.0

Context

Trying to install/add latest plugin to cordova-ios@6.2.0

Debug logs

Logs
Facing same issue. Failed to install plugin for iOS.

cordova platforms add ios
Using cordova-fetch for cordova-ios@^6.2.0
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.mysmartjarvis.com
Name: mySmartJarvis
iOS project created with cordova-ios@6.2.0
config file .entitlements requested for changes not found at Project/platforms/ios/.entitlements, ignoring
Installing "cordova-background-geolocation-lt" for ios
Plugin dependency "cordova-plugin-background-fetch@7.1.1" already fetched, using that version.
Installing "cordova-plugin-background-fetch" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Failed to install 'cordova-background-geolocation-lt': Error: pod: Command failed with exit code 1 Error output:
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
/Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/inflections.rb:145:in plural': undefined method prepend' for []:Array (NoMethodError)
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:13:in block in <module:ActiveSupport>' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/inflections.rb:249:in inflections'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:12:in <module:ActiveSupport>' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:11:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:3:in <top (required)>' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/core_ext/string/inflections.rb:3:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/cocoapods-1.11.3/lib/cocoapods.rb:8:in <top (required)>' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/cocoapods-1.11.3/bin/pod:36:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/bin/pod:23:in load' from /Users/deepshah/.rbenv/versions/2.3.0/bin/pod:23:in

'
at ChildProcess.whenDone (*********/node_modules/cordova-common/src/superspawn.js:136:25)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Socket. (internal/child_process.js:444:11)
at Socket.emit (events.js:314:20)
at Pipe. (net.js:675:12)
pod: Command failed with exit code 1 Error output:
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
/Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/inflections.rb:145:in plural': undefined method prepend' for []:Array (NoMethodError)
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:13:in block in <module:ActiveSupport>' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/inflections.rb:249:in inflections'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:12:in <module:ActiveSupport>' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:11:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflector/methods.rb:3:in <top (required)>' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/core_ext/string/inflections.rb:3:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/cocoapods-1.11.3/lib/cocoapods.rb:8:in <top (required)>' from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/deepshah/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/cocoapods-1.11.3/bin/pod:36:in <top (required)>'
from /Users/deepshah/.rbenv/versions/2.3.0/bin/pod:23:in load' from /Users/deepshah/.rbenv/versions/2.3.0/bin/pod:23:in '
@christocracy
Copy link
Member

christocracy commented Jul 28, 2022

Plugin version: Latest

This meaningless in the future for others stumbling here.

Post the EXACT version.

@shahdeep1989
Copy link
Author

@christocracy
Plugin version: 4.8.0

pod --version
1.11.3

@christocracy
Copy link
Member

Have you investigated your warnings?

Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5

@christocracy
Copy link
Member

christocracy commented Jul 28, 2022

I'm on a iMac Pro (intel), MacOS 12.4

$ ruby -v
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]

I'm quite experienced with Ruby.

undefined method prepend' for []:Array (NoMethodError)

Ok, so Array says there's no method prepend. Let's jump into irb

$ irb
irb(main):001:0> ["foo", "bar"].prepend("first")
=> ["first", "foo", "bar"]
  • My Ruby 2.6.8 says that Array does have a method prepend.
  • Your ruby 2.6.6 (/Users/deepshah/.rvm/gems/ruby-2.6.6) says there is no method prepend.

I suggest you use your rvm to update your ruby.

@shahdeep1989
Copy link
Author

Thank you @christocracy

ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin20]

It is working with same ruby version.

Below command fixed my issue. Previously when I tried that was not working.

sudo gem pristine ffi --version 1.15.5

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

2 participants