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

react-native link issue after upgrade to react-native-fbsdk 0.6.1 #14594

Closed
webraptor opened this issue Jun 19, 2017 · 16 comments
Closed

react-native link issue after upgrade to react-native-fbsdk 0.6.1 #14594

webraptor opened this issue Jun 19, 2017 · 16 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@webraptor
Copy link

webraptor commented Jun 19, 2017

Description

Running react-native link after upgrading to react-native-fbsdk 0.6.1 throws error:

[...]
rnpm-install info Linking react-native-fbsdk ios dependency
rnpm-install ERR! Something went wrong while linking. Error: Expected "/*", "//", or "{" but "<" found.
Please file an issue here: https://github.com/facebook/react-native/issues

Expected "/*", "//", or "{" but "<" found.

Reproduction Steps

Install react-native-fbsdk 0.6.1, remove node_modules and reinstall packages, then run react-native link

Additional Information

  • React Native version: "react": "16.0.0-alpha.12", "react-native": "0.45.1",
  • Platform: both
  • Development Operating System: MacOS
  • Build tools: Xcode Version 8.3.2 (8E2002),
    Android Studio 2.3.2 (AI-162.3934792), JRE 1.8.0_112-release-b06 x86_64
@nico2che
Copy link

This answer worked for me

#10032 (comment)

@webraptor
Copy link
Author

webraptor commented Jun 20, 2017

Indeed it works fine with version 0.6.0 . The issue I raised comes with version 0.6.1, and btw, none of the proposed solutions in your link work for 0.6.1

@BATMAH69
Copy link

BATMAH69 commented Jul 5, 2017

@koenpunt made a pull request to fix this problem:
facebookarchive/react-native-fbsdk#349

@paulftw
Copy link

paulftw commented Jul 15, 2017

This is not a bug in react-native - it's a really old known issue with CocoaPods and latest react-native-fbsdk commits trigger it by using more modern project.pbxproj format.
I think there's no reason to track it in the RN repository as the root cause and possible workarounds are isolated inside either cocoapods or rnfbsdk.

react-native install react-native-fbsdk would fail. Best clean up / recovery I use is:

  1. react-native unlink react-native-fbsdk to clean up any previously failed link attempts.
  2. yarn add react-native-fbsdk
  3. open node_modules/react-native-fbsdk/ios/ios.xcodeproj/ - this launches XCode
  4. in XCode click on PROJECT ios.
  5. Make sure Project Format is set to "Xcode 3.2-compatible" in the rightmost panel
  6. Change "Use Release for command-line builds" to "Debug" and then back to "Release". this will force Xcode to save project.pbxproj in the old format.
  7. run less node_modules/react-native-fbsdk/ios/ios.xcodeproj/project.pbxproj to make sure the file is no longer XML.
  8. react-native link react-native-fbsdk

@adam-jr
Copy link

adam-jr commented Jul 17, 2017

@paulftw where is that "Use Release for command-line builds" Xcode setting located at?

@paulftw
Copy link

paulftw commented Jul 18, 2017

@atom-r here's a screenshot
ios_xcodeproj

@mattwebhub
Copy link

@paulftw Thanks! it worked!

@mattwebhub
Copy link

@paulftw hey it worked but after I installed yarn and did what you said I ran npm install to install another package and it removed all my node_modules and the application is not running anymore =// what causes this, do you know it?

@hecomp
Copy link

hecomp commented Jul 31, 2017

@paulftw it worked for me too. Thanks!!!!

@mitramejia
Copy link

@paulftw you're awesome!

@paulftw
Copy link

paulftw commented Aug 6, 2017

@barakoles when npm or yarn rewrite or remove node_modules you have to convert .pbxproj to old format again, as per the steps I've provided above. But overall it's a hack, not a proper permanent fix, so projects will keep breaking again and again until rn-fbsdk get their act together (or cocoapods for that matter)

Many people have asked them to do that here: facebookarchive/react-native-fbsdk#349

@ghost
Copy link

ghost commented Sep 5, 2017

@paulftw that really helped thanks!!!

@billpatterson
Copy link

paulftw's comment (July 17) solved this for me. It's unbelievable that the Facebook integration for a facebook-originated project (react native) is in this state. One would think facebook's highest priority would be making sure integration of their framework/services was functional.

@BATMAH69
Copy link

I would also like to note that not all mobile developers have mac (with Xcode). For example, in order to develop applications for android enough to have a linux PC. Nevertheless, this error breaks their library linking.

@stepharr
Copy link

It may help someone to know they need to click the standard editor icon in the right panel.
screen shot 2017-09-24 at 7 47 34 pm

@stale
Copy link

stale bot commented Nov 24, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 24, 2017
@stale stale bot closed this as completed Dec 1, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

10 participants