facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 907 forks source link

[Android] appear white screen #609

Open mingxin-yang opened 5 years ago

mingxin-yang commented 5 years ago

🐛 Bug Report

It will appear white screen when I first open my app in android, it will be normal the second open the app.

To Reproduce

Expected Behavior

Code Example

Environment

react-native:0.59.10 react-native-fbsdk:0.10.1

mingxin-yang commented 5 years ago

when I delete

<meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />

It will be ok!

mingxin-yang commented 5 years ago

I use asyncStorage to read whether to log in and then jump to a different page when the application is initialized. After adding this library, asyncStorage will not return a value, so there is no jump, a white screen appears, it should be read by this library. Taken at application initialization.(It should be the network's problem in china)

jedashford commented 5 years ago

We have the exact same problem "react-native-fbsdk": "1.0.2",

The app builds, opens and connects to the packager ONLY the first time the app is installed. If the app is closed, or react-native run-android is run again, the app is just black. No logcat messages, no connection to the packager, the app is just dead in the water. We narrowed it down to this library. remove the line

or remove the lib altogether and everything works as normal. Neither option helps us as we can't use the library.

jedashford commented 5 years ago

We decided to roll back the fbsdk lib to 0.10.0, link it, add all of the code back in by following the instructions, then update the react-native.config.js file to exclude the fbsdk lib from auto linking:

'react-native-fbsdk': {
      platforms: {
        android: null, // disable Android platform, other platforms will still autolink if provided
      },
    },

Everything now on Android works as expected for our application on 0.60.5. Everything now on iOS is broken :) as I've seen a ton of issues of people tryign to get 0.10.0 working on RN 0.60.+