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

Unable to install the Firebase iOS SDK (7.9.0) through SPM #7777

Closed
cpdunphy opened this issue Mar 24, 2021 · 18 comments
Closed

Unable to install the Firebase iOS SDK (7.9.0) through SPM #7777

cpdunphy opened this issue Mar 24, 2021 · 18 comments
Assignees

Comments

@cpdunphy
Copy link

Environment

  • Xcode version: 12.4
  • Firebase SDK version: 7.9.0
  • Installation method: Swift Package Manager
  • Firebase Component: Take your pick.. I could not get the option to select the desired components.

Problem

Unable to install the Firebase iOS SDK (7.9.0) through SPM. Failing with the error: Failed to resolve dependencies

This seems to be a problem isolated to 7.9.0, I am able to install 7.8.1 with no issues. I tried using different targeted iOS versions ranging from 13.0 - 14.4.

Reseting the Package Cache had no effect.

Failed to resolve dependencies because no versions of firebase-ios-sdk match the requirement 7.9.1..<8.0.0 and package firebase-ios-sdk is required using a version-based requirement and it depends on unversion package grpc-swiftpm, firebase-ios-sdk >=7.9.0 is forbidden.
And because root depends on firebase-ios-sdk 7.9.0..<8.0.0, version solving failed.

Steps to reproduce:

  1. Create a new project in Xcode.
  2. Add "https://github.com/firebase/firebase-ios-sdk.git" as a Package Dependency with the exact version of 7.9.0.

Thanks for taking the time! I'm glad to see Firebase SwiftUI support extending through the new FirebaseAnalyticsSwift component as well. :)

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulb777
Copy link
Member

@cpdunphy Thanks for the report. I've reproduced and we're investigating ...

@paulb777
Copy link
Member

It looks like a result of changing from version dependencies to hash dependencies in #7563. I'll work on a fix.

@paulb777 paulb777 self-assigned this Mar 24, 2021
@cpdunphy
Copy link
Author

Sounds great! I appreciate the quick turnaround.

@timmythompsen
Copy link

Im running into the same issue! Thanks for the quick fix everyone

@paulb777
Copy link
Member

I just published a 7.9.1 and verified that my test example is fixed with that.

For future reference, I first tried moving the 7.9.0 tag, but Xcode used a cached version of the repo and tag that didn't get reset even after removing DerivedData.

@rrozenv
Copy link

rrozenv commented Mar 24, 2021

@paulb777 I think I am having a related issue with boringssl-SwiftPM. Even after clearing derived data and resetting all package caches I am seeing a openssl/arm_arch.h file not found. I tried downgrading to 7.8.1 and it does not work there either

Screen Shot 2021-03-24 at 1 00 05 PM

@cpdunphy
Copy link
Author

@rrozenv I am running into the same issue that you described. (Downgrading to 7.8.1 does not work as well)

@paulb777
Copy link
Member

Reproduced when building for device. It's a result of https://github.com/firebase/boringSSL-SwiftPM/pull/1/files.

Sorry about the churn. We clearly have to improve our SPM testing and CI.

I'll work on a fix.

Note this issue should be Firestore only. Locking the BoringSSL-GRPC dependency to 0.0.7 should be a workaround and I'll try to get a 0.0.9 soon.

@paulb777
Copy link
Member

There is now a 0.0.9 update for BoringSSL-SwiftPM, but there is also a problem with the abseil dependency. I'll work on that one as well, and in the meantime, that needs to be force back to 0.20200225.0.

I'll work through any other build issues and do my best to get a complete resolution out later today.

@rrozenv
Copy link

rrozenv commented Mar 24, 2021

@paulb777 Thanks for taking a look. Is it possible if you could force Firebase 7.9.1 to point back to abseil 0.20200225.0? Or maybe create a separate branch where this is the case? Just want to have an interim solution so I'm not blocked. Really appreciate it.

@paulb777
Copy link
Member

@rrozenv I made an abseil 0.20200225.2 and my early tests successfully build after Swift Packages -> Update to Latest Package Versions.

I want to do more testing before making a Firebase 7.9.2 and would appreciate any feedback on if the latest versions resolve your issues.

@paulb777
Copy link
Member

It looks like fresh installs of 7.9.1 get the corrected abseil and boringssl versions. I've verified that the Firestore quickstart now builds and runs on device.

Let me know if you see any additional issues or if you see the need for a 7.9.2 that forces the minimum versions of the corrected dependencies.

@rrozenv
Copy link

rrozenv commented Mar 24, 2021

@paulb777 abseil 0.20200225.2 seems to have done the trick. I don't think 7.9.2 is required. Thanks again

@paulb777
Copy link
Member

The Firestore device build issue is solved by firebase/abseil-cpp-SwiftPM#3 and firebase/boringSSL-SwiftPM#2 along with tag updates.

@unxavi
Copy link

unxavi commented Apr 7, 2021

@paulb777 I'm getting this issue when I add the Firestore dependency with SPM and Firebase version 7.10.0

I have cleared the derived data and as soon as I add FirebaseFirestore this compilation error comes. Should I do anything else? should I open a new issue?

It compiles for simulator but not for real device.

@paulb777
Copy link
Member

paulb777 commented Apr 7, 2021

@unxavi I'm not able to reproduce.

Would you try Swift Packages -> Update to Latest Package Versions and note any version changes of the packages installed?

@unxavi
Copy link

unxavi commented Apr 7, 2021

@paulb777 I think what did it to me was to reset the package cache. I also run the Swift Packages -> Update to Latest Package Versions but well, seems to works, thanks a lot and sorry to make noise on the thread, it was driving me crazy all day. Thanks again

@firebase firebase locked and limited conversation to collaborators Apr 24, 2021
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

7 participants