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

[iOS][v0.40] Unable to archive - React/RCTDefines.h file not found #12265

Closed
ggordan opened this issue Feb 7, 2017 · 21 comments
Closed

[iOS][v0.40] Unable to archive - React/RCTDefines.h file not found #12265

ggordan opened this issue Feb 7, 2017 · 21 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ggordan
Copy link

ggordan commented Feb 7, 2017

Description

I am currently having issues archiving the application. The issue only occurs when attempting to archive, running in debug mode works just fine. Possibly related to #12042.

When attempting to archive the app the following occurs:

screenshot 2017-02-07 17 26 00

Was wondering whether anyone has come across this, and if there are any solutions. I've attempted various things, including solutions mentioned in #12042 however my knowledge of iOS development is minimal.

Additional Information

  • React Native version: 0.40
  • Platform: iOS only
  • Operating System: MacOS
@zibs
Copy link

zibs commented Feb 7, 2017

@ggordan Following most of these steps just solved my problem with this error: http://imgur.com/a/KUOQC - in particular step 2.

Thanks to @skellock for posting.

@ggordan
Copy link
Author

ggordan commented Feb 8, 2017

Thanks for the suggestion @zibs . Unfortunately, none of those steps seem to have worked. The file not found error changes from time to time. Right now it's something different, though the app builds and runs just fine.

screenshot 2017-02-08 10 00 41

@freakinruben
Copy link

Is DEAD_CODE_STRIPPING disabled for all your targets?

@skellock
Copy link
Contributor

skellock commented Feb 8, 2017

Do you have any 3rd party libs installed that haven't been upgraded?

@ggordan
Copy link
Author

ggordan commented Feb 8, 2017

@freakinruben DEAD_CODE_STRIPPING is disabled for Debug and Release.

@skellock All third party libraries have been upgraded, and the issue appears to be coming from within react-native libraries. Maybe it could be an issue with 3rd party libraries, but I imagine that in that scenario I wouldn't be able to build and run the app, which isn't the case.

@freakinruben
Copy link

The fact that it happens not all the time is even more strange.. But debugging this is a pain in the butt, I ended up throwing away the xcode project, workspace and schemes and recreating them, without much luck the first few tries.
Did you try deleting node_modules and downloading them again, making sure the ^ of the specified versions doesn't mess with the versions you want from npm?

@skellock
Copy link
Contributor

skellock commented Feb 8, 2017

@ggordan I've seen Xcode fail with that error before (blaming wrong lib) when I've had a 3rd party lib not upgraded AND when i've missed the new import statements up at my app level (both in the app & default test).

@freakinruben
Copy link

@ggordan Just found this solution which fixed issues for me with archiving a release with a different build-name than 'release'

@skellock
Copy link
Contributor

@freakinruben thx for closing the loop! Something about Xcode was definitely off. I remember being able to compile in Xcode, but not the command line at one point. If I had hair left, I'd tear it out.

@ggordan
Copy link
Author

ggordan commented Feb 14, 2017

@freakinruben Thanks a lot for that. Managed to get it to archive

@ggordan ggordan closed this as completed Feb 14, 2017
@SamSaffron
Copy link

FWIW, I have $300 on the table for anyone that can figure out how to upgrade DiscourseMobile per:

https://discuss.reactjs.org/t/having-a-hell-of-a-time-upgrading-from-react-native-39-to-40/6331

@nihgwu
Copy link
Contributor

nihgwu commented Feb 15, 2017

@SamSaffron I'd like to help if no one else do that, I'm always using the bleeding edge version of React Native

@SamSaffron
Copy link

@nihgwu sounds like a plan, should I update that topic to say that you are taking this? any timeframe?

@nihgwu
Copy link
Contributor

nihgwu commented Feb 15, 2017

Ok, I'll done in an hour or two, I suppose

@SamSaffron
Copy link

@nihgwu awesome, will update the topic, if you need to fork any of the dependencies and submit fixes as well feel free to point your PR at the forks.

@FlaviooLima
Copy link

FlaviooLima commented Mar 9, 2017

Hi, is it possible to reopen this issue ? I can build in release mode with no problem but when i try to archive i always get this error:
/node_modules/react-native/Libraries/Vibration/RCTVibration.h:10:9: 'React/RCTBridgeModule.h' file not found

screen shot 2017-03-09 at 10 38 29

By the way i created a new project already in this version of react-native.

React-Native Version : 0.41.2
react Version: 15.4.2
Xcode Version : 8.2
Mac OS El Capitan

@FlaviooLima
Copy link

[Update] I resolve this issue Adding React to Build Target before the app and uncheking parallelize build.

@arun542
Copy link

arun542 commented Jun 19, 2017

I have done all the settings, unchecked parallelize, Added React to build target before the app, still no luck. Fails while archiving with error 'React/RCTBundleURLProvider.h' file not found in appDelegate.m . Works on simulator, iphone 6 device with release config but archiving fails

@yewenxiang23
Copy link

@zibs Very useful to me, thank you very much

@stephan-nordnes-eriksen
Copy link

stephan-nordnes-eriksen commented Apr 12, 2018

I got this error when using cocoapods 1.5 to install dependencies, but it went away when I downgraded to 1.4.

For reference:
$ sudo gem uninstall cocoapods
$ sudo gem install cocoapods -v 1.4.0
Then re-run $ pod install in your ios folder.

@elegantcoder
Copy link

@stephan-nordnes-eriksen Very useful to me. Thank you so much.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests