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

🐛 [firebase_core] Exception: Error running pod install on macos #9849

Closed
nepaul opened this issue Nov 3, 2022 · 2 comments
Closed

🐛 [firebase_core] Exception: Error running pod install on macos #9849

nepaul opened this issue Nov 3, 2022 · 2 comments
Labels
platform: macos Issues / PRs which are specifically for MacOS. plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working

Comments

@nepaul
Copy link

nepaul commented Nov 3, 2022

Bug report

Describe the bug
Running Flutter run -d macos in firebase_core/example exception

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to https://github.com/firebase/flutterfire/tree/master/packages/firebase_core/firebase_core/example
  2. Run flutter run -d macos
  3. See error or incorrect behavior

Expected behavior

image

Sample project

https://github.com/firebase/flutterfire/tree/master/packages/firebase_core/firebase_core/example


Additional context

pod --version : 1.11.3

image


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 13.0 22A380 darwin-x64, locale en-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.1)
[✓] VS Code (version 1.73.0)
[!] Proxy Configuration
    ! NO_PROXY is not set
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
PASTE OUTPUT INSIDE HERE

@nepaul nepaul added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Nov 3, 2022
@nepaul nepaul changed the title 🐛 [firebase_core] Exception: Error running pod install 🐛 [firebase_core] Exception: Error running pod install (MacApp) Nov 3, 2022
@nepaul nepaul changed the title 🐛 [firebase_core] Exception: Error running pod install (MacApp) 🐛 [firebase_core] Exception: Error running pod install Nov 3, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Nov 3, 2022
@darshankawar
Copy link

darshankawar commented Nov 3, 2022

Thanks for the report. I am seeing same behavior as reported:

console error log

Running pod install...                                           1,021ms
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Fetching external sources
    -> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
    -> Fetching podspec for `firebase_core` from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`
    firebase_core: Using Firebase SDK version '10.0.0' defined in 'firebase_core'

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
    [!] CocoaPods could not find compatible versions for pod "firebase_core":
      In Podfile:
        firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)

    Specs satisfying the `firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)` dependency were found, but they required a higher minimum deployment target.

    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.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.11.2/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳
    Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1

Exception: Error running pod install
dhs@Dhss-MacBook-Pro firebase_core_example % 

As the error message says dependency were found, but they required a higher minimum deployment target., in current firebase_core exmple, the macos/podfile shows platform :osx, '10.12'. If we manually change it to 10.13, it works and compiles properly.

According to this PR : #9708, the podspec was updated to iOS and macOS to show updated minimum deployment target, ie, 10.13, but for some reason, in firebase_core example, the macos/podfile still shows as 10.12.

I checked for other plugins, for instance, firebase_auth, for which the macos/podfile is showing correct updated target, https://github.com/firebase/flutterfire/blob/master/packages/firebase_auth/firebase_auth/example/macos/Podfile

Another example, firebase_analytics, also shows platform :osx, '10.12' and then gives same error as reported, although it does show a meaningful log as below:

[!] Failed to load 'firebase_analytics' podspec: 
    [!] Invalid `firebase_analytics.podspec` file: [!] The FlutterFire plugin firebase_analytics for macOS requires a macOS deployment target of 10.13 or later..

Which probably is not shown for firebase_core.

Keeping this issue open for further insights from the team.

/cc @russellwheatley

@darshankawar darshankawar added plugin: core platform: macos Issues / PRs which are specifically for MacOS. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Nov 3, 2022
@darshankawar darshankawar changed the title 🐛 [firebase_core] Exception: Error running pod install 🐛 [firebase_core] Exception: Error running pod install on macos Nov 3, 2022
@russellwheatley
Copy link
Member

As @darshankawar said, you just need to update your macos/Podfile to a higher deployment target: 10.13. We are tracking updating example apps in another issue .

@darshankawar darshankawar added the resolution: solution-provided A solution has been provided in the issue. label Nov 8, 2022
@firebase firebase locked and limited conversation to collaborators Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: macos Issues / PRs which are specifically for MacOS. plugin: core resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants