-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
iOS: custom module crashes on react-native 0.49+ #17430
Comments
+1, same problem, i don't know why is React (0.11.0) in Pods ? |
@af-fess I had a look at your linked project. I think you might be missing some React dependencies in your Podfile. I believe that the React pod has been deprecated and the podspecs are now distributed as part of the NPM package. I was able to replicate your issue with the supplied project in the iOS simulator and it stopped ocurring when I updated (and ran
You may want to add or remove some of the subspecs based on the components you require for your project. Have a look at the documentation for using CocoaPods with React Native for more info: http://facebook.github.io/react-native/docs/0.51/integration-with-existing-apps.html#configuring-cocoapods-dependencies Also worth looking at is the Podfile for the react-native-maps example project https://github.com/react-community/react-native-maps/blob/master/example/ios/Podfile |
@adrianfalleiro thank you for details, Ill check it out. Weird that for 0.48 everything works fine. |
I have the exact same issue here. Here is my stacktrace: I'm using RN 0.53.0 and my Podfile is the following: platform :ios, '8.0'
ENV['COCOAPODS_DISABLE_STATS'] = "true"
def install_pods
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
# To use CocoaPods with React Native, you need to add this specific Yoga spec as well
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'BatchedBridge'
]
pod 'AWSCore', '~> 2.3.6'
pod 'AWSS3', '~> 2.3.6'
pod 'Firebase/Messaging', '~> 4.8.2'
pod 'Firebase/Core', '~> 4.8.2'
pod 'Firebase/Crash', '~> 4.8.2'
pod 'GoogleMaps', '2.5.0'
pod 'FBSDKCoreKit', '~> 4.23'
pod 'FBSDKShareKit', '~> 4.23'
pod 'FBSDKLoginKit', '~> 4.23'
pod 'BVLinearGradient', path: '../node_modules/react-native-linear-gradient'
pod 'RNFS', path: '../node_modules/react-native-fs'
pod 'RNVectorIcons', path: '../node_modules/react-native-vector-icons'
pod 'react-native-blur', path: '../node_modules/react-native-blur'
pod 'react-native-camera', path: '../node_modules/react-native-camera'
pod 'react-native-fbsdk', path: '../node_modules/react-native-fbsdk/ios'
pod 'react-native-fcm', path: '../node_modules/react-native-fcm'
pod 'react-native-image-picker', path: '../node_modules/react-native-image-picker'
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-orientation', path: '../node_modules/react-native-orientation'
pod 'react-native-google-maps', path: rn_maps_path # Remove this line if you don't want to support Google Maps on iOS
pod 'react-native-video', path: '../node_modules/react-native-video'
pod 'SentryReactNative', path: '../node_modules/react-native-sentry'
end
target "MyProject" do
install_pods
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end Funnily enough, the issue arise only on one of our 4 dev machines. I haven't found a work-around yet, otherwise than banning development on that machine 😢 |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
@btoueg is reporting that this issue is still present in 0.53+, so re-opening & closing the issue that he created, in favour of keeping this issue open until we figure out what the issue is. |
@btoueg would you mind providing an updated example project? |
@af-fess did you fix your issue? |
Hi everyone, We tried to have a working example of the problem that we saw with @btoueg. After some time, we tried uninstalling and cleaning the cache of Xcode. We deleted the project and cloned it from GitHub, after that no more problem, the project compiled and ran. So it may not work for everyone but it seems that this method worked for us. Hope it helps. Cheers |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
OS: macOS High Sierra 10.13.1
Node: 7.2.1
Yarn: Not Found
npm: 4.6.1
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.2 AI-145.3537739
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Steps to Reproduce
We try to integrate AppsFlyer module, it works great on react-native <= 0.48 but crashes on 0.49+ (in my example - latest 0.51.0)
Create empty project with
$ react-native init Demo_4_10
$ cd Demo_4_10/
Install AppsFlyer plugin by running
$ npm install react-native-appsflyer --save
run
$ cd ios/
$ pod init
- it will createPodfile
Add to
Podfile
following row:pod 'react-native-appsflyer',:path => '../node_modules/react-native-appsflyer'
so it will look like:run
$ pod install
Output:
Open in Xcode new crested
Demo_4_10.xcworkspace
and run the project on Device.Expected Behavior
The app should run without any error or crash. Keep in mind we even do not load AppsFlyer module in Javascript
Actual Behavior
The crash happens in
react-native/ReactCommon/cxxreact/ModuleRegistry.cpp
row 116:The app output is so far till crash happens:
The crash print screen:
Crash frequency: Always
If I'll manually paste both files
RNAppsFlyer.m
andRNAppsFlyer.h
into the project - everything will work, however from pods - it fails.The second problem:
The manual way to integrate the module also fails with compilation error:
I found that new generated
libRNAppsFlyer.a
file size 2Kb less then for working version 0.48.Full Stack Trace:
Reproducible Demo
Download Demo
The text was updated successfully, but these errors were encountered: