Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

CocoaPods dependency causing build failure #924

Closed
seanstanden opened this issue Sep 25, 2018 · 38 comments
Closed

CocoaPods dependency causing build failure #924

seanstanden opened this issue Sep 25, 2018 · 38 comments
Labels
Milestone

Comments

@seanstanden
Copy link

seanstanden commented Sep 25, 2018

Getting:

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/AppDelegateSwizzler":
In Podfile:
Firebase/Core (~> 5.6.0) was resolved to 5.6.0, which depends on
FirebaseAnalytics (= 5.1.1) was resolved to 5.1.1, which depends on
GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)

When running an iOS build. Only started happening today on our daily builds. Not sure if there's anything you can do, I've found a corresponding ticket here:

firebase/firebase-ios-sdk#1845

describing the problem, with a workaround.

@EddyVerbruggen
Copy link
Owner

If bumping to Firebase iOS SDK 5.8.1 is the solution then that's a relatively easy fix. However, the new Xcode 10 buildsystem doesn't seem to play nice with that version on NativeScript.

While on the subject of Xcode 10: did your daily build server switch to Xcode 10 around the time you saw the failure?

@seanstanden
Copy link
Author

No it’s still running Xcode 8

@patrick-nurt
Copy link

We're seeing the same issue since last night, running xcode 9.3

@EddyVerbruggen
Copy link
Owner

@patrick-nurt What changed yesterday?

@patrick-nurt
Copy link

patrick-nurt commented Sep 26, 2018

Updated to latest version of your plugin yesterday, was building fine last night - this morning we get the same error in travis:

[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/AppDelegateSwizzler":
In Podfile:
Firebase/Core (~> 5.6.0) was resolved to 5.6.0, which depends on
FirebaseAnalytics (= 5.1.1) was resolved to 5.1.1, which depends on
GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)```

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Sep 26, 2018

My brain has trouble making sense of this as there are too many variables (Xcode versions, NativeScript versions, Plugin versions, Pod versions) and inconsistent behavior (worked after the upgrade, but later it didn't).. so this needs to be pinned down further.

I'm currently already in Xcode 10's "new build system" hell, figuring things out between NativeScript 4 and 5 (@ next) versions which messes up my development machine, so don't expect a quick patch here.

@keerl
Copy link

keerl commented Sep 26, 2018

I am having the same issues from a brand new project. Using Sidekick cloud build.

CocoaPods could not find compatible versions for pod \"GoogleUtilities/AppDelegateSwizzler\":
   In Podfile:
     Firebase/Core (~> 5.5.0) was resolved to 5.5.0, which depends on
       FirebaseAnalytics (= 5.1.0) was resolved to 5.1.0, which depends on
         GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
 (CLI) Specs satisfying the `GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.

@EddyVerbruggen
Copy link
Owner

Can anyone share a project I can clone to reproduce this issue, along with the NativeScript and Xcode versions that are used to build the project? I simply can't reproduce this specific issue..

@keerl
Copy link

keerl commented Sep 26, 2018

I can, but I am not sure what version of Xcode is being used on Sidekick Cloud Builds.

@Aakashchauhan17
Copy link

I am having the same issue from yesterday. Getting "Build failed". I have not uploaded it to Github yet. But sure can share google drive link to download nativescript project.

@jnorkus
Copy link
Collaborator

jnorkus commented Sep 26, 2018

I have created a PR that fixes the issue by updating to Firebase 5.8.1
firebase/firebase-ios-sdk#1845

jnorkus pushed a commit that referenced this issue Sep 26, 2018
@Aakashchauhan17
Copy link

I still have issue after Adding "pod 'GoogleUtilities', '5.2.3'" and changing Firebase/core to 5.8.1

@EddyVerbruggen
Copy link
Owner

@Aakashchauhan17 What's the exact issue with that config?

@EddyVerbruggen
Copy link
Owner

Note that even though I still have no way to reproduce the issue I will add that temp fix (pod 'GoogleUtilities', '5.2.3') to 7.1.0 and we'll see what happens.

@Aakashchauhan17
Copy link

@EddyVerbruggen . I am getting this kind of error when trying to tun command 'tns run ios'

Executing before-shouldPrepare hook from /Users/Aakash/Documents/Projects/aakashcam/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Skipping prepare.
Building project...
Xcode build...
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleAPIClientForREST'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/QBImagePickerController'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/nanopb'
ld: targeted OS version does not support use of thread local variables in l25192 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleAPIClientForREST'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/QBImagePickerController'
ld: warning: directory not found for option '-F/Users/Aakash/Library/Developer/Xcode/DerivedData/aakashcam-bwdqcnztnmrfltbcxbnlimopwubh/Build/Products/Debug-iphonesimulator/nanopb'
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED **

Unable to apply changes on device: D67E3CFF-7EF5-4154-A95C-0CA64CE2D648. Error is: Command xcodebuild failed with exit code 65.
Executing after-watch hook from /Users/Aakash/Documents/Projects/aakashcam/hooks/after-watch/nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from /Users/Aakash/Documents/Projects/aakashcam/hooks/after-watch/nativescript-dev-webpack.js

@EddyVerbruggen
Copy link
Owner

@Aakashchauhan17 You're using Xcode 10 and running into a compatibility issue with NativeScript. I'm actually trying to help fix this type of errors in the CLI. It has nothing to do with this plugin.

@Aakashchauhan17
Copy link

@EddyVerbruggen
To produce an issue I think you just need to implement firebase into nativescript app. and I am using image labeling in app with "tns-ios": {
"version": "4.2.0"
and emulator is running on ios 12.

@EddyVerbruggen
Copy link
Owner

Yep. See my previous comment. Using Xcode 9 doesn't give you this headache, so it's because of the new Xcode 10 build system.

@Aakashchauhan17
Copy link

@Aakashchauhan17 You're using Xcode 10 and running into a compatibility issue with NativeScript. I'm actually trying to help fix this type of errors in the CLI. It has nothing to do with this plugin.

It was working fine until tomorrow. And I haven't changed anything in code.

@Aakashchauhan17
Copy link

Yep. See my previous comment. Using Xcode 9 doesn't give you this headache, so it's because of the new Xcode 10 build system.

Ok. Yes. now I understand. Thanks. So I might need to shift to use xcode 9

@EddyVerbruggen
Copy link
Owner

Yeah, you can download it from Apple (I did it as well to be able to switch between 9 and 10 when needed). And also keep an eye out on the issues @ https://github.com/NativeScript/nativescript-cli/issues

@EddyVerbruggen
Copy link
Owner

7.1.0 has been released, with the alledged temp fix for the OP's [!] CocoaPods could not find compatible versions for pod "GoogleUtilities/AppDelegateSwizzler": issue.

@jlooper
Copy link
Contributor

jlooper commented Sep 26, 2018

If you need a project to tinker with, you can use Picme: github.com/jlooper/picme

@Aakashchauhan17
Copy link

@EddyVerbruggen Ok. Cool. I will try to do it with xcode 9.4.1 and firebase sdk 7.1.0 . And thank you so much to look further into this issue

@seanstanden
Copy link
Author

@EddyVerbruggen builds succeeded this morning with latest version. Thank you very much for the quick response. Really appreciated. Sorry for any headaches. :)

@codewithbjim
Copy link

also have this issue when I tried building with NS Sidekick

@codewithbjim
Copy link

screen shot 2018-09-27 at 4 39 24 pm

here's a screenshot

@janossuta
Copy link

@virtualbjorn have you been using the latest version of nativescript-plugin-firebase (7.1.0)? I had the same issue but after I updated to the latest version the build was completed successfully with the nativescript sidekick.

dtopuzov added a commit to NativeScript/nativescript-marketplace-demo that referenced this issue Oct 1, 2018
@spmamidi
Copy link

spmamidi commented Oct 1, 2018

+1
CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
In Podfile:
Firebase/Core (> 5.6.0) was resolved to 5.6.0, which depends on
FirebaseAnalytics (= 5.1.1) was resolved to 5.1.1, which depends on
GoogleUtilities/MethodSwizzler (
> 5.2.0)

@hackerunet
Copy link

I'm having this issue as well, and I cannot apply any patch because the patch suggested here:
firebase/firebase-ios-sdk#1845
is over the pod file and the NS build fails so no pod file is created.
How can we fix this?

@spmamidi
Copy link

spmamidi commented Oct 1, 2018

Yep. See my previous comment. Using Xcode 9 doesn't give you this headache, so it's because of the new Xcode 10 build system.

Ok. Yes. now I understand. Thanks. So I might need to shift to use xcode 9

How to downgrade xcode 10 to xcode 9

@Aakashchauhan17
Copy link

You need to first uninstall xcode 10 from application and from the Apple's website go to downloads and select xcode 9.4.x to download. Then you are good to go. It works fine.

@EddyVerbruggen
Copy link
Owner

Correct. You can also try the “next” (5) version of nativescript which has better Xcode 10 compat.

@hackerunet
Copy link

no need, check the version of the plugin in package.json update it.

@spmamidi
Copy link

spmamidi commented Oct 3, 2018

No luck. Eventhough i downgraded to xcode 9, firebase 7.1. i am getting error with methodswizzler.
Anyworkarounds are highly appreciated.

Firebase/Core (> 5.6.0) was resolved to 5.6.0, which depends on
FirebaseAnalytics (= 5.1.1) was resolved to 5.1.1, which depends on
GoogleUtilities/MethodSwizzler (
> 5.2.0)

@hackerunet
Copy link

hackerunet commented Oct 3, 2018 via email

@spmamidi
Copy link

spmamidi commented Oct 4, 2018

No Luck. I have updated to 7.

@yencolon
Copy link

Solved this using version 6 of plugin

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