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

1.11.0.beta.1 does not seem to make headers available in same way as 1.10.2 ? #10895

Closed
1 task done
mikehardy opened this issue Aug 24, 2021 · 10 comments
Closed
1 task done
Milestone

Comments

@mikehardy
Copy link
Contributor

mikehardy commented Aug 24, 2021

Report

First I just want to say thanks for cocoapods. I'm only doing apple development from a react-native context and my life is better since react-native started using this project. Thank you!

Second, I've never raised an issue here before so my report might be incomplete but it seems I'm doing almost nothing but running a build farm these days in order to support react-native-firebase, react-native and all sorts of associated libraries.

So I'm happy to refine it and try harder to reproduce etc

What did you do?

I took a project that works with cocoapods 1.10.2, where works is pod install && xcodebuild <arguments etc> and then:

gem install cocoapods --version 1.11.0.beta.1 (or beta.2 - I tried both)
xcodebuild <arguments etc>

What did you expect to happen?

I expected all sorts of warning messages from the compiler (same as any project) then a successful finish

What happened instead?

I got a bunch of compiler errors, all a bit like this:


❌  /Users/mike/work/Kullki/ksocialscore/packages/public-app/node_modules/@react-native-firebase/firestore/ios/RNFBFirestore/RNFBFirestoreTransactionModule.m:78:5: use of undeclared identifier 'FIRFirestore'

    FIRFirestore *firestore = [RNFBFirestoreCommon getFirestoreForApp:firebaseApp];
           ^

So, I maintain react-native-firebase, and I know that my RNFBFirestore pod works :-) - I work really hard on it: https://github.com/invertase/react-native-firebase/actions/workflows/tests_e2e_ios.yml?query=branch%3Amaster

But I still doubt myself, maybe we're doing something wrong?

At any rate, when I do:

gem uninstall -a -x cocoapods && gem install cocoapods --version 1.10.2 && pod install && xcodebuild <arguments etc>

...then the project works again, I have definitely isolated it to just this change from 1.10.2 to 1.11.0-beta.1

CocoaPods Environment

Working:

Stack

   CocoaPods : 1.10.2
        Ruby : ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
    RubyGems : 3.2.22
        Host : macOS 11.5.2 (20G95)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.33.0
Ruby lib dir : /Users/mike/.rvm/rubies/ruby-3.0.2/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 8eaf9fd3ed51e7bfcb9a94c5d5fb73c2ab939a6e

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/mike/.rvm/gems/ruby-3.0.2/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Not working:

Stack

   CocoaPods : 1.11.0.beta.1
        Ruby : ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
    RubyGems : 3.2.22
        Host : macOS 11.5.2 (20G95)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.33.0
Ruby lib dir : /Users/mike/.rvm/rubies/ruby-3.0.2/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 8eaf9fd3ed51e7bfcb9a94c5d5fb73c2ab939a6e

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/mike/.rvm/gems/ruby-3.0.2/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Project that demonstrates the issue

Unfortunately the repo that triggers this is closed, but I'm doing what I can to peel it apart to a reproduction. I've tried 1.11.0.beta.[1|2] in 3 other repos (including our e2e tests in react-native-firebase) and it's 💯

The only thing I can think of is I use targets in the closed repo.

Anyway, I recognize the lack of a repro makes this likely not actionable at the moment but in testing cocoapods betas through the ruby v3 updates I've never had a build failure and I didn't see anything about the current beta in the issues list so I wanted to register this quickly

@mikehardy
Copy link
Contributor Author

mikehardy commented Aug 24, 2021

Here's a full diff of the result of:

gem uninstall -a -x cocoapods && gem install cocoapods --version 1.11.0.beta.2 && pod install
cd .. && cp -r ios ios-1.11.0.beta.2 && cd ios
gem uninstall -a -x cocoapods && gem install cocoapods --version 1.10.2 && pod install
cd .. && diff -r ios ios-1.11.0.beta.2 > ios-full-folder-diff.txt && gzip -9 ios-full-folder-diff.txt`

To my untrained eye it's incredibly noisy because many of the elements are unstable and are actually the same but just move around - yet there is definitely a real difference in the headers.

In case I cannot get a repo up + until I do, if there's anything else interesting, I can reproduce it locally at will

ios-full-folder-diff.txt.gz

@paulb777
Copy link
Member

One way to narrow down the issue would be to find the path to the proper definition of FIRFirestore for /Users/mike/work/Kullki/ksocialscore/packages/public-app/node_modules/@react-native-firebase/firestore/ios/RNFBFirestore/RNFBFirestoreTransactionModule.m which is presumably wherever Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h is installed.

One way to do this is to add a line like #error 1 to Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h and then build and look at the error message in the working (1.10.2) version.

Then there should be a small set of paths to filter the large diff into something more feasible. Also the relevant diff is almost certainly a .sh or .xcconfig file.

@mikehardy
Copy link
Contributor Author

Given the nature of react-native I think it'll be easier to just tear the javascript code out (the proprietary bit) but leave in all the native machinery and then I can post a repo - probably the same amount of work as messing about in headers, but I'll try that if nothing else works - thanks @paulb777

@mikehardy mikehardy changed the title 1.11.0.beta.1 does not seem to make headers available in same was as 1.10.2 ? 1.11.0.beta.1 does not seem to make headers available in same way as 1.10.2 ? Aug 25, 2021
@mikehardy
Copy link
Contributor Author

Was able to strip it down to 2.1MB unpacked (it will unzip into it's own directory in a clean+friendly way)

The yarn install && cd ios && pod install will pull down something like 4GB between node_modules and ios/Pods though (sorry) so be patient.

README.md in there has details on exactly how to run it and reproduce the error

cocoapods-beta-repro.tar.gz

@dnkoutso dnkoutso added this to the 1.11.0 milestone Aug 25, 2021
@dnkoutso
Copy link
Contributor

thank you so much for the detailed report and assistance here! This is why we do betas!

I will take a look on the sample app you provided and see if we can figure out the issue or change that caused this.

@dnkoutso
Copy link
Contributor

@mikehardy I was able to successfully build the supplied project with cocoapods 1.11.0 master branch.

Its possible this is fixed on master branch due to this #10884 that landed yesterday.

Can you ensure the entire derived data is wiped out and then retry to build your project with the latest 1-11-stable branch?

@dnkoutso
Copy link
Contributor

Screen Shot 2021-08-25 at 4 55 23 PM

I had to comment out a script phase or two that I do not know how to configure with React Native but I am certain the script phase I commented out was not related to the issue you reported which was a header missing.

@dnkoutso
Copy link
Contributor

after trying the actual 1.11.0.beta.2 tag I got the same issue as you and re-confirmed this is the same issue fixed by #10884.

it seems FirebaseFirestore copies multiple xcframeworks that was not properly handled by 1.11 so far.

Going to close and ship 1.11.0.rc.1 today which should contain this fix.

@mikehardy
Copy link
Contributor Author

Fantastic @dnkoutso I'll retest with rc.1 when it comes out but given you locally-reproduced+tested+verified I'll keep your noise down by not positive-confirming, we'll assume it works and I'll just raise it here if it doesn't.

Thanks again for cocoapods :-)

@dnkoutso
Copy link
Contributor

no problemo! Let me know of course if I am mistaken and we can re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants