Firebase-ios-sdk: Project fails with "Non-portable path to file '<protobuf/Any.pbobjc.h>'" when updated to latest Firebase/Messaging component

Created on 18 Jun 2018  路  10Comments  路  Source: firebase/firebase-ios-sdk

  • Xcode version: 9.4
  • Firebase SDK version: 5.2.0
  • Firebase Component: Messaging (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: 3.0.2

When trying to build my project I see several identical errors to:

Non-portable path to file ''; specified path differs in case from file name on disk

Steps to reproduce:

If I update my pods file to:

Installing Firebase 5.2.0 (was 4.13.0)
Installing FirebaseABTesting 2.0.0 (was 1.0.0 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseAnalytics 5.0.1 (was 4.2.0 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseCore 5.0.3 (was 4.0.20 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseInstanceID 3.1.0 (was 2.0.10 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseMessaging 3.0.2 (was 2.2.0 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebasePerformance 2.0.0 (was 1.1.3 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseRemoteConfig 3.0.0 (was 2.1.3 and source changed to https://github.com/CocoaPods/Specs.git from https://github.com/cocoapods/specs.git)
Installing FirebaseSwizzlingUtilities 2.0.0 (was 1.0.1)
Using Folly (2016.09.26.00)

When I build in xcode I get several of the errors above for the Messaging component, specifically for the GtalkCore.pbobjc.h

I'm not an expert in IOS so I tried researching online but I could not find any good lead to solve this problem. Any lead or help would be much appreciated.

Thank you in advance.

messaging

Most helpful comment

I see the problem now. Thanks for your patience. I should have remembered this one sooner.

These are warnings generated by the Protobuf CocoaPod when it is built as a static library because of clang bug with file name casing - see https://github.com/google/protobuf/issues/3218.

It's an error for you because your Podfile is treating all warnings as errors.

Workarounds include allowing warnings for the Protobuf library build or adding use_frameworks! to the Podfile.

All 10 comments

Something is going wrong with handling FirebaseMessaging's xcconfig options. That option is used to avoid this error here.

If you're still stuck, share your Podfile.

Hi @paulb777 thanks for the quick response.

This is how my pod file looks like - not this is a react-native app:

platform :ios, '9.0'

react_path = '../node_modules/react-native'
yoga_path = react_path + '/ReactCommon/yoga'

target 'redbeetapp' do
pod 'Firebase/Core'
pod 'Firebase/Performance'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Messaging'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'HockeyAppReactNative', :path => '../node_modules/react-native-hockeyapp'
pod "HockeySDK", :subspecs => ['AllFeaturesLib']
pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'RNI18n', :path => '../node_modules/react-native-i18n'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'React', :path => react_path, :subspecs => [
'Core',
'ART',
'CxxBridge',
'RCTActionSheet',
'RCTAnimation',
'RCTCameraRoll',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTLinkingIOS',
'DevSupport'
]
pod 'yoga', :path => yoga_path

# Third party deps
pod 'DoubleConversion', :podspec => react_path + '/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => react_path + '/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => react_path + '/third-party-podspecs/Folly.podspec'

# Targets for which we don't want to currently treat warnings
# as errors because the target has enough warnings that fixing
# them all will take some time.
# PLEASE DO NOT ADD TO THIS LIST. ONLY REMOVE FROM IT.
skip_treat_warnings_as_errors = [
'React',
'SentryReactNative',
'KSCrash',
'GTMSessionFetcher',
'glog',
'Folly',
'RNDeviceInfo',
'RNFirebase'
]

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if !skip_treat_warnings_as_errors.include?(target.name)
                config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
            end
            if skip_treat_warnings_as_errors.include?(target.name)
                config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
            end
        end
    end
end

end

Are you overriding any of your pod options in your project file?

@morganchen12 I'm not sure. I can't think of anything. Where would you recommend looking into?

Normally CocoaPods will flag a warning in pod install output if you're overriding its xcconfig values.

You can also try manually adding the preprocessor definition that Paul linked above into your pbxproj file.

I don't think is a matter of setting the preprocessor - it seems the preprocessor is working fine the problem is that the path case in the filesystem does not match the import
screen shot 2018-06-21 at 11 49 49 pm

The pode install shows no warnings:

screen shot 2018-06-21 at 11 50 37 pm

I see the problem now. Thanks for your patience. I should have remembered this one sooner.

These are warnings generated by the Protobuf CocoaPod when it is built as a static library because of clang bug with file name casing - see https://github.com/google/protobuf/issues/3218.

It's an error for you because your Podfile is treating all warnings as errors.

Workarounds include allowing warnings for the Protobuf library build or adding use_frameworks! to the Podfile.

That works. Thanks a lot!

These warnings just go away if you remove prefixes for example #import<protobuf/Any.pbobjc.h>should be #import <Any.pbobjc.h>

For me, adding
pod 'Protobuf', :inhibit_warnings => true in Podfile worked (re// allowing warnings for the Protobuf library build)

Thanks!

Was this page helpful?
0 / 5 - 0 ratings