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

[Bug] FirebaseAuth and GoogleSignIn iOS Build failure #621

Closed
UnayOzan opened this issue Feb 3, 2023 · 4 comments
Closed

[Bug] FirebaseAuth and GoogleSignIn iOS Build failure #621

UnayOzan opened this issue Feb 3, 2023 · 4 comments
Labels

Comments

@UnayOzan
Copy link

UnayOzan commented Feb 3, 2023

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.17f1
  • Firebase Unity SDK version: 10.4.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Auth
  • Other Firebase Components in use: None
  • Additional SDKs you are using: _____ (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac
  • Platform you are targeting: iOS, Android works fine.
  • GoogleSignInPackage: https://github.com/googlesamples/google-signin-unity

[REQUIRED] Please describe the issue here:

Importing only FirebaseAuth and GoogleSignIn package to empty Unity.
iOS build crashes with the following error:
`iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

pod install output:

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
Firebase/Auth (= 10.4.0) was resolved to 10.4.0, which depends on
FirebaseAuth (~> 10.4.0) was resolved to 10.4.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)

GoogleSignIn (~> 5.0.2) was resolved to 5.0.2, which depends on
  GTMSessionFetcher/Core (~> 1.1)

pod repo update output:

Updating spec repo cocoapods
$ /usr/bin/git -C /Users/macbook/.cocoapods/repos/cocoapods fetch origin --progress
$ /usr/bin/git -C /Users/macbook/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
master
$ /usr/bin/git -C /Users/macbook/.cocoapods/repos/cocoapods reset --hard origin/master
HEAD is now at 9c93a1febc8e [Add] 1Flow 2023.02.03
Updating spec repo trunk

remote: Enumerating objects: 40, done.
remote: Counting objects: 2% (1/40)
remote: Counting objects: 5% (2/40)
remote: Counting objects: 7% (3/40)
remote: Counting objects: 10% (4/40)
remote: Counting objects: 12% (5/40)
remote: Counting objects: 15% (6/40)
remote: Counting objects: 17% (7/40)
remote: Counting objects: 20% (8/40)
remote: Counting objects: 22% (9/40)
remote: Counting objects: 25% (10/40)
remote: Counting objects: 27% (11/40)
remote: Counting objects: 30% (12/40)
remote: Counting objects: 32% (13/40)
remote: Counting objects: 35% (14/40)
remote: Counting objects: 37% (15/40)
remote: Counting objects: 40% (16/40)
remote: Counting objects: 42% (17/40)
remote: Counting objects: 45% (18/40)
remote: Counting objects: 47% (19/40)
remote: Counting objects: 50% (20/40)
remote: Counting objects: 52% (21/40)
remote: Counting objects: 55% (22/40)
remote: Counting objects: 57% (23/40)
remote: Counting objects: 60% (24/40)
remote: Counting objects: 62% (25/40)
remote: Counting objects: 65% (26/40)
remote: Counting objects: 67% (27/40)
remote: Counting objects: 70% (28/40)
remote: Counting objects: 72% (29/40)
remote: Counting objects: 75% (30/40)
remote: Counting objects: 77% (31/40)
remote: Counting objects: 80% (32/40)
remote: Counting objects: 82% (33/40)
remote: Counting objects: 85% (34/40)
remote: Counting objects: 87% (35/40)
remote: Counting objects: 90% (36/40)
remote: Counting objects: 92% (37/40)
remote: Counting objects: 95% (38/40)
remote: Counting objects: 97% (39/40)
remote: Counting objects: 100% (40/40)
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 3% (1/26)
remote: Compressing objects: 7% (2/26)
remote: Compressing objects: 11% (3/26)
remote: Compressing objects: 15% (4/26)
remote: Compressing objects: 19% (5/26)
remote: Compressing objects: 23% (6/26)
remote: Compressing objects: 26% (7/26)
remote: Compressing objects: 30% (8/26)
remote: Compressing objects: 34% (9/26)
remote: Compressing objects: 38% (10/26)
remote: Compressing objects: 42% (11/26)
remote: Compressing objects: 46% (12/26)
remote: Compressing objects: 50% (13/26)
remote: Compressing objects: 53% (14/26)
remote: Compressing objects: 57% (15/26)
remote: Compressing objects: 61% (16/26)
remote: Compressing objects: 65% (17/26)
remote: Compressing objects: 69% (18/26)
remote: Compressing objects: 73% (19/26)
remote: Compressing objects: 76% (20/26)
remote: Compressing objects: 80% (21/26)
remote: Compressing objects: 84% (22/26)
remote: Compressing objects: 88% (23/26)
remote: Compressing objects: 92% (24/26)
remote: Compressing objects: 96% (25/26)
remote: Compressing objects: 100% (26/26)
remote: Compressing objects: 100% (26/26), done.
remote: Total 27 (delta 18), reused 0 (delta 0), pack-reused 0
From https://github.com/CocoaPods/Specs
fa41f1c69c16..9c93a1febc8e master -> origin/master

UnityEngine.Debug:LogError (object)
Google.Logger:Log (string,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:136)
Google.IOSResolver:Log (string,bool,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:1242)
Google.IOSResolver:OnPostProcessInstallPods (UnityEditor.BuildTarget,string) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:2794)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:180)`

@UnayOzan UnayOzan changed the title [Bug] [Bug] FirebaseAuth and GoogleSignIn Crash Feb 3, 2023
@UnayOzan UnayOzan changed the title [Bug] FirebaseAuth and GoogleSignIn Crash [Bug] FirebaseAuth and GoogleSignIn iOS Build failure Feb 3, 2023
@paulinon paulinon removed the new New issue. label Feb 3, 2023
@paulinon
Copy link
Contributor

paulinon commented Feb 3, 2023

Hi @UnayOzan,

Thanks for reporting this issue. Is there a Podfile generated after attempting to build the project? If so, could you share it with me?

Could you also provide the complete steps you performed before facing the issue? You may provide a minimal, reproducible example of your implementation as this could be used as a baseline for troubleshooting.

@paulinon paulinon added the needs-info Need information for the developer label Feb 3, 2023
@UnayOzan
Copy link
Author

UnayOzan commented Feb 3, 2023

Hi @paulinon ,

I have used Authentication in an other project normally and got this error and than I just opened up a fresh project, imported both packages and tried to build without an implementation.

I can also create and send an empty project.

Here is the podfile:
Podfile.zip

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Feb 3, 2023
@UnayOzan
Copy link
Author

UnayOzan commented Feb 5, 2023

Fixed this error with changing the version in "GoogleSignIn.podspec.json" file.

Firebase/Auth (= 10.4.0) was resolved to 10.4.0, which depends on
FirebaseAuth (~> 10.4.0) was resolved to 10.4.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)

GoogleSignIn (~> **5.0.2**) was resolved to **5.0.2**, which depends on
  GTMSessionFetcher/Core (~> **1.1**)

I found the file in {user}.cocoapods/repos/cocoapods/Specs and then just search for "GoogleSignIn.podspec.json".
Find the folder with the same version with the error, in my case 5.0.2.
And then change its dependencies with the version 7.0.0 or something that works with the other packages.
In my project the solution was this;

 "dependencies": {
    "AppAuth": [
      "~> 1.5"
    ],
    "GTMAppAuth": [
      ">= 1.3",
      "< 3.0"
    ],
    "GTMSessionFetcher/Core": [
      ">= 1.1",
      "< 4.0"
    ]

After that I exited Xcode, deintagrated pods, cleaned cache and installed it again.
Everything works fine now.

@paulinon
Copy link
Contributor

paulinon commented Feb 6, 2023

Glad to hear that you resolved the issue, @UnayOzan. That said, I'll be closing this ticket. Let me know if an issue arises.

@paulinon paulinon closed this as completed Feb 6, 2023
@firebase firebase locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants