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

ArgumentError - Illformed requirement "$IOS_FIREBASE_ANALYTICS_VERSION" for ios Capacitor ionic 5 #3517

Closed
madhusudhanv255 opened this issue Sep 7, 2020 · 11 comments

Comments

@madhusudhanv255
Copy link

Bug Report

Capacitor Version


Latest Dependencies:

  @capacitor/cli: 2.4.0
  @capacitor/core: 2.4.0
  @capacitor/android: 2.4.0
  @capacitor/electron: 2.4.0
  @capacitor/ios: 2.4.0

Installed Dependencies:

  @capacitor/cli 2.4.0
  @capacitor/android 2.4.0
  @capacitor/core 2.4.0
  @capacitor/ios 2.4.0
  @capacitor/electron not installed

Platform(s)

Ios

Current Behavior

After updating the pods
Step 1: update the pods
Step 2: ionic build this command works
Step 3: npx cap sync ios shows the error

Expected Behavior

Code Reproduction

Other Technical Details

npm --version output: 6.4.1

node --version output: 10.13.0

pod --version output (iOS issues only):1.10.0.beta.2

Additional Context

ArgumentError - Illformed requirement "$IOS_FIREBASE_ANALYTICS_VERSION"
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:63:in parse' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:88:in block in initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:88:in map!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:88:in initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:34:in new' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/requirement.rb:34:in create'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/dependency.rb:101:in initialize' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification/consumer.rb:223:in new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification/consumer.rb:223:in block in dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification/consumer.rb:222:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification/consumer.rb:222:in map' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification/consumer.rb:222:in dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification.rb:403:in block in dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification.rb:402:in map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/specification.rb:402:in dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/validator.rb:44:in initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/abstract_external_source.rb:201:in new' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/abstract_external_source.rb:201:in validator_for_podspec'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/abstract_external_source.rb:186:in validate_podspec' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/abstract_external_source.rb:178:in store_podspec'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/path_source.rb:17:in block in fetch' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/external_sources/path_source.rb:11:in fetch' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:989:in fetch_external_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:968:in block (2 levels) in fetch_external_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:967:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:967:in block in fetch_external_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:966:in fetch_external_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer/analyzer.rb:117:in analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer.rb:414:in analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer.rb:239:in block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer.rb:238:in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/installer.rb:160:in install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/command/install.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/command.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:in load'
/usr/local/bin/pod:23:in `

'

@XtreZz
Copy link

XtreZz commented Sep 7, 2020

We got the same problem, had to revert the plugin to 2.3.0

LE: Sorry, i had to revert cordova-plugin-firebase-analytics to version: 4.3.1

@madhusudhanv255
Copy link
Author

madhusudhanv255 commented Sep 7, 2020

It did not work. stil it shows same issue

@mnhlt
Copy link

mnhlt commented Sep 8, 2020

+1 . I got same error after update npm package (delete package-lock.json then reinstall)

@madhusudhanv255
Copy link
Author

madhusudhanv255 commented Sep 8, 2020

Thanks but mine worked with npm i capacitor-firebase-analytics after removing the firebase analytics plugin

@imhoffd
Copy link
Contributor

imhoffd commented Sep 8, 2020

Use the new Capacitor Community Firebase Analytics plugin: https://github.com/capacitor-community/firebase-analytics

@imhoffd imhoffd closed this as completed Sep 8, 2020
@jcesarmobile
Copy link
Member

Just because there is a capacitor plugin doesn't mean this shouldn't be fixed.
The problem is the CLI is not replacing the IOS_FIREBASE_ANALYTICS_VERSION variable with the default value and causing pod install to fail. This can affect other plugins that might not have an alternative Capacitor plugin

@mnhlt
Copy link

mnhlt commented Sep 9, 2020

This workaround works for me.
edit and change s.dependency 'Firebase/Analytics', '$IOS_FIREBASE_ANALYTICS_VERSION' to s.dependency 'Firebase/Analytics', '6.31.0' in file ios/capacitor-cordovar-ios-plugins/CordovaPluginsStatic.podspec. then call pod install in ios/App.
Screen Shot 2020-09-09 at 10 30 00

@jcesarmobile
Copy link
Member

closing since the linked PR was merged and the fix was released in 2.4.1

@haikyuu
Copy link

haikyuu commented Oct 23, 2020

Note that you need to update @capacitor/cli to 2.4.1.

Thanks @jcesarmobile

@pixolopr
Copy link

Pods are not accepting Versions in that form.

Solution that worked for me:

edit vi ./node_modules/cordova-plugin-firebase-analytics/plugin.xml

Replace pod name with
<pod name="Firebase/Analytics" spec="~> 7.0.0" />

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants