GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — FacebookProvider crash with NullPointerException · Issue #263 · firebase/FirebaseUI-Android

FacebookProvider crash with NullPointerException #263

New issue
Copy link
New issue
Copy link
Closed
Closed
FacebookProvider crash with NullPointerException#263
Copy link
Assignees
amandle
Labels
authfix-implementedtype: bug
Milestone
1.0.0

Description

@Caerbannog
Caerbannog
opened on Aug 22, 2016
Issue body actions
  • 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.

Reacted by Jagdeep Singh

Activity

  1. samtstern
    added
    type: bug
    auth
    on Aug 22, 2016
  2. samtstern commented on Aug 22, 2016

    @samtstern
    samtstern
    on Aug 22, 2016
    Contributor
    More actions

    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.

  3. samtstern
    added this to the 1.0.0 milestone on Sep 6, 2016
  4. SUPERCILEX commented on Oct 17, 2016

    @SUPERCILEX
    SUPERCILEX
    on Oct 17, 2016
    Contributor
    More actions

    Duplicate of #352.

  5. amandle
    added
    fix-implemented
    on Oct 21, 2016
  6. amandle
    self-assigned this
    on Oct 21, 2016
  7. amandle
    closed this as completedon Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @amandle
    amandle

Labels

authfix-implementedtype: bug

Type

No type

Projects

No projects

    Milestone

    • 1.0.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.