transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

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

Closed shahdeep1989 closed 1 year ago

shahdeep1989 commented 1 year ago

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

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>
  2. 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 ' 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 ' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:11:in ' 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 ' 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 ' 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 ' 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 ' 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 ' 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 ' from /Users/deepshah/.rvm/gems/ruby-2.6.6@global/gems/activesupport-6.1.4.6/lib/active_support/inflections.rb:11:in ' 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 ' 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 ' 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 ' 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 ' 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 commented 1 year ago

Plugin version: Latest

This meaningless in the future for others stumbling here.

Post the EXACT version.

shahdeep1989 commented 1 year ago

@christocracy Plugin version: 4.8.0

pod --version 1.11.3

christocracy commented 1 year ago

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 commented 1 year ago

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"]

I suggest you use your rvm to update your ruby.

shahdeep1989 commented 1 year ago

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