Skip to content

Crashlytics reporting crash at ActivityHelper.java line 38 #657

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

Closed
checklist opened this issue Apr 3, 2017 · 3 comments
Closed

Crashlytics reporting crash at ActivityHelper.java line 38 #657

checklist opened this issue Apr 3, 2017 · 3 comments

Comments

@checklist
Copy link

checklist commented Apr 3, 2017

I have the following crash report from Crashlytics

  • Android device: __ XT320___
  • Android OS version: 4.3.1_
  • Google Play Services version: 10.2.0_
  • Firebase/Play Services SDK version: _____
  • FirebaseUI version: 1.2.0__

Step 3: Describe the problem:

Unknown. Please see crash report below

Steps to reproduce:

Unknown. Please see crash report below

Observed Results:

Please see the following Crashlytics report:

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android/com.firebase.ui.auth.ui.email.RegisterEmailActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
at com.firebase.ui.auth.ui.ActivityHelper.configureTheme(ActivityHelper.java:38)
at com.firebase.ui.auth.ui.AppCompatBase.onCreate(AppCompatBase.java:27)
at com.firebase.ui.auth.ui.email.RegisterEmailActivity.onCreate(RegisterEmailActivity.java:59)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
at dalvik.system.NativeStart.main(NativeStart.java)

Expected Results:

Not crash

Relevant Code:

Here is the code we use to kick off the Auth:

AuthUI.IdpConfig facebookIdp = new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER)
                            .setPermissions(Arrays.asList("email"))
                            .build();

// go to sign in to authenticate user
startActivityForResult(
                            AuthUI.getInstance()
                                    .createSignInIntentBuilder()
                                    .setProviders(Arrays.asList(
                                            new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
                                            new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),
                                            facebookIdp)
                                    )
                                    .setTosUrl("http://example.com/terms")
                                    .setIsSmartLockEnabled(false)
                                    .setTheme(R.style.ExampleSignInTheme)
                                    .setLogo(R.drawable.logo_example)
                                    .build(),
                            RC_SIGN_IN);

In case needed, here is the theme definition in xml:

    <style name="ExampleSignInTheme" parent="FirebaseUI">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
    </style>

I can see where in the library code the exception is thrown (ActivityHelper.java line 38) but I cannot see why it would happen. Any suggestions would be appreciated.

Thanks!

@WillieCubed
Copy link
Contributor

If you're still there, does this happen on the latest version of the library?

@WillieCubed
Copy link
Contributor

I think this has been fixed with the refactoring introduced in #777, so we should close this issue.

@samtstern

@samtstern
Copy link
Contributor

Thanks @TheCraftKid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants