Closed noahtallen closed 6 years ago
Thanks for the report, are you using Objective-C or Swift for your native code?
Have you tried these steps yet? https://github.com/react-native-community/react-native-google-signin/issues/361
We don't have any custom native code, so I believe it uses the react-native default (Objective-C). Based on the AppDelegate files, it's Objective-C. I was installing via Pods, and I also tried manually to see if it worked.
I also tried that (setting RNRadar.xcodeproj to build to Objective-C++), but it just results in a lot of errors like this:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:85:9: error: no member named 'strrchr' in the global namespace
using ::strrchr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:86:9: error: no member named 'strspn' in the global namespace
using ::strspn;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:87:9: error: no member named 'strstr' in the global namespace
using ::strstr;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:89:9: error: no member named 'strtok' in the global namespace
using ::strtok;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I've tried most of the solutions like cleaning the build, deleting derived data, some changes to compiler settings, and re-installing Xcode, but get the same error every time. Even if that suggestion above worked, it would still cause errors on the next npm install
since it's just an edit of a file provided from the package. :/
Want to add that I'm on react-native version 0.55.4.
One really strange thing is that while I was debugging this yesterday, I was able to get it to work by deleting Pods
and running pod install
again. HOWEVER, it only works with an Xcode build. The error still shows up when running react-native run-ios
and it also still shows up on our Bitrise TestFlight build.
Edit: Xcode Archive also fails with the same error. Xcode run on simulator works for some reason though
This seems like it may be relevant, but I'm not sure what the SDK's codebase looks like: https://stackoverflow.com/a/30697222
Thanks for the investigations! Would you mind describing your setup to help us better reproduce locally?
Did you use create-react-native-app
, create-react-app
or react-native init
(or something else?) to create the app?
And since everything was working before the upgrade I assume you've followed the documentation and ejected the app, if applicable?
Hi! Our app is pretty far along in development, I don't think it's very similar to any of those at this point. I think we started with react-native init
. We've been ejected for a long time, too. What information would be valuable?
Here is our Podfile:
platform :ios, '9.0'
target 'zonder' do
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport',
'RCTWebSocket',
'RCTImage'
# Add any other subspecs you want to use in your project
]
# Required by the Facebook SDK:
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk/iOS'
# Required by Firebase (see rnfirebase.io to add more Firebase features)
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Analytics', '~> 5.3.0'
pod 'Firebase/Auth', '~> 5.3.0'
pod 'Firebase/Firestore', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
pod 'Firebase/Storage', '~> 5.3.0'
# For Crashlytics:
pod 'Fabric', '~> 1.7.9'
pod 'Crashlytics', '~> 3.10.5'
# For react-native-maps
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
# Other random packages:
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'RadarSDK', '~> 2.0.0'
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
I downgraded to the previous version, and the build errors go away, so it's definitely an issue with the update. Is there anything in particular I need to have configured in Xcode for the build to work correctly, or are there specific parts of the build process that changed between the old and new versions?
Thanks this info is super helpful! There's no changes that I know of in particular, but it's looking like I'm wrong on that one haha. Hopefully this helps me reproduce the issue.
Feel free to stay downgraded for the time being. While 2.0 is more optimized under the hood, you should see almost identical event and behavior with the previous version
Ok! We've been struggling on Android with enter/exit events not getting passed on to the JS code while the app is in the background, so I was hoping the update might help with that.
Update: You know how the react-native-radar xcodeproject gets linked to your own project? It turns out that if we remove the react-native-radar project from our own project, the build succeeds but results in the "native module is not defined" issue. But, if we keep the project there, the build fails with the errors above.
Hey @coolbrow I'm working with Noah. Want to add a little more information.
When we are working with 2.0. ,trying to make the app build results in the following error.
Argument list too long: recursive header expansion failed at /Users/feargalwalsh/Downloads/zonder/zonder-mobile-app/node_modules/react-native-radar/ios/../../../ios/build/Index/DataStore/v5/records/76.
I tried all sorts of variations of the framework and header search paths in our app target and ended up deleting any references to radar and it was still giving me that error. Cleaning it and running npm cache verify
restarting the packager closing opening Xcode and a bunch of other standard cache cleaning type stuff in the pods and node_modules had no effect.
So then I tried downgrading on my own branch and I have all the errors Noah listed above now. It seems as if it would be easier to debug if I could get the first error fixed. Have you seen it before?
Thanks for the added info! Unfortunately I haven't seen any of these build issues before but I'm trying a bunch of different build configurations soon to see if I can reproduce.
All this info is super helpful and I appreciate your patience as we sort this out.
No worries, appreciate the quick response. We're all in this together! Above is a screenshot of the errors I get when I select Objective C++, that's not new information but it seems as if this is the same issue outlined in this later comment.
Which below it seems to be solved by the selection of the @next branch of the GoogleSignIn node_module. Is there a version you have/ could code of React Native Radar that works like this next branch.
I got around that possibly temporarily by running
yarn remove react-native-radar
yarn add react-native-radar@next
(just gave it a shot because I couldn't see a next branch on the google module so I thought it might be something else.
It didn't find a @next version but it did ask me to choose a version of the module to install. The weird thing was that it didn't show any versions above 1.0.17 that were part of 1 release. Anyways I picked that one and now I'm getting a firebase error:
`
@import GoogleMaps; @implementation AppDelegate`
Which isn't your problem I don't think 😀
Here's the terminal sequence for selecting 1.0.17
Couldn't find any versions for "react-native-radar" that matches "next" ? Please choose a version of "react-native-radar" from this list: 1.0.17 [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > react-native@0.55.4" has incorrect peer dependency "react@16.3.1". warning " > react-native-firebase@4.3.7" has unmet peer dependency "fbjs@*". warning " > react-native-maps@0.21.0" has incorrect peer dependency "react-native@^0.51 || ^0.52 || ^0.53 || ^0.54". warning " > babel-jest@22.4.4" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0". warning "react-native-mock > react-dom@15.6.2" has incorrect peer dependency "react@^15.6.2". [4/4] 📃 Building fresh packages... success Saved lockfile. success Saved 1 new dependency. info Direct dependencies └─ react-native-radar@1.0.17 info All dependencies └─ react-native-radar@1.0.17 $ rm -f ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json ✨ Done in 23.75s.
@coolbrow I'm going to try to reproduce the issue in a repo that I can send to you. Basically gonna strip out all of the actual app and keep the dependencies and build configuration the same
Ok, I have it reproduced in this repo: https://github.com/ntomallen/radar_test
It's private, so let me know if you have any issues accessing it. I added @coolbrow and @feargswalsh92 as collaborators.
The very first commit should be the working version before the update. The second commit is everything that happened for the update to 2.0. Everything should just be iOS only. You can see some more details in the readme of the repo :)
Thanks so much, this is extremely helpful! I'll take a look at this and will get back to you asap
@ntomallen Good news! I was able to reproduce with that sample project (thanks again) and isolated the problem to the added search paths in this commit - https://github.com/radarlabs/react-native-radar/commit/f776c38389a8970cb1f587b9fad0d3938a52c885
Going to push a fix for this ASAP and release a new version.
After updating
react-native-radar
to version 2.0, I've been getting some strange build errors:I also followed the migration instructions for updating the iOS and Android modules as well. Everything seems to be working correctly on Android.
I've also been researching this error, and I none of the suggested solutions for this error worked.