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

could not link react-native-fbsdk #14670

Closed
vu-dang opened this issue Jun 22, 2017 · 23 comments
Closed

could not link react-native-fbsdk #14670

vu-dang opened this issue Jun 22, 2017 · 23 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@vu-dang
Copy link

vu-dang commented Jun 22, 2017

I'm not sure if this is a bug with rnpm. I was trying to run

react-native link react-native-fbsdk

and got this error:

rnpm-install info Android module react-native-fbsdk is already linked
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.

@RyanWan
Copy link

RyanWan commented Jun 22, 2017

+1

1 similar comment
@didrikhegna
Copy link

+1

@thienpow
Copy link

delete package-lock.json and redo npm install, the npm 5 is broken, you either always have to delete package-lock.json and redo npm install or just use npm 4

@hramos hramos closed this as completed Jun 22, 2017
@manggit
Copy link

manggit commented Jun 22, 2017

I followed the steps and am still getting the error

@manggit
Copy link

manggit commented Jun 22, 2017

I ran
npm install --save react-native-fbsdk@0.6.0 react-native link react-native-fbsdk
Everything worked fine

Finally I updated my react-natvie-fbsdk by running
npm update react-native-fbsdk

@Charles-LMQ
Copy link

npm install --save react-native-fbsdk@0.6.0
react-native link react-native-fbsdk
it is ok

but if you forget update to latest, android will get a trouble in build.gradle
you need to change

compile('com.facebook.android:facebook-android-sdk:4.+')
to
compile('com.facebook.android:facebook-android-sdk:4.22.1')

@alxvallejo
Copy link

@manggit I can run that command ok, but for every subsequent react-native link i run, i hit the same error at Linking react-native-fbsdk ios dependency

@hindsricardo
Copy link

@Charles-LMQ your suggestion worked. It didn't work at first so I had to upgrade from npm 3.3.9 to 5.0.4 then went down to 0.6.0 for fbsdk.

dependencies": {
"native-base": "^2.2.0",
"react": "16.0.0-alpha.12",
"react-native": "^0.45.1",
"react-native-deprecated-custom-components": "^0.1.0",
"react-native-fbsdk": "^0.6.0"
},

@thienpow - this has nothing to do with package-lock.json from what i can tell. Removed it multiple times and nada.

@antonellil
Copy link

Also hitting this. Installing 0.6.0 works however.

@raduflp
Copy link

raduflp commented Aug 5, 2017

looks like the issue is stuck at this PR
facebookarchive/react-native-fbsdk#349

@fabualrub
Copy link

npm install --save react-native-fbsdk@0.6.0
then open [yourproject]\node_modules\react-native-fbsdk\android\src\main\java\com\facebook\reactnative\androidsdk\FBSDKPackage.java

comment
/*
@OverRide
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}*/

then react-native link

every thing will be fine

@phil-andrews
Copy link

phil-andrews commented Aug 24, 2017

+1

React-Native: 0.47.2
React-Native-FBSDK: 0.6.0

This works for iOS but how have you got it to run on Android? I keep running into:

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

@victorbadila
Copy link

+1 the workaround involving installing 0.6.0, linking, update to 0.6.1 works but only temporary. each time I need to relink I have to do it again, I think this issue should still be open.

@phil-andrews
Copy link

phil-andrews commented Sep 4, 2017

This should absolutely still be open. 0.6.1 does not work with iOS. This makes it necessary to split the project into iOS/Android with two different package.json. I filed a formal bug at developers.facebook a week ago.

I've tested with a completely clean build at 0.47.2 just for the FBSDK to no avail. You'd have to down-version RN to get 0.6.1 to work but I'm not sure how far down. I've seen reports of 0.45 being ok.

@quangduz
Copy link

quangduz commented Sep 4, 2017

Its works with RN 0.48.1 and FB SDK 0.6.0

Durzas-MacBook-Pro:test0_48_1 durza$ react-native install react-native-fbsdk@0.6.0
Scanning 584 folders for symlinks in /Users/durza/test0_48_1/node_modules (7ms)
yarn add v0.27.5
warning ../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
└─ react-native-fbsdk@0.6.0
Done in 4.40s.
Scanning 585 folders for symlinks in /Users/durza/test0_48_1/node_modules (6ms)
rnpm-install info Linking react-native-fbsdk android dependency
rnpm-install info Android module react-native-fbsdk has been successfully linked
rnpm-install info Linking react-native-fbsdk ios dependency
rnpm-install info iOS module react-native-fbsdk has been successfully linked
rnpm-install info Module react-native-fbsdk@0.6.0 has been successfully installed & linked

screen shot 2017-09-05 at 3 34 04 am

@phil-andrews
Copy link

Right, 0.6.0 works with 0.47.2 as well, 0.6.1 does not. And 0.6.0 does not work with Android/RN 0.47.2. Android requires 0.6.1

@gaultierq
Copy link

Does anybody have a combinaison of versions working on both android and ios ?

@quangduz
Copy link

quangduz commented Sep 7, 2017

RN 0.48.1 & FBSDK 0.6.0 ... working both android & ios

@phil-andrews
Copy link

phil-andrews commented Sep 7, 2017

Just received an update on my bug report. Haven't gotten a chance to try this yet but if someone wants to give it a shot...

"While we work on a fix, as a workaround, can you try deleting the file project.pbxproj from the React Native SDK and confirm that solves the issue?"

@jetpackpony
Copy link

There is a PR fixing this issue still unmerged: facebookarchive/react-native-fbsdk#349 (as mentioned above by @raduflp).
There is a workaround here: facebook/react-native/issues/14594#issuecomment-315531102.
And another discussion here: #10032

@nicoara
Copy link

nicoara commented Jan 4, 2018

For the past hours, I am trying unsuccessfully to connect the Facebook SDK in React Native.

  1. react-native init demoapp1
    0.5) cd demoapp1
  2. npm install --save react-native-fbsdk@0.6.3
  3. react-native link react-native-fbsdk
    Scanning folders for symlinks in C:\Users\nicoara\Desktop\demoapp1\node_modules
    (41ms)
    rnpm-install info Linking react-native-fbsdk android dependency
    rnpm-install info Android module react-native-fbsdk has been successfully linked
    rnpm-install info Linking react-native-fbsdk ios dependency
    rnpm-install info iOS module react-native-fbsdk has been successfully linked
  4. open the folder Android from the demoapp1 in Android Studio
    shows:
    Error:Failed to find Build Tools revision 25.0.3
    I click on the solution to install Build Tools 25.0.3
  5. now following errors appear:
    Error:Failed to resolve: com.android.support:support-annotations:27.0.1
    Android Studio has no proposed solution.
    also, it does not recognize if I add the following line in MainApplication.java: 'import com.facebook.FacebookSdk'

I am running Windows, Android Studio 2.3.1.
npm --version shows: 4.6.1
my package.json shows:
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-fbsdk": "^0.6.3"

(
if instead of step 1 follow the official documentation at https://developers.facebook.com/docs/react-native/getting-started I receive the next errors:
C:\Users\nicoara\Desktop\demoapp1>react-native install react-native-fbsdk
Scanning folders for symlinks in C:\Users\nicoara\Desktop\demoapp1\node_modules
(42ms)
rnpm-install info Module react-native-fbsdk has been successfully installed & li
nked

C:\Users\nicoara\Desktop\demoapp1>react-native link react-native-fbsdk
Scanning folders for symlinks in C:\Users\nicoara\Desktop\demoapp1\node_modules
(38ms)
{ Error: Cannot find module 'C:\Users\nicoara\Desktop\demoapp1\node_modules\reac
t-native-fbsdk\package.json'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at getRNPMConfig (C:/Users/nicoara/Desktop/demoapp1/node_modules/react-nativ
e/local-cli/core/index.js:52:3)
at Object.getDependencyConfig (C:/Users/nicoara/Desktop/demoapp1/node_module
s/react-native/local-cli/core/index.js:90:18)
at deps.reduce (C:/Users/nicoara/Desktop/demoapp1/node_modules/react-native/
local-cli/link/getDependencyConfig.js:9:24)
at Array.reduce (native)
at getDependencyConfig (C:/Users/nicoara/Desktop/demoapp1/node_modules/react
-native/local-cli/link/getDependencyConfig.js:6:15)
at Object.link (C:/Users/nicoara/Desktop/demoapp1/node_modules/react-native/
local-cli/link/link.js:180:24) code: 'MODULE_NOT_FOUND' }

and then still, it does not recognize if I add the following line in MainApplication.java: 'import com.facebook.FacebookSdk'
)

How to proceed?

@iltoga
Copy link

iltoga commented Jan 24, 2018

wtf it's been a whole day trying installing this framework on osx for ios without success...
What's wrong with you guys who developed this package?
isn't it supposed to ease the use of fbsdk into RN apps?...

my config:
xcode 9.0
RN: 0.52.0
react-native-fbsdk: 0.7.0

on android is working.
on ios there is NO WAY to make it work. tried everything, from manually importing/linking libraries, to use custom pods.. :(

please some advice, as the docs on FB developer website seems to be broken or at least not working for me.

@Luckygirlllll
Copy link

Luckygirlllll commented Mar 14, 2018

I upgraded react-native-fbsdk to 0.7.0, now IOS stopped working, I see just white screen, when trying to log in/sign up via Facebook. I was trying to downgrade react-native-fbsdk back to 0.6.0, 0.6.2, but this white empty screen is still there. Android works fine. Any advice how is possible to fix that?

RN: 0.47.2

screen shot 2018-03-08 at 11 11 59

@facebook facebook locked as resolved and limited conversation to collaborators Jun 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 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