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

Protobuf erro after upgrade 'protobuf/Any.pbobjc.h' file not found! #2780

Closed
3 of 10 tasks
alexxsanchezm opened this issue Oct 25, 2019 · 18 comments
Closed
3 of 10 tasks
Labels
Blocked: Firebase SDK Pending a confirmed fix landing on the official native sdk's (iOS/Android). Impact: Build Error Behaviour causing build failure Platform: iOS Type: Docs Type: Firebase Issue or PR that addresses external Firebase behaviour issues or changes, e.g. a Firebase SDK issue

Comments

@alexxsanchezm
Copy link

Issue

Describe your issue here
This problem came up after upgrading to react-native 0.61.2 and RNFirebase modules. I have to say I wanted to use the new npm package version which uses @react-native-firebase/* but I changed again to the current react-native-firebase since the new packages are not completed yet.

Everything seems to be compiling fine until i get the next error

In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/FirebaseMessaging/Firebase/Messaging/FIRMessagingDataMessageManager.m:19:
In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/FirebaseMessaging/Firebase/Messaging/Protos/GtalkCore.pbobjc.h:27:
In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/Headers/Private/Protobuf/GPBProtocolBuffers.h:44:
/Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/Headers/Private/Protobuf/GPBWellKnownTypes.h:40:10: fatal error: 'protobuf/Any.pbobjc.h' file not found
 #import <protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I'm not sure if I'm missing something or something is broken under Pods.


Project Files

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
platform :ios, '9.0'
#use_frameworks!

target 'passenger_app_rx' do

    pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
    pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
    pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
    pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
    pod 'React', :path => '../node_modules/react-native/'
    pod 'React-Core', :path => '../node_modules/react-native/'
    pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
    pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
    pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
    pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
    pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
    pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
    pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
    pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
    pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
    pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
    pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
    pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
    pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
    pod 'react-native-webview', :path => '../node_modules/react-native-webview'
    pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
    pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
    pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"

    pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
    pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    pod 'TextToSpeech', :path => '../node_modules/react-native-tts'
    pod 'RNShare', :path => '../node_modules/react-native-share'

    pod 'FBSDKCoreKit', '5.8.0'
    pod 'FBSDKLoginKit', '5.8.0'
    pod 'FBSDKShareKit', '5.8.0'

    #pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
    pod 'Firebase/Core', '6.3.0'
    pod 'Fabric', '~> 1.10.2'
    pod 'Crashlytics', '~> 3.13.2'
    pod 'Firebase/RemoteConfig', '6.3.0'
    pod 'Firebase/Messaging', '6.3.0'
    pod 'Protobuf', '~> 3.10.0'
    
    pod 'RNGoogleSignin', :path => '../node_modules/@react-native-community/google-signin'
    pod 'GoogleSignIn', '~> 5.0.0'
end

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 1.30 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 19, 21, 22, 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 23.0.3, 25.0.1, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.3, 28.0.0, 28.0.2, 28.0.3, 29.0.2
      System Images: android-22 | Google APIs Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.2 => 0.61.2 
  npmGlobalPackages:
    babel-preset-react-native: 5.0.2
    create-react-native-app: 1.0.0
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2
    react-native-git-upgrade: 0.2.7
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 5.5.6
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N & VERSION


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

@mikehardy
Copy link
Collaborator

Probably not a fix per se, but I'd use at least iOS pods 6.8.1 as they didn't fix UIWebView references until then which causes App Store warnings when you try to publish. I consider it the minimum viable version at this point for the iOS Firebase SDKs

That said, maybe there's some sort of pod cache corruption issue - I'd nuke everything with npx react-native-clean-project and try a super clean build.

@alexxsanchezm
Copy link
Author

alexxsanchezm commented Oct 28, 2019

@mikehardy I did what you suggested but not work in my case. With nowhere else to look at, I started digging and pay more attention to this issue and MYHO is there is an issue with the firebase-ios-sdk pod spec for protobuf. I think the 3.10.0 Protobuf spec fix the issue, But it have to be updated across all dependent modules.

After all I fixed by enabling use_frameworks! fixed the problem.

Have to say I use other dependencies but they have already a fix for case-sensitive file systems, so I just upgrade them.

@mikehardy
Copy link
Collaborator

Maybe we could add something on the template for environment asking if you are on a case-sensitive macOS system, as I think that's what bit you @alexxsanchezm ? Glad you got it fixed and it seems that Firebase iOS Pods version 6.11.0 at least contain that (or allow its use if you pod update) so this should go away in the future as people update

@alexxsanchezm
Copy link
Author

Yeah, I think it could be added on the template. I did setup my file system as case sensitive because other requirements. And yeah I think this problem will go away after devs start updating their dependencies.

@mikehardy
Copy link
Collaborator

Hey @Salakar / @Ehesp I just looked through v6 docs and I don see any place that has a matrix of supported version combinations like in v5. I was trying to think where I'd drop a note for people that 6.11.0 was the minimum for case-sensitive filesystems on macOS and I don't know where would be best 🤔

@mikehardy mikehardy added Workflow: Needs Review Pending feedback or review from a maintainer. Impact: Build Error Behaviour causing build failure Platform: iOS Type: Firebase Issue or PR that addresses external Firebase behaviour issues or changes, e.g. a Firebase SDK issue Type: Docs labels Oct 31, 2019
@sijad
Copy link

sijad commented Nov 6, 2019

I added RNFB v6 to a new RN 0.61.2 project but I get same error, everything works fine in Android
output of pod install

Installing Firebase (6.8.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseCore (6.2.3)
Installing FirebaseCoreDiagnostics (1.1.1)
Installing FirebaseCoreDiagnosticsInterop (1.1.0)
Installing FirebaseInstanceID (4.2.7)
Installing FirebaseMessaging (4.1.8)
Installing GoogleAppMeasurement (6.1.1)
Installing GoogleDataTransport (3.0.1)
Installing GoogleDataTransportCCTSupport (1.2.1)
Installing GoogleUtilities (6.3.1)
Installing Protobuf (3.10.0)

BTW I'm using cocapods 1.18 which uses CDN to install dependencies

@mnemanja
Copy link

mnemanja commented Nov 18, 2019

@mikehardy What do you mean by version 6.11.0? The latest available version is 6.0.3. Or I'm missing something?

Also, here's the same issue at the protobuf repo protocolbuffers/protobuf#6803

And on the firebase-ios-sdk
firebase/firebase-ios-sdk#1419

I've moved to the case insensitive file system for the time being, but that is not a solution.

@mikehardy
Copy link
Collaborator

@mnemanja that was a note for the maintainers who can handle a shorter short-hand for versions, sorry. 6.11.0 was a reference to the underlying google ios sdk pod versions, and actually they are on 6.13.0 now. react-native-firebase is currently at 6.0.4

@anthlasserre
Copy link

Someone found a solution ? I got the same error...

@mikehardy
Copy link
Collaborator

@anthlasserre including with firebase ios pods 6.13.0 ?

@stale
Copy link

stale bot commented Dec 29, 2019

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Dec 29, 2019
@CVRamana
Copy link

CVRamana commented Jan 8, 2020

Issue

Describe your issue here
This problem came up after upgrading to react-native 0.61.2 and RNFirebase modules. I have to say I wanted to use the new npm package version which uses @react-native-firebase/* but I changed again to the current react-native-firebase since the new packages are not completed yet.

Everything seems to be compiling fine until i get the next error

In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/FirebaseMessaging/Firebase/Messaging/FIRMessagingDataMessageManager.m:19:
In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/FirebaseMessaging/Firebase/Messaging/Protos/GtalkCore.pbobjc.h:27:
In file included from /Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/Headers/Private/Protobuf/GPBProtocolBuffers.h:44:
/Users/me/Development/crossplatform/myproject_rnxx/ios/Pods/Headers/Private/Protobuf/GPBWellKnownTypes.h:40:10: fatal error: 'protobuf/Any.pbobjc.h' file not found
 #import <protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I'm not sure if I'm missing something or something is broken under Pods.

Project Files

iOS

Click To Expand

Android

Click To Expand

Environment

Click To Expand
Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

Please remove the protobuf from the files(approx 20 30 times u have to remove this till the error gone)

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Jan 8, 2020
@mikehardy
Copy link
Collaborator

That does not seem like any kind of a solution - I think you just need to make sure the versions are all correct (iOS pods are on 6.14.0 I believe), and it should work. You might need to npx react-native-clean-project clean-project-auto then yarn && cd ios && pod install to make sure there's no odd caching, but no editing of files inside the pods should every be necessary

@alexxsanchezm
Copy link
Author

alexxsanchezm commented Jan 27, 2020

Hello all folks, last time I was in this problem my temporary solution was to go back and use previous version of RNFirebase 5.X.X, But now I was forced to go forward and use 6.X.X, which take me back here again.
Looking up for something to overcome this issue, I found that you can symlink the pod directory to use the right case and It seems to be working so far.
Thank you @mikehardy .

post_install do |installer|
    # Other stuff here ...
    system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
end

@mikehardy
Copy link
Collaborator

Yeah, I'm going to close this one as there is nothing we can do (it is an upstream bug) but that workaround from protocolbuffers/protobuf#6803 does seem to be the ticket for now. I'll cross-link from there so you can just see status on the related issue at a glance here

@mikehardy mikehardy added the Blocked: Firebase SDK Pending a confirmed fix landing on the official native sdk's (iOS/Android). label Jan 27, 2020
@mikehardy
Copy link
Collaborator

The upstream bug was just closed. I imagine a protobuf release after "Protocol Buffers v3.11.3" (which does not contain the fix - it was the prior release) will have it

@petergaultney
Copy link

is there such a release? we're still running into this.

@mikehardy
Copy link
Collaborator

v3.12.1 is shown as a tag in the related commit protocolbuffers/protobuf@56c48ae and shows up on cocoapods https://github.com/CocoaPods/Specs/blob/master/Specs/e/c/d/Protobuf/3.12.0/Protobuf.podspec.json - this is visible @petergaultney if you follow through associated links but it takes a while to know where to look - hope this helps now + future :-)

@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked: Firebase SDK Pending a confirmed fix landing on the official native sdk's (iOS/Android). Impact: Build Error Behaviour causing build failure Platform: iOS Type: Docs Type: Firebase Issue or PR that addresses external Firebase behaviour issues or changes, e.g. a Firebase SDK issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants