This error appears when I try to build my app. Any suggestions on how to fix it are appreciated.
Error:
Showing All Messages
Argument list too long: recursive header expansion failed at .../node_modules/react-native-fcm/ios/../../../ios/Pods/React/node_modules/resolve/test/dotdot/abc.
What version of RN and react-native-fcm are you running?
"react-native": "^0.44.0",
"react-native-fcm": "^10.0.3"
What device are you using? (e.g iOS9 emulator, Android 6 device)?
iOS11
Is your app running in foreground, background or not running?
I can not start my app. I can not get the app to boot after upgrading fcm, my old version also no longer worked. I used the Cocoa Pods install method.
target 'example' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for Stripe
pod 'Stripe', '~> 11.2.0'
pod 'CodePush', :path => '../node_modules/react-native-code-push'
# Pods for CodePush
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'FirebaseMessaging'
# inherit! :search_paths
end

in RNFIRMessaging's project settings there are framework search path and header search path which includes /Pods with recursive, change it to non-recursive and try
Just tried that and now it gives me the error of FIRApp.h' file not found
ok the problem is you have React in your Pod folder, which introduce too deep path.
You have to use Pod to use react native?
@jaysig try master branch, it should work for you now
I cleaned up my podfile to this
pod 'Stripe', '~> 11.2.0'
# Pods for CodePush
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
# Explicitly include Yoga if you are using RN >= 0.42.0
#pod 'Firebase/Core'
pod 'FirebaseMessaging'
inherit! :search_paths
Then upgraded to latest version of rn-fcm but it errors at RNFIRMessaging.h' file not found. I have it linked in the Link Binary with Libraries; so, any other suggestions?
I also was not sure what you meant by master branch. Was I suppose to download a file from the Github repo?
you can do npm install react-native-fcm@git://github.com/evollu/react-native-fcm#master
Okay did that and now it says it can't find @import FirebaseCore; in RNFIRMessaing.h. Tried pod update but that did not fix it.
how does your Pods folder look like
mine looks like this


I think it looks the same as yours
ldoes your project structure look same as the example project?
example project works fine with latest changes
As far I can tell, Pods folder has everything it should. I have tried the Podfile two ways and thanks for your help so far.
Error: Can't find RNFIRMessaging.h
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'project' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'Firebase/Messaging'
# Pods for Stripe
pod 'Stripe', '~> 11.2.0'
# Pods for CodePush
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
inherit! :search_paths
end
Error: Can't find Firebase Core
target 'project' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for Stripe
pod 'Stripe', '~> 11.2.0'
# Pods for CodePush
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge', # Required For React Native 0.45.0+
'Core',
# Add any other subspecs you want to use in your project
]
inherit! :search_paths
pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'
end
can you create a public repo that has the issue? Can't reproduce here
I am having this problem, too.
Argument list too long: recursive header expansion failed at /Users/foo/dev/rn_app/node_modules/react-native-fcm/ios/../../../ios/Pods/React/node_modules/spawn-sync/lib/json-buffer.
@Ghostrick can you try the master branch or provide a repo with this issue?
I ended up just reverting everything backwards, and it works now. Not sure what happened by thanks again for your help.
I have the same issue with react-native-fcm, how to fix that?