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

adding firebase hangs when fetching grpc #6606

Closed
ekimia opened this issue Sep 29, 2020 · 11 comments
Closed

adding firebase hangs when fetching grpc #6606

ekimia opened this issue Sep 29, 2020 · 11 comments

Comments

@ekimia
Copy link

ekimia commented Sep 29, 2020

Step 0: Are you in the right place?

  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request please use the Feature Request template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general (non-iOS) Firebase discussion, use the firebase-talk
    google group.
  • For backend issues, console issues, and other non-SDK help that does not fall under one
    of the above categories, reach out to
    Firebase Support.
  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.0.1
  • Firebase SDK version: 6.330beta
  • Installation method: Swift Package Manager

[REQUIRED] Step 2: Describe the problem

add the package according to instructions with the 6.33 or 6.32 beta branch specified. Hangs when resolving a grpc commit:

image

Steps to reproduce:

See above

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

Hmm, I just re-confirmed that I can still successfully initialize, including checking out gRPC. Are you able to check out that git hash outside of SwiftPM?

I don't yet have access to Xcode 12.0.1. Does changing Xcode versions make a difference?

@ryanwilson
Copy link
Member

ryanwilson commented Sep 30, 2020

I've seen this happen before and it just takes a while, it eventually sorted itself out for me. We'll need to see if we can track down what's causing this and see if there are any workarounds we can have (like limiting the git history available, eliminating needless files, etc).

The repo has 46,068 commits (compared to Firebase's 4,007) so that could be a factor.

@ekimia
Copy link
Author

ekimia commented Sep 30, 2020

Going to let it go for longer. Yesterday it took an hour at the fetching step which is when I aborted it.

@ekimia
Copy link
Author

ekimia commented Sep 30, 2020

tried on another machine, after an hour it worked. On my main laptop however its still been working at it for over 2 hours.

@ekimia
Copy link
Author

ekimia commented Sep 30, 2020

@paulb777 yes i can check the commit out directly

@paulb777
Copy link
Member

Might be worth starting a discussion at https://forums.swift.org/tag/packagemanager since this is most likely an Xcode or SwiftPM issue.

@SergejLogis
Copy link

We recently added Firebase SDK to our project via SPM, and since then SPM dependencies resolving takes 10+ minutes. The culprit is gRPC library which is 1 GB in size. We merely want to use Firebase Analytics for tracking events. Do we really need 1 GB library to be able to send FA events? And if we do, why does it take forever to download? 😕

@ryanwilson
Copy link
Member

This is definitely a usability issue and we'll do what we can on our side to fix it. There are some promising findings with a shallow clone which reduces the checked out .git folder alone from 272MB to 10MB. We're going to discuss the details of how we can roll this out in the most backwards compatible way and will update this thread soon when we have a plan.

The culprit is gRPC library which is 1 GB in size. We merely want to use Firebase Analytics for tracking events. Do we really need 1 GB library to be able to send FA events?

This is a consequence of SwiftPM only having a single manifest per repo at the moment, so every single dependency across Firebase needs to be included in the Package manifest and fetched beforehand. We have discussed putting each product in a different repo but determined it would be a worse overall experience: you'd need to go through the setup steps for every single Firebase SDK you use as opposed to doing it once, there would be N GitHub repos (one for each SDK) which would make issue management more confusing, more difficult to make cross SDK changes, etc.

All that being said - we'll do as much as we can to make sure using SwiftPM is a great experience and as fast as possible. Thanks for your patience as we work through the bumps during the beta offering!

@paulb777
Copy link
Member

paulb777 commented Oct 7, 2020

Thanks for your patience with this issue.

We just pushed a fix to the 6.34-spm-beta that should substantially speed up loading three of the dependency repos (by using repos with most of the git metadata removed) I'd appreciate a confirmation that it addresses the hang as well.

@SergejLogis
Copy link

Thanks, @paulb777!
I happily confirm that gRPC now only takes few seconds to checkout! And the entire SPM packages update now takes 170 sec instead of staggering 10+ minutes!
Thank you very much! 🚀

@paulb777 paulb777 closed this as completed Oct 8, 2020
@firebase firebase locked and limited conversation to collaborators Nov 8, 2020
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

6 participants