GeezerVison is showing github.com — FacebookProvider crash with NullPointerException · Issue #263 · firebase/FirebaseUI-Android
FacebookProvider crash with NullPointerException #263
Description
- Android device: LG-D855
- Android OS version: 5.0
- Google Play Services version: 3.0.0
- Firebase/Play Services SDK version: 9.0.2
- FirebaseUI version: 0.4.1
Steps to reproduce:
I could not reproduce this. It must have happened after clicking "Login via Facebook". I have no idea of what the Facebook account was, so it may have had weird privacy settings.
Observed Results:
The following crash occured one time:
STACK_TRACE=java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.getString(java.lang.String)' on a null object reference
at com.firebase.ui.auth.provider.FacebookProvider$1.onCompleted(FacebookProvider.java:108)
at com.facebook.GraphRequest$1.a(SourceFile:304)
at com.facebook.GraphRequest$3.run(SourceFile:1379)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5272)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Expected Results:
I any case, there should be no crash and the argument should be checked for Null.
Activity
samtstern commented on Aug 22, 2016
Looks like the JSONObject here can be null:
GraphRequest request = GraphRequest.newMeRequest(
loginResult.getAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
try {
String email = object.getString("email");
mCallbackObject.onSuccess(createIDPResponse(loginResult, email));
} catch (JSONException e) {
e.printStackTrace();
mCallbackObject.onFailure(new Bundle());
}
}
});
I will have to look into the Facebook docs to see how this could be possible.
SUPERCILEX commented on Oct 17, 2016
Metadata
Metadata
Development
No branches or pull requestsIssue actions